-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 02/02/2004 *\r
- * ================ Last change: 11/26/2004 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : action-online.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Who is where? (DO NOT add sub menus!) *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Wer ist wo? (KEINE Untermenues anhaengen!) *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2007 by Roland Haeder *\r
- * For more information visit: http://www.mxchange.org *\r
- * *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or *\r
- * (at your option) any later version. *\r
- * *\r
- * This program is distributed in the hope that it will be useful, *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
- * GNU General Public License for more details. *\r
- * *\r
- * You should have received a copy of the GNU General Public License *\r
- * along with this program; if not, write to the Free Software *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *\r
- * MA 02110-1301 USA *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))\r
-{\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";\r
- require($INC);\r
-}\r
- elseif (!EXT_IS_ACTIVE("online"))\r
-{\r
- // Just skip this extension\r
- return;\r
-}\r
-\r
-$result_guests = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='N'", __FILE__, __LINE__);\r
-$result_members = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='N' AND is_member='Y'", __FILE__, __LINE__);\r
-$result_admins = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_online WHERE is_admin='Y'", __FILE__, __LINE__);\r
-\r
-// Total visitors online\r
-$total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins);\r
-if ($CONFIG['mad_counter'] < $total)\r
-{\r
- // Update counter\r
- $CONFIG['mad_counter'] = $total;\r
- $CONFIG['last_mad'] = time();\r
- $result_mad = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET mad_timestamp=%d, mad_count='%s' WHERE config='0' LIMIT 1",\r
- array($CONFIG['last_mad'], $CONFIG['mad_counter']), __FILE__, __LINE__);\r
-\r
- // Destroy cache\r
-}\r
-\r
-// Put all values in constants for the template\r
-define('GUESTS_ONLINE_CNT' , SQL_NUMROWS($result_guests));\r
-define('MEMBERS_ONLINE_CNT', SQL_NUMROWS($result_members));\r
-define('ADMINS_ONLINE_CNT' , SQL_NUMROWS($result_admins));\r
-\r
-// Output table\r
-LOAD_TEMPLATE("online_now");\r
-\r
-if (EXT_IS_ACTIVE("active"))\r
-{\r
- // Add link to "we were active today" page\r
- LOAD_TEMPLATE("guest_menu_bottom", false, "<A class=\"menu_blur\" href=\"".URL."/modules.php?module=index&what=active\">".$CONFIG['middot'].GUEST_ACTIVE_LINK."</A>");\r
-}\r
-\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 02/02/2004 *
+ * ================ Last change: 11/26/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : action-online.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Who is where? (DO NOT add sub menus!) *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Wer ist wo? (KEINE Untermenues anhaengen!) *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
+{
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+ elseif (!EXT_IS_ACTIVE("online"))
+{
+ // Just skip this extension
+ 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__);
+
+// Total visitors online
+$total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins);
+if ($CONFIG['mad_counter'] < $total)
+{
+ // Update counter
+ $CONFIG['mad_counter'] = $total;
+ $CONFIG['last_mad'] = time();
+ $result_mad = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET mad_timestamp=%d, mad_count='%s' WHERE config='0' LIMIT 1",
+ array($CONFIG['last_mad'], $CONFIG['mad_counter']), __FILE__, __LINE__);
+
+ // Destroy cache
+}
+
+// Put all values in constants for the template
+define('GUESTS_ONLINE_CNT' , SQL_NUMROWS($result_guests));
+define('MEMBERS_ONLINE_CNT', SQL_NUMROWS($result_members));
+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, "<A class=\"menu_blur\" href=\"".URL."/modules.php?module=index&what=active\">".$CONFIG['middot'].GUEST_ACTIVE_LINK."</A>");
+}
+
+//
+?>