+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `%s`='%s' WHERE `id`=%s LIMIT 1",
+ array(
+ $row,
+ $data,
+ bigintval($id)
+ ), __FUNCTION__, __LINE__);
+}
+
+// Checks wether if the admin menu has entries
+function ifAdminMenuHasEntries ($action) {
+ return (
+ ((
+ // Is the entry set?
+ isset($GLOBALS['admin_menu_has_entries'][$action])
+ ) && (
+ // And do we have a menu for this action?
+ $GLOBALS['admin_menu_has_entries'][$action] === true
+ )) || (
+ // Login has always a menu
+ $action == 'login'
+ )
+ );
+}
+
+// Setter for 'admin_menu_has_entries'
+function setAdminMenuHasEntries ($action, $hasEntries) {
+ $GLOBALS['admin_menu_has_entries'][$action] = (bool) $hasEntries;
+}
+
+// Creates a link to the user's admin-profile
+function adminCreateUserLink ($userid) {
+ // Is the userid set correctly?
+ if ($userid > 0) {
+ // Create a link to that profile
+ return '{%url=modules.php?module=admin&what=list_user&userid=' . bigintval($userid) . '%}';
+ } // END - if
+
+ // Return a link to the user list
+ return '{%url=modules.php?module=admin&what=list_user%}';
+}
+
+// Generate a "link" for the given admin id (admin_id)
+function generateAdminLink ($adminId) {
+ // No assigned admin is default
+ $adminLink = '<span class="admin_note">{--ADMIN_NO_ADMIN_ASSIGNED--}</span>';
+
+ // Zero? = Not assigned
+ if (bigintval($adminId) > 0) {
+ // Load admin's login
+ $login = getAdminLogin($adminId);
+
+ // Is the login valid?
+ if ($login != '***') {
+ // Is the extension there?
+ if (isExtensionActive('admins')) {
+ // Admin found
+ $adminLink = '<a href="' . generateEmailLink(getAdminEmail($adminId), 'admins') . '" title="{--ADMIN_CONTACT_LINK_TITLE--}">' . $login . '</a>';
+ } else {
+ // Extension not found
+ $adminLink = getMaskedMessage('EXTENSION_PROBLEM_NOT_INSTALLED', 'admins');
+ }
+ } else {
+ // Maybe deleted?
+ $adminLink = '<div class="admin_note">' . getMaskedMessage('ADMIN_ID_404', $adminId) . '</div>';
+ }
+ } // END - if
+
+ // Return result
+ return $adminLink;