break;
default: // Unknown type
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $_GET['type']));
LOAD_TEMPLATE("admin_settings_saved", false, TASK_ADMIN_UNKNOWN_MODE_1.$_GET['type'].TASK_ADMIN_UNKNOWN_MODE_2);
break;
}
}
// There are uncompleted jobs!
- $eval = "\$type = ADMIN_OVERVIEW_TASK_".strtoupper($_GET['type'])."_TYPE;";
- eval($eval);
+ $type = constant('ADMIN_OVERVIEW_TASK_'.strtoupper($_GET['type']).'_TYPE');
LOAD_TEMPLATE("admin_overview_header_task", false, array(
'message' => $type,
'type' => $_GET['type']
$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);
+
+ // Get admin task
+ $type_out = constant('ADMIN_TASK_IS_'.strtoupper($type).'');
+
$type2 = substr($text, 0, strpos($text, ":"));
// Generate infos
switch ($type)
$infos = substr($subj, 1, strpos($subj, ":") - 1);
break;
}
- if ($uid > 0)
- {
+
+ // Member assigned with task?
+ if ($uid > 0) {
// Member found otherwise it's a system task
$uid = ADMIN_USER_PROFILE_LINK($uid);
- }
- else
- {
+ } else {
+ // Is a system task!
$uid = "<I>".ADMIN_IS_SYSTEM_TASK."</I>";
}
+
+ // Prepare content
$content = array(
'sw' => $SW,
'id' => $id,
'type' => $type_out,
'created' => MAKE_DATETIME($created, "2")
);
- LOAD_TEMPLATE("admin_list_task_rows", false, $content);
+
+ // Do we have an extension task?
+ if ($type == "EXTENSION") {
+ // Load extension row template
+ LOAD_TEMPLATE("admin_list_task_ext_rows", false, $content);
+ } else {
+ // Load default row template
+ LOAD_TEMPLATE("admin_list_task_rows", false, $content);
+ }
+
+ // Switch colors
$SW = 3 - $SW;
}