* -------------------------------------------------------------------- *
* Kurzbeschreibung : Spezielle task-Funktionen *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: 856 $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: stelzi $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
// Init variables/arrays
$EXTRAS = "";
$OUT = "";
- INIT_SQLS();
$WHATs = array();
$DESCRs = array();
$TITLEs = array();
// Chheck for new extensions and updates
$JOBS_DONE = OUTPUT_STANDARD_OVERVIEW($result_main);
+ // Init SQLs
+ INIT_SQLS();
+
if (!$JOBS_DONE) {
// New extensions or updates found
$value = GET_TOTAL_DATA(GET_CURRENT_ADMIN_ID(), "task_system", "id", "assigned_admin", true, " AND `status`='NEW' AND task_type='EXTENSION_UPDATE'");
define('__MAIL_BONUS_AP_VALUE', "0");
}
} elseif (EXT_IS_ACTIVE("bonus")) {
- define('__MAIL_BONUS_AP_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2);
+ define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8")));
} else {
- define('__MAIL_BONUS_AP_VALUE', "<div class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</div>");
+ define('__MAIL_BONUS_AP_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>");
}
} else {
- define('__MAIL_BONUS_AP_VALUE', "<div class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</div>");
- define('__MAIL_DELETED_VALUE', "<div class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</div>");
+ define('__MAIL_BONUS_AP_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>");
+ define('__MAIL_DELETED_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</span>");
}
//
define('__MAIL_BONUS_SEND_VALUE', "0");
}
} elseif (EXT_IS_ACTIVE("bonus")) {
- define('__MAIL_BONUS_SEND_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2);
+ define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8")));
} else {
define('__MAIL_BONUS_SEND_VALUE', getMessage('ADMIN_EXT_BONUS_404'));
}
} // END - if
// Check for more extensions
+ // @TODO These can be rewritten to filter
if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
//
function TASK_CREATE_EXTRA_ROWS ($WHATs, $DESCRs, $TITLEs) {
// Init variables
- $OUT = ""; $SW = 2; $MAX = COUNT_SQLS() - 1;
+ $OUT = ""; $SW = 2;
// Sadly this cannot be rewritten to a filter... :(
foreach (GET_SQLS() as $key => $sql) {
// Free result
SQL_FREERESULT($result);
+ // Prepare array for output
$content = array(
'row_descr' => $DESCRs[$key],
'row_sw' => $SW,
'bottom' => "",
);
- if ($key < $MAX) $content['bottom'] = "bottom2";
+ // Rewrite CSS class if not last entry is reached
+ if ($key < (COUNT_SQLS() - 1)) $content['bottom'] = "bottom2";
+
if (($value > 0) && (!empty($WHATs[$key]))) {
if (empty($TITLEs[$key])) $TITLEs[$key] = getMessage('ADMIN_TASK_UNKNOWN_LIST_TITLE');
$content['row_link'] = "<a href=\"{!URL!}/modules.php?module=admin&what=".$WHATs[$key]."\" title=\"".$TITLEs[$key]."\">".$value."</a>";
$content['row_link'] = 0;
}
- // Switch color
- $SW = 3 - $SW;
-
// And insert the final string into extras template
$OUT .= LOAD_TEMPLATE("admin_overview_task_rows", true, $content);
+
+ // Switch color
+ $SW = 3 - $SW;
} // END - if
- // Return output
+ // Return output in the template
return LOAD_TEMPLATE("admin_overview_task_extras", true, $OUT);
}
+
//
?>