X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-active.php;h=1ce76057be6581a207f1300a45fb97290172a299;hp=4aff32af452894acc55eb39c7113e370649b1d30;hb=aa63aed07428a99ea09002c8d072990677700080;hpb=f03cb5d87e69bb2efc885b5c5f5f3026b24c06f6 diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index 4aff32af45..1ce76057be 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -38,21 +38,21 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "active"); +} elseif ((!EXT_IS_ACTIVE('active')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'active'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Extra field to include is by default uid -$add = "userid"; +$add = 'userid'; // If nickname is installed the extra field is the nickname of the user -if (EXT_IS_ACTIVE("nickname")) $add = "nickname"; +if (EXT_IS_ACTIVE('nickname')) $add = 'nickname'; // Check for members who were active only this day $result = SQL_QUERY_ESC("SELECT userid, ".$add.", last_online @@ -64,9 +64,9 @@ ORDER BY last_online DESC LIMIT %s", // Entries found? if (SQL_NUMROWS($result) > 0) { // At least one member was online so let's load them all - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; while (list($uid, $nick, $last) = SQL_FETCHROW($result)) { - $nick2 = "---"; + $nick2 = '---'; if (($nick != $uid) && (!empty($nick))) $nick2 = $nick; // Transfer data to array @@ -74,26 +74,26 @@ if (SQL_NUMROWS($result) > 0) { 'sw' => $SW, 'uid' => $uid, 'nick' => $nick2, - 'points' => TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points")), - 'last' => MAKE_DATETIME($last, "2"), + 'points' => TRANSLATE_COMMA(GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points')), + 'last' => MAKE_DATETIME($last, '2'), ); // Load template - $OUT .= LOAD_TEMPLATE("guest_active_row", true, $content); + $OUT .= LOAD_TEMPLATE('guest_active_row', true, $content); // Switch colors $SW = 3 - $SW; } } else { // No member was online today! :-( - $OUT = LOAD_TEMPLATE("guest_active_none_row", true); + $OUT = LOAD_TEMPLATE('guest_active_none_row', true); } // Remember output in constant define('__ACTIVE_ROWS', $OUT); // Load template -LOAD_TEMPLATE("guest_active_table"); +LOAD_TEMPLATE('guest_active_table'); // ?>