]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/admin/what-list_task.php
branched
[mailer.git] / 0.2.1 / inc / modules / admin / what-list_task.php
diff --git a/0.2.1/inc/modules/admin/what-list_task.php b/0.2.1/inc/modules/admin/what-list_task.php
deleted file mode 100644 (file)
index 20c2b1b..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 08/03/2004 *
- * ================                             Last change: 08/07/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-list_task.php                               *
- * -------------------------------------------------------------------- *
- * Short description : List all tasks                                   *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Alle Aufgaben auflisten                          *
- * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * 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__));
-
-$WHERE = "";
-if (empty($_GET['type'])) $_GET['type'] = "your";
-
-switch ($_GET['type'])
-{
-case "your": // List only your own open (new) tasks
-       $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='NEW' AND task_type != 'EXTENSION_UPDATE'";
-       break;
-
-case "updates": // List only updates assigned to you
-       $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='NEW' AND task_type = 'EXTENSION_UPDATE'";
-       break;
-
-case "solved": // List only solved tasks assigned to you
-       $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='SOLVED'";
-       break;
-
-case "unassigned": // List unassigned (but not deleted) tasks
-       $WHERE = "assigned_admin='0' AND status != 'DELETED'";
-       break;
-
-case "deleted": // List all deleted
-       $WHERE = "status='DELETED'";
-       break;
-
-case "closed": // List all closed
-       $WHERE = "assigned_admin='".GET_ADMIN_ID($_COOKIE['admin_login'])."' AND status='CLOSED'";
-       break;
-
-default: // Unknown type
-       LOAD_TEMPLATE("admin_settings_saved", false, TASK_ADMIN_UNKNOWN_MODE_1.$_GET['type'].TASK_ADMIN_UNKNOWN_MODE_2);
-       break;
-}
-
-if (!empty($WHERE))
-{
-       $SEL = 0;
-       if (isset($_POST['task'])) $SEL = SELECTION_COUNT($_POST['task']);
-       if ((isset($_POST['assign'])) && ($SEL > 0))
-       {
-               // Assign / do tasks
-               require_once(PATH."inc/modules/admin/overview-inc.php");
-               if (empty($dmy)) $dmy = "";
-               OUTPUT_SELECTED_TASKS($_POST, $dmy);
-       }
-        else
-       {
-               // Start listing tasks matching selected filter
-               $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created
-FROM "._MYSQL_PREFIX."_task_system
-WHERE ".$WHERE."
-ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __LINE__);
-               if (($SEL > 0) && (!IS_DEMO()))
-               {
-                       // Only unassign / delete tasks when there are selected tasks posted
-                       if (isset($_POST['unassign']))
-                       {
-                               // Unassign from tasks
-                               foreach ($_POST['task'] as $id=>$sel)
-                               {
-                                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin='0' WHERE id=%d AND assigned_admin='%s' LIMIT 1",
-                                        array(bigintval($id), GET_ADMIN_ID($_COOKIE['admin_login'])), __FILE__, __LINE__);
-                               }
-                       }
-                        elseif (isset($_POST['del']))
-                       {
-                               // Delete tasks
-                               foreach ($_POST['task'] as $id=>$sel)
-                               {
-                                       if ($_GET['type'] == "deleted")
-                                       {
-                                               // Delete task immediately
-                                               $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%d LIMIT 1",
-                                                array(bigintval($id)),__FILE__, __LINE__);
-                                       }
-                                        else
-                                       {
-                                               // Mark task as to be deleted (purged by autppurge extension)
-                                               $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET status='DELETED' WHERE id=%d LIMIT 1",
-                                                array(bigintval($id)), __FILE__, __LINE__);
-                                       }
-                               }
-                       }
-
-                       // Update query
-                       $result_tasks = SQL_QUERY("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM "._MYSQL_PREFIX."_task_system WHERE ".$WHERE." ORDER BY subject, task_created DESC", __FILE__, __LINE__);
-               }
-
-               // There are uncompleted jobs!
-               $eval = "\$TYPE = ADMIN_OVERVIEW_TASK_".strtoupper($_GET['type'])."_TYPE;";
-               eval($eval);
-               LOAD_TEMPLATE("admin_overview_header_task", false, array(
-                       'message' => $TYPE,
-                       'type'    => $_GET['type']
-               ));
-               $SW = 2;
-               while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks))
-               {
-                       $infos = "---";
-                       if ($admin == "0")
-                       {
-                               // No admin currently is assigned
-                               $admin = "<FONT class=\"admin_note\">".ADMIN_NO_ADMIN_ASSIGNED."</FONT>";
-                       }
-                        else
-                       {
-                               // Load admin's data
-                               $login = GET_ADMIN_LOGIN($admin);
-                               if ($login != "***")
-                               {
-                                       // Admin found
-                                       $admin = "<A href=\"".URL."/modules.php?module=admin&amp;what=admins_contct&amp;admin=".$admin."\">".$login."</A>";
-                               }
-                                else
-                               {
-                                       // Maybe deleted?
-                                       $admin = "<FONT class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</FONT>";
-                               }
-                       }
-                       $evl = "\$type_out = ADMIN_TASK_IS_".strtoupper($type).";";
-                       eval($evl);
-                       $type2 = substr($text, 0, strpos($text, ":"));
-                       // Generate infos
-                       switch ($type)
-                       {
-                       case "EXTENSION":
-                       case "EXTENSION_UPDATE":
-                               $infos = substr($subj, 1, strpos($subj, ":") - 1);
-                               break;
-                       }
-                       if ($uid > 0)
-                       {
-                               // Member found otherwise it's a system task
-                               $uid = ADMIN_USER_PROFILE_LINK($uid);
-                       }
-                        else
-                       {
-                               $uid = "<I>".ADMIN_IS_SYSTEM_TASK."</I>";
-                       }
-                       $content = array(
-                               'sw'      => $SW,
-                               'id'      => $id,
-                               'admin'   => $admin,
-                               'infos'   => $infos,
-                               'uid'     => $uid,
-                               'type'    => $type_out,
-                               'created' => MAKE_DATETIME($created, "2")
-                       );
-                       LOAD_TEMPLATE("admin_list_task_rows", false, $content);
-                       $SW = 3 - $SW;
-               }
-
-               // Free memory
-               SQL_FREERESULT($result_tasks);
-
-               // Load footer template
-               if ($_GET['type'] == "deleted")
-               {
-                       // Delete now button
-                       LOAD_TEMPLATE("admin_overview_footer_task");
-               }
-                else
-               {
-                       // Normal footer
-                       LOAD_TEMPLATE("admin_overview_footer");
-               }
-       }
-}
-//
-?>