incrementConfigEntry('cache_hits');
// Include more admins data?
- if (GET_EXT_VERSION("admins") >= "0.7.0") {
+ if (GET_EXT_VERSION("admins") >= "0.7.2") {
// Load them here
$data['login_failures'] = $GLOBALS['cache_array']['admins']['login_failures'][$aid];
$data['last_failure'] = $GLOBALS['cache_array']['admins']['last_failure'][$aid];
$OUT .= "<tr>
<td class=\"admin_menu\" colspan=\"2\">
<nobr> <strong>·</strong> ";
+
if (($menu == $act) && (empty($wht))) {
$OUT .= "<strong>";
} else {
} else {
$OUT .= "</a>]";
}
+
$OUT .= "</nobr></td>
</tr>\n";
+
+ // Check for menu entries
$result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
array($menu), __FUNCTION__, __LINE__);
- if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
- {
+ if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)) {
$GLOBALS['menu']['description'] = array();
$GLOBALS['menu']['title'] = array(); $SUB = true;
$OUT .= "<tr>
</td>
</tr>\n";
}
+
$OUT .= "<tr><td height=\"7\" colspan=\"2\"></td></tr>\n";
}
}
// Return contents
return $OUT;
}
-//
+
+// Creates a user-profile link for the admin. This function can also be used for many other purposes
function ADMIN_USER_PROFILE_LINK ($uid, $title="", $wht="list_user") {
if (($title == "") && ($title != "0")) {
// Set userid as title
// Return result
return $valid;
}
+
// Reset the password for the login. Do NOT call this function without calling above function first!
function ADMIN_RESET_PASSWORD ($login, $password) {
// Init hash
// Return output
return ADMIN_PASSWORD_RESET_DONE;
}
+
// Solves a task by given id number
function ADMIN_SOLVE_TASK ($id) {
// Update the task data
ADMIN_UPDATE_TASK_DATA($id, "status", "SOLVED");
}
+
// Marks a given task as deleted
function ADMIN_DELETE_TASK ($id) {
// Update the task data
ADMIN_UPDATE_TASK_DATA($id, "status", "DELETED");
}
+
// Function to update task data
function ADMIN_UPDATE_TASK_DATA ($id, $row, $data) {
// Is the id not set, then we need a backtrace here... :(