* -------------------------------------------------------------------- *
* Kurzbeschreibung : Standart-Aufgaben-Management ausgeben *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Standart-Aufgaben-Management ausgeben *
* -------------------------------------------------------------------- *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
// First check for solved and not assigned tasks and assign them to current admin
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
// First check for solved and not assigned tasks and assign them to current admin
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET assigned_admin='%s' WHERE assigned_admin < 1 AND status != 'NEW'",
array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
require(sprintf("%sinc/extensions/ext-%s.php", constant('PATH'), $ext_name));
// Update extension if extension is installed and outdated
require(sprintf("%sinc/extensions/ext-%s.php", constant('PATH'), $ext_name));
// Update extension if extension is installed and outdated
- //* DEBUG: */ print "ext={$ext_name},ver={$EXT_VERSION}/".GET_EXT_VERSION($ext_name)."<br />\n";
- if ($EXT_VERSION > $ext_ver) {
+ //* DEBUG: */ print "ext={$ext_name},ver={EXT_GET_VERSION()}/".GET_EXT_VERSION($ext_name)."<br />\n";
+ if (EXT_GET_VERSION() > $ext_ver) {
// Compile and insert text from task into table template
$text = LOAD_TEMPLATE("admin_extensions_text", true, $text);
// Initialize variables (no title for SQL commands by default)
$ext_name = "";
// Compile and insert text from task into table template
$text = LOAD_TEMPLATE("admin_extensions_text", true, $text);
// Initialize variables (no title for SQL commands by default)
$ext_name = "";
// Shall I list SQL commands assigned to an extension installation or update task?
if (((GET_EXT_VERSION("sql_patches") != '') && (getConfig('verbose_sql') == "Y")) || (!EXT_IS_ACTIVE("sql_patches"))) {
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
if ($type == "EXTENSION") {
// Load SQL commands for registering
// Shall I list SQL commands assigned to an extension installation or update task?
if (((GET_EXT_VERSION("sql_patches") != '') && (getConfig('verbose_sql') == "Y")) || (!EXT_IS_ACTIVE("sql_patches"))) {
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
if ($type == "EXTENSION") {
// Load SQL commands for registering
} elseif ($type == "EXTENSION_UPDATE") {
// Prepare extension name and version
$ext_name = substr($ext_name, 7);
} elseif ($type == "EXTENSION_UPDATE") {
// Prepare extension name and version
$ext_name = substr($ext_name, 7);
$ext_ver = substr($ext_ver, 0, strpos($ext_ver, ":"));
// Load SQLs from file
$ext_ver = substr($ext_ver, 0, strpos($ext_ver, ":"));
// Load SQLs from file
if (empty($title)) $title = "";
if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && (getConfig('verbose_sql') == "Y")) {
// Add verbose SQL table
if (empty($title)) $title = "";
if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && (getConfig('verbose_sql') == "Y")) {
// Add verbose SQL table
- $text .= EXTENSION_VERBOSE_TABLE($SQLs, $title, " class=\"admin_table top2 left2 right2\"", true, "100%")."<br />\n";
+ $text .= EXTENSION_VERBOSE_TABLE($title, " class=\"admin_table top2 left2 right2\"", true, "100%")."<br />\n";
case "EXTENSION": // Install new extensions
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
$result_lines = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
case "EXTENSION": // Install new extensions
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
$result_lines = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1",
// Close task but not already closes or deleted or update tasks
if (($status != "CLOSED") && ($status != "DELETED") && ($type != "EXTENSION_UPDATE")) {
// Solve the task
// Close task but not already closes or deleted or update tasks
if (($status != "CLOSED") && ($status != "DELETED") && ($type != "EXTENSION_UPDATE")) {
// Solve the task
// Only unassign / delete tasks when there are selected tasks posted
if (!empty($POST['unassign'])) {
// Unassign from tasks
// Only unassign / delete tasks when there are selected tasks posted
if (!empty($POST['unassign'])) {
// Unassign from tasks
// Update query
$result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM `{!_MYSQL_PREFIX!}_task_system` WHERE assigned_admin=%s OR (assigned_admin=0 AND `status`='NEW') ORDER BY task_created DESC",
// Update query
$result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM `{!_MYSQL_PREFIX!}_task_system` WHERE assigned_admin=%s OR (assigned_admin=0 AND `status`='NEW') ORDER BY task_created DESC",
- $SW = 2;
- while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks)) {
+ $OUT = ""; $SW = 2;
+ while ($content = SQL_FETCHARRAY($result_tasks)) {
- $infos = substr($subj, 1, strpos($subj, ":") - 1);
+ $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ":") - 1);
- 'id' => $id,
- 'admin' => $admin,
- 'infos' => $infos,
- 'uid' => $uid,
- 'type' => $type_out,
- 'created' => MAKE_DATETIME($created, "2")
- );
+ 'admin' => $content['assigned_admin'],
+ 'uid' => $content['userid'],
+ 'type' => $content['task_type_msg'],
+ 'created' => MAKE_DATETIME($content['task_created'], "2")
+ ));
LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content);
} else {
// Load default row template
LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content);
} else {
// Load default row template