+++ /dev/null
-<?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>");
-}
-
-//
-?>