-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1 Start: 08/03/2004 *\r
- * ================ Last change: 11/19/2005 *\r
- * *\r
- * -------------------------------------------------------------------- *\r
- * File : task_functions.php *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Special task functions *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung : Spezielle task-Funktionen *\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'])) {\r
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
- require($INC);\r
-}\r
-//\r
-// The advanced overview shows detailed informations to your exchange script:\r
-// - Unconfirmed / locked accounts\r
-// - Mails waiting to be approved\r
-// - Open tasks\r
-// - Your own tasks\r
-// - ...\r
-//\r
-function OUTPUT_ADVANCED_OVERVIEW (&$result_main)\r
-{\r
- global $_COOKIE, $CONFIG;\r
-\r
- // Init variables/arrays\r
- $EXTRAS = ""; $OUT = ""; $SQLs = array(); $WHATs = array(); $DESCRs = array(); $TITLEs = array();\r
-\r
- // Chheck for new extensions and updates\r
- $JOBS_DONE = OUTPUT_STANDARD_OVERVIEW($result_main);\r
-\r
- if (!$JOBS_DONE) {\r
- // New extensions or updates found\r
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND status='NEW' AND task_type='EXTENSION_UPDATE'",\r
- array(GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__);\r
-\r
- $value = SQL_NUMROWS($result);\r
- SQL_FREERESULT($result);\r
-\r
- if ($value > 0) {\r
- define ('__TASK_UPDATE_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_task&type=updates\">".$value."</A>");\r
- } else {\r
- define ('__TASK_UPDATE_VALUE', "0");\r
- }\r
- } else {\r
- define ('__TASK_UPDATE_VALUE', "0");\r
- }\r
-\r
- //\r
- // First check for all account status seperately\r
- //\r
- // Confirmed accounts\r
- $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__);\r
- $value = SQL_NUMROWS($result);\r
- SQL_FREERESULT($result);\r
-\r
- if ($value > 0) {\r
- define('__CONFIRMED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&mode=confirmed\">".$value."</A>");\r
- } else {\r
- define('__CONFIRMED_VALUE', "0");\r
- }\r
-
- // Unconfirmed accounts\r
- $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED'", __FILE__, __LINE__);\r
- $value = SQL_NUMROWS($result);\r
- SQL_FREERESULT($result);\r
-\r
- if ($value > 0) {\r
- define('__UNCONFIRMED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=chk_regs\">".$value."</A>");\r
- } else {\r
- define('__UNCONFIRMED_VALUE', "0");\r
- }\r
-
- // And locked accounts\r
- $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='LOCKED'", __FILE__, __LINE__);\r
- $value = SQL_NUMROWS($result);\r
- SQL_FREERESULT($result);\r
-\r
- if ($value > 0) {\r
- define('__LOCKED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&mode=locked\">".$value."</A>");\r
- } else {\r
- define('__LOCKED_VALUE', "0");\r
- }\r
-
- //\r
- // Unassigned tasks\r
- //\r
- $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='0' AND status != 'DELETED'", __FILE__, __LINE__);\r
- $value = SQL_NUMROWS($result);\r
- SQL_FREERESULT($result);\r
-\r
- if ($value > 0) {\r
- define('__TASK_NEW_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_task&type=unassigned\">".$value."</A>");\r
- } else {\r
- define('__TASK_NEW_VALUE', "0");\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/03/2004 *
+ * ================ Last change: 11/19/2005 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : task_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Special task functions *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Spezielle task-Funktionen *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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);
+}
+//
+// The advanced overview shows detailed informations to your exchange script:
+// - Unconfirmed / locked accounts
+// - Mails waiting to be approved
+// - Open tasks
+// - Your own tasks
+// - ...
+//
+function OUTPUT_ADVANCED_OVERVIEW (&$result_main)
+{
+ global $_COOKIE, $CONFIG;
+
+ // Init variables/arrays
+ $EXTRAS = ""; $OUT = ""; $SQLs = array(); $WHATs = array(); $DESCRs = array(); $TITLEs = array();
+
+ // Chheck for new extensions and updates
+ $JOBS_DONE = OUTPUT_STANDARD_OVERVIEW($result_main);
+
+ if (!$JOBS_DONE) {
+ // New extensions or updates found
+ $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='%s' AND status='NEW' AND task_type='EXTENSION_UPDATE'",
+ array(GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__);
+
+ $value = SQL_NUMROWS($result);
+ SQL_FREERESULT($result);
+
+ if ($value > 0) {
+ define ('__TASK_UPDATE_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_task&type=updates\">".$value."</A>");
+ } else {
+ define ('__TASK_UPDATE_VALUE', "0");
+ }
+ } else {
+ define ('__TASK_UPDATE_VALUE', "0");
+ }
+
+ //
+ // First check for all account status seperately
+ //
+ // Confirmed accounts
+ $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__);
+ $value = SQL_NUMROWS($result);
+ SQL_FREERESULT($result);
+
+ if ($value > 0) {
+ define('__CONFIRMED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&mode=confirmed\">".$value."</A>");
+ } else {
+ define('__CONFIRMED_VALUE', "0");
+ }
+
+ // Unconfirmed accounts
+ $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED'", __FILE__, __LINE__);
+ $value = SQL_NUMROWS($result);
+ SQL_FREERESULT($result);
+
+ if ($value > 0) {
+ define('__UNCONFIRMED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=chk_regs\">".$value."</A>");
+ } else {
+ define('__UNCONFIRMED_VALUE', "0");
+ }
+
+ // And locked accounts
+ $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='LOCKED'", __FILE__, __LINE__);
+ $value = SQL_NUMROWS($result);
+ SQL_FREERESULT($result);
+
+ if ($value > 0) {
+ define('__LOCKED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&mode=locked\">".$value."</A>");
+ } else {
+ define('__LOCKED_VALUE', "0");
+ }
+
+ //
+ // Unassigned tasks
+ //
+ $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE assigned_admin='0' AND status != 'DELETED'", __FILE__, __LINE__);
+ $value = SQL_NUMROWS($result);
+ SQL_FREERESULT($result);
+
+ if ($value > 0) {
+ define('__TASK_NEW_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_task&type=unassigned\">".$value."</A>");
+ } else {
+ define('__TASK_NEW_VALUE', "0");