X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Faction-online.php;h=af639eba1795736ba56a2b7459c1458faaac732f;hb=debaac55fafff501de5077f3672623c0d738a5b2;hp=ec2317cbb5cc84d39afc0fb4b0960cee0836882d;hpb=c67165a2e80230515a0c0897ee53bb177f7d88dd;p=mailer.git diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index ec2317cbb5..af639eba17 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Wer ist wo? (KEINE Untermenues anhaengen!) * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: stelzi $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -32,30 +37,27 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} - elseif (!EXT_IS_ACTIVE("online")) -{ +} elseif ((!EXT_IS_ACTIVE("online")) && (!IS_ADMIN())) { // Just skip this extension return; +} elseif (defined('GUESTS_ONLINE_CNT')) { + // Skip it if already executed + return; } -$result_guests = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__); -$result_members = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__); -$result_admins = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='Y'", __FILE__, __LINE__); +$result_guests = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_online` WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__); +$result_members = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_online` WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__); +$result_admins = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_online` WHERE is_admin='Y'", __FILE__, __LINE__); // Total visitors online $total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins); -if ($_CONFIG['mad_counter'] < $total) -{ +if (getConfig('mad_count') < $total) { // Update counter UPDATE_CONFIG(array("mad_timestamp", "mad_count"), array(time(), $total)); - $_CONFIG['mad_counter'] = $total; - $_CONFIG['last_mad'] = time(); -} +} // END - if // Put all values in constants for the template define('GUESTS_ONLINE_CNT' , SQL_NUMROWS($result_guests)); @@ -65,11 +67,8 @@ define('ADMINS_ONLINE_CNT' , SQL_NUMROWS($result_admins)); // Output table LOAD_TEMPLATE("online_now"); -if (EXT_IS_ACTIVE("active")) -{ - // Add link to "we were active today" page - LOAD_TEMPLATE("guest_menu_bottom", false, "".$_CONFIG['menu_blur_spacer'].GUEST_ACTIVE_LINK.""); -} +// Add more links in this block +runFilterChain('online_extra_links'); // ?>