-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 08/27/2004 *\r
- * ================ Last change: 08/27/2004 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : what-stats_mods.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Module statistics *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Modul-Statistiken *\r
- * -------------------------------------------------------------------- *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 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'])) || (!IS_ADMIN()))\r
-{\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
- require($INC);\r
-}\r
-\r
-// Add description as navigation point\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-// If var is empty set it to empty\r
-if (empty($_GET['mod'])) $_GET['mod'] = "";\r
-\r
-// Check if module was selected\r
-if (($_GET['mod'] == "index") || ($_GET['mod'] == "login"))\r
-{\r
- // Select menu system\r
- $mod = "";\r
- switch ($_GET['mod'])\r
- {\r
- case "index": $mod = "guest" ; break;\r
- case "login": $mod = "member"; break;\r
- }\r
-\r
- // Load module's detail statistic\r
- $result = SQL_QUERY("SELECT action, title, counter FROM "._MYSQL_PREFIX."_".$mod."_menu WHERE what != '' ORDER BY counter DESC", __FILE__, __LINE__);\r
- $SW = 2; $OUT = "";\r
- while(list($act, $title, $clicks) = SQL_FETCHROW($result))\r
- {\r
- // Prepare array for the template\r
- $content = array(\r
- 'sw' => $SW,\r
- 'title' => $title,\r
- 'action' => $act,\r
- 'clicks' => $clicks,\r
- );\r
-\r
- // Load row template\r
- $OUT .= LOAD_TEMPLATE("admin_mods_stats2_row", true, $content);\r
-\r
- // Switch colors\r
- $SW = 3 - $SW;\r
- }\r
-\r
- // Free memory\r
- SQL_FREERESULT($result);\r
- define('__MODS_ROWS', $OUT);\r
-\r
- // Load final template\r
- LOAD_TEMPLATE("admin_mods_stats2");\r
-}\r
- else\r
-{\r
- // Load module statics\r
- $result = SQL_QUERY("SELECT module, title, clicks FROM "._MYSQL_PREFIX."_mod_reg ORDER BY clicks DESC, module", __FILE__, __LINE__);\r
- $SW = 2; $OUT = "";\r
- while(list($mod, $title, $clicks) = SQL_FETCHROW($result))\r
- {\r
- if (empty($title)) $title = "---";\r
- if (($mod == "index") || ($mod == "login"))\r
- {\r
- // Add link to detail statistics\r
- $mod = "<STRONG><A href=\"".URL."/modules.php?module=admin&what=stats_mods&mod=".$mod."\">".$mod."</A></STRONG>";\r
- }\r
- // Prepare array for the template\r
- $content = array(\r
- 'sw' => $SW,\r
- 'title' => $title,\r
- 'mod' => $mod,\r
- 'clicks' => $clicks,\r
- );\r
-\r
- // Load row template\r
- $OUT .= LOAD_TEMPLATE("admin_mods_stats_row", true, $content);\r
- }\r
-\r
- // Free memory\r
- SQL_FREERESULT($result);\r
- define('__MODS_ROWS', $OUT);\r
-\r
- // Load final template\r
- LOAD_TEMPLATE("admin_mods_stats");\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/27/2004 *
+ * ================ Last change: 08/27/2004 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-stats_mods.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Module statistics *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Modul-Statistiken *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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'])) || (!IS_ADMIN()))
+{
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+// If var is empty set it to empty
+if (empty($_GET['mod'])) $_GET['mod'] = "";
+
+// Check if module was selected
+if (($_GET['mod'] == "index") || ($_GET['mod'] == "login"))
+{
+ // Select menu system
+ $mod = "";
+ switch ($_GET['mod'])
+ {
+ case "index": $mod = "guest" ; break;
+ case "login": $mod = "member"; break;
+ }
+
+ // Load module's detail statistic
+ $result = SQL_QUERY("SELECT action, title, counter FROM "._MYSQL_PREFIX."_".$mod."_menu WHERE what != '' ORDER BY counter DESC", __FILE__, __LINE__);
+ $SW = 2; $OUT = "";
+ while(list($act, $title, $clicks) = SQL_FETCHROW($result))
+ {
+ // Prepare array for the template
+ $content = array(
+ 'sw' => $SW,
+ 'title' => $title,
+ 'action' => $act,
+ 'clicks' => $clicks,
+ );
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("admin_mods_stats2_row", true, $content);
+
+ // Switch colors
+ $SW = 3 - $SW;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ define('__MODS_ROWS', $OUT);
+
+ // Load final template
+ LOAD_TEMPLATE("admin_mods_stats2");
+}
+ else
+{
+ // Load module statics
+ $result = SQL_QUERY("SELECT module, title, clicks FROM "._MYSQL_PREFIX."_mod_reg ORDER BY clicks DESC, module", __FILE__, __LINE__);
+ $SW = 2; $OUT = "";
+ while(list($mod, $title, $clicks) = SQL_FETCHROW($result))
+ {
+ if (empty($title)) $title = "---";
+ if (($mod == "index") || ($mod == "login"))
+ {
+ // Add link to detail statistics
+ $mod = "<STRONG><A href=\"".URL."/modules.php?module=admin&what=stats_mods&mod=".$mod."\">".$mod."</A></STRONG>";
+ }
+ // Prepare array for the template
+ $content = array(
+ 'sw' => $SW,
+ 'title' => $title,
+ 'mod' => $mod,
+ 'clicks' => $clicks,
+ );
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("admin_mods_stats_row", true, $content);
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ define('__MODS_ROWS', $OUT);
+
+ // Load final template
+ LOAD_TEMPLATE("admin_mods_stats");
+}
+//
+?>