./inc/functions.php:156:// @TODO Rewrite this to an extension 'smtp'
./inc/functions.php:1940: // @TODO Find a way to cache this
./inc/functions.php:2041: // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2233: // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:2236: // @TODO Rename column data_type to e.g. mail_status
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
./inc/language/de.php:1071: // @TODO Rewrite these two constants
./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings *
./inc/language/refback_de.php:53: // @TODO Rewrite these constants to one
./inc/language/sponsor_de.php:117:// @TODO Rewrite these four constants to one and use sprintf()
-./inc/libs/admins_functions.php:474: // @TODO This can be, somehow, rewritten
+./inc/libs/admins_functions.php:505: // @TODO This can be, somehow, rewritten
./inc/libs/bonus_functions.php:194: // @TODO Move this HTML to a template
./inc/libs/doubler_functions.php:44:// @TODO Lame description
./inc/libs/doubler_functions.php:93: // @TODO Can't this be moved into EL?
./inc/mails/doubler_mails.php:53:// @TODO Can this be rewritten to a filter?
./inc/module-functions.php:267: // @TODO Nothing helped???
./inc/module-functions.php:308: // @TODO Rewrite this to a filter
-./inc/modules/admin/admin-inc.php:1373: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
+./inc/modules/admin/admin-inc.php:1379: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
./inc/modules/admin/admin-inc.php:171: // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
./inc/modules/admin/admin-inc.php:242: // @TODO This can be rewritten into a filter
./inc/modules/admin/admin-inc.php:274: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
./inc/modules/admin/admin-inc.php:340: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/modules/admin/admin-inc.php:438:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
+./inc/modules/admin/admin-inc.php:444:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
./inc/modules/admin/overview-inc.php:162: // @TODO Rewrite this to a filter
./inc/modules/admin/overview-inc.php:275: // @TODO Rewrite this to something with include files and/or filter
./inc/modules/admin/overview-inc.php:309: // @TODO This may also be rewritten to include files
./inc/modules/admin/what-admin_add.php:59: // @TODO Cant this be rewritten?
./inc/modules/admin/what-admin_add.php:75: // @TODO This can be somehow rewritten to a function
./inc/modules/admin/what-adminedit.php:56: // @TODO Kill all constants in this file
-./inc/modules/admin/what-admins_mails.php:59: // @TODO Can this be rewritten to an API function?
+./inc/modules/admin/what-admins_mails.php:58: // @TODO Can this be rewritten to an API function?
./inc/modules/admin/what-bonus.php:46:// @TODO Unused at the moment
./inc/modules/admin/what-config_mods.php:55: // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function
./inc/modules/admin/what-config_points.php:110: // @TODO Rewrite this to a filter
./inc/modules/admin/what-guest_add.php:67: // @TODO Cant this be rewritten?
./inc/modules/admin/what-guest_add.php:80: // @TODO This can be somehow rewritten to a function
./inc/modules/admin/what-holiday_list.php:46:// @TODO Unused at the moment
-./inc/modules/admin/what-list_admins_acls.php:108: // @TODO Rewrite this to a filter
-./inc/modules/admin/what-list_admins_acls.php:136: // @TODO Rewrite this to filter 'run_sqls'
+./inc/modules/admin/what-list_admins_acls.php:101: // @TODO Rewrite this to a filter
+./inc/modules/admin/what-list_admins_acls.php:129: // @TODO Rewrite this to filter 'run_sqls'
./inc/modules/admin/what-list_autopurge.php:47:// @TODO Rewrite those lines to filter
./inc/modules/admin/what-list_bonus.php:136: // @TODO Can't this be moved into our expression language?
./inc/modules/admin/what-list_cats.php:54: // @TODO No longer needed? define('__CATEGORIES_BASE' , '<a href="{%url=modules.php?module=admin&userid=');
./inc/modules/member/what-unconfirmed.php:162: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
./inc/modules/member/what-unconfirmed.php:227: // @TODO This 'userid' cannot be saved because of encapsulated EL code
./inc/modules/order.php:78: // @TODO Unused: 2,4
-./inc/mysql-manager.php:1275: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1339: // @TODO Rewrite these lines to a filter
-./inc/mysql-manager.php:1363: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1622: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1668:// @TODO Fix inconsistency between last_module and getWhat()
+./inc/mysql-manager.php:1381: // @TODO Rewrite these lines to a filter
+./inc/mysql-manager.php:1405: // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1664: // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1710:// @TODO Fix inconsistency between last_module and getWhat()
./inc/mysql-manager.php:387: // @TODO Try to rewrite this to one or more functions
./inc/mysql-manager.php:44:// @TODO Can we cache this?
./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/loader/load_cache-revision.php:2:// @DEPRECATED
./inc/loader/load_cache-them.php:2:// @DEPRECATED
./inc/loader/load-extensions.php:2:// @DEPRECATED
-./inc/modules/admin/admin-inc.php:439:// @DEPRECATED
+./inc/modules/admin/admin-inc.php:445:// @DEPRECATED
./inc/modules/admin/what-chk_regs.php:2:// @DEPRECATED
./inc/modules/admin/what-config_admins.php:2:// @DEPRECATED
./inc/modules/admin/what-config_email.php:2:// @DEPRECATED
loadCurrentExtensionInclude();
// Is this extension deprecated?
- if (isExtensionDeprecated()) {
+ if ((isExtensionDeprecated()) && (getExtensionMode() != 'test')) {
// Deactivate the extension
doDeactivateExtension($ext_name);
} // END - if
// Version of this extension
-setThisExtensionVersion('0.7.7');
+setThisExtensionVersion('0.7.8');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7'));
+setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
break;
case '0.6.7': // SQL queries for v0.6.7
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD `la_mode` ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim Ändern von Administratoren.");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Ausgangswert ist nicht mehr 0000-00-00 00:00:00, sondern NULL.");
break;
+
+ case '0.7.8': // SQL queries for v0.7.8
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Abgekürzte Bezeichnungen können für Missverständnisse am Code sorgen. Daher wurde der Spaltenalias <strong>def_acl</strong> entfernt.");
+ break;
} // END - switch
break;
function FILTER_ADD_EXTRA_SQL_DATA ($add = '') {
// Is the admins extension updated? (should be!)
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
- if (isExtensionInstalledAndNewer('admins', '0.3.0')) $add .= ', `default_acl` AS def_acl';
- if (isExtensionInstalledAndNewer('admins', '0.6.7')) $add .= ', `la_mode`';
- if (isExtensionInstalledAndNewer('admins', '0.7.2')) $add .= ', `login_failures`, UNIX_TIMESTAMP(`last_failure`) AS last_failure';
- if (isExtensionInstalledAndNewer('admins', '0.7.3')) $add .= ', `expert_settings`,`expert_warning`';
+ if (isExtensionInstalledAndNewer('admins', '0.3.0')) $add .= ',`default_acl`';
+ if (isExtensionInstalledAndNewer('admins', '0.6.7')) $add .= ',`la_mode`';
+ if (isExtensionInstalledAndNewer('admins', '0.7.2')) $add .= ',`login_failures`,UNIX_TIMESTAMP(`last_failure`) AS `last_failure`';
+ if (isExtensionInstalledAndNewer('admins', '0.7.3')) $add .= ',`expert_settings`,`expert_warning`';
// Return it
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $number;
}
-// Converts NULL into number zero
+// Converts a NULL to zero
function makeNullToZero ($number) {
- // Is this a NULL?
- if ((is_null($number)) || (empty($number))) {
- // Simply set it
+ // Is it a valid username?
+ if ((!is_null($number)) && (!empty($number)) && ($number > 0)) {
+ // Always secure it
+ $number = bigintval($number);
+ } else {
+ // Is not valid or zero
$number = '0';
- } // END - if
+ }
// Return it
return $number;
$id = bigintval($id);
// Get the admin's data
- $result = SQL_QUERY_ESC("SELECT `login`,`email`,`default_acl` AS mode, `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `login`,`email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
array($id), __FUNCTION__, __LINE__);
if ((SQL_NUMROWS($result) == 1) && ($selected == 1)) {
// Entry found
$content = SQL_FETCHARRAY($result);
- SQL_FREERESULT($result);
// Prepare some more data for the template
$content['id'] = $id;
// Shall we allow changing default ACL?
if ($currMode == 'allow') {
- // Allow chaning it
- $content['mode'] = generateOptionList('/ARRAY/', array('allow', 'deny'), array('{--ADMIN_ADMINS_ACCESS_MODE_ALLOW--}', '{--ADMIN_ADMINS_ACCESS_MODE_DENY--}'), $content['mode']);
+ // Allow changing it
+ $content['mode'] = '{%pipe,generateAdminAccessModeSelectionBox=' . $id . '%}';
} else {
// Don't allow it
$content['mode'] = ' ';
}
- $content['la_mode'] = generateOptionList('/ARRAY/', array('global', 'OLD', 'NEW'), array('{--ADMIN_ADMINS_LA_MODE_GLOBAL--}', '{--ADMIN_ADMINS_LA_MODE_OLD--}', '{--ADMIN_ADMINS_LA_MODE_NEW--}'), $content['la_mode']);
// Load row template and switch color
$OUT .= loadTemplate('admin_edit_admins_row', true, $content);
} // END - if
+
+ // Free result
+ SQL_FREERESULT($result);
} // END - foreach
// Load template
loadTemplate('admin_edit_admins', false, $OUT);
}
+// Generate access mode selection box for given admin id
+function generateAdminAccessModeSelectionBox ($adminId = NULL) {
+ // Start the selection box
+ $OUT = '<select name="mode[' . $adminId . ']" size="1" class="form_select">';
+
+ // Add option list
+ $OUT .= generateOptionList('/ARRAY/', array('allow', 'deny'), array('{--ADMIN_ADMINS_ACCESS_MODE_ALLOW--}', '{--ADMIN_ADMINS_ACCESS_MODE_DENY--}'), getAdminDefaultAcl($adminId));
+
+ // Finish it
+ $OUT .= '</select>';
+
+ // Return content
+ return $OUT;
+}
+
+// Generate menu mode selection box for given admin it
+function generateAdminMenuModeSelectionBox ($adminId = NULL) {
+ // Start the selection box
+ $OUT = '<select name="la_mode[{%pipe,makeNullToZero=' . makeZeroToNull($adminId) . '%}]" size="1" class="form_select">';
+
+ // Add option list
+ $OUT .= generateOptionList('/ARRAY/', array('global', 'OLD', 'NEW'), array('{--ADMIN_ADMINS_LA_MODE_GLOBAL--}', '{--ADMIN_ADMINS_LA_MODE_OLD--}', '{--ADMIN_ADMINS_LA_MODE_NEW--}'), getAdminMenuMode($adminId));
+
+ // Finish it
+ $OUT .= '</select>';
+
+ // Return content
+ return $OUT;
+}
+
// Delete given admin accounts
function adminsDeleteAdminAccount ($postData) {
// Check if this account is the last one which cannot be deleted...
}
}
-// Create member selection box
-function addMemberSelectionBox ($def = 0, $add_all = false, $return = false, $none = false, $field = 'userid') {
+// Create an admin selection box
+function generateAdminSelectionBox ($adminId = NULL) {
+ // Return content
+ return $OUT;
+}
+
+// Create a member selection box
+function addMemberSelectionBox ($userid = NULL, $add_all = false, $return = false, $none = false, $field = 'userid') {
// Output selection form with all confirmed user accounts listed
- $result = SQL_QUERY("SELECT `userid`,`surname`,`family` FROM `{?_MYSQL_PREFIX?}_user_data` ORDER BY `userid` ASC", __FUNCTION__, __LINE__);
+ $result = SQL_QUERY('SELECT `userid`,`surname`,`family` FROM `{?_MYSQL_PREFIX?}_user_data` ORDER BY `userid` ASC', __FUNCTION__, __LINE__);
// Default output
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
$OUT .= '<option value="' . bigintval($content['userid']) . '"';
- if ($def == $content['userid']) $OUT .= ' selected="selected"';
+ if ($userid == $content['userid']) $OUT .= ' selected="selected"';
$OUT .= '>' . $content['surname'] . ' ' . $content['family'] . ' (' . bigintval($content['userid']) . ')</option>';
} // END - while
if ($return === false) {
// Remeber options in constant
$content['form_selection'] = $OUT;
- $content['what'] = getWhat();
+ $content['what'] = '{%pipe,getWhat%}';
// Load template
loadTemplate('admin_form_selection_box', false, $content);
// Check if entires are checked
if (ifPostContainsSelections()) {
// Add option for events
- $adminsList = generateOptionList('admins', 'id', 'login', '', 'email');
$rows = '';
foreach (postRequestElement('sel') as $template => $sel) {
// First of all load data from DB
// @TODO Can this be rewritten to an API function?
$OUT .= '<select name="admin_id[' . $content['id'] . ']" size="1" class="form_select">
<option value="0"';
- if ($content['admin_id'] == '0') $OUT .= ' selected="selected"';
+ if (is_null($content['admin_id'])) {
+ $OUT .= ' selected="selected"';
+ } // END - if
$OUT .= '>{--ADMIN_TO_ALL_ADMINS--}</option>';
+
if (isExtensionActive('events')) {
$OUT .= '<option value="-1"';
- if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"';
+ if ($content['admin_id'] == '-1') {
+ $OUT .= ' selected="selected"';
+ } // END - if
$OUT .= '>{--ADMIN_ADMINS_TO_USER_EVENTS--}</option>';
- }
+ } // END - if
+
$OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
$OUT .= '</select>';
// Prepare content
$content['id'] = $id;
$content['mail_template'] = $template;
- $content['admins'] = $adminsList;
+ $content['admins'] = generateOptionList('admins', 'id', 'login', '', 'email');;
if ($adminId2 > 0) {
// Add form for an additional admin
// Load data for the id
$result = SQL_QUERY_ESC("SELECT `id`,`admin_id`,`action_menu`,`what_menu`,`access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
+
+ // Load all data
$content = SQL_FETCHARRAY($result);
// Free result
'admins_selection' => generateOptionList('admins', 'id', 'login', $content['admin_id'], 'default_acl'),
'action_selection' => adminMenuSelectionBox_DEPRECATED('action', $content['action_menu'], $content['id']),
'what_selection' => adminMenuSelectionBox_DEPRECATED('what', $content['what_menu'], $content['id']),
- 'mode_options' => generateOptionList(
- '/ARRAY/',
- array('allow', 'deny'),
- array(
- '{--ADMIN_ADMINS_ACCESS_MODE_ALLOW--}',
- '{--ADMIN_ADMINS_ACCESS_MODE_DENY--}'
- ),
- $content['access_mode']
- ),
);
// Load row template
$content['admins_selection'] = generateOptionList('admins', 'id', 'login', '', 'default_acl');
$content['action_selection'] = adminMenuSelectionBox_DEPRECATED('action');
$content['what_selection'] = adminMenuSelectionBox_DEPRECATED('what');
- $content['mode_options'] = generateOptionList(
- '/ARRAY/',
- array('allow', 'deny'),
- array(
- '{--ADMIN_ADMINS_ACCESS_MODE_ALLOW--}',
- '{--ADMIN_ADMINS_ACCESS_MODE_DENY--}'
- )
- );
// Load template for adding new ACL
loadTemplate('admin_add_admins_acl', false, $content);
return $data['email'];
}
-// Get default ACL of admin id
+// Get default ACL of admin id
function getAdminDefaultAcl ($adminId) {
// By default an invalid ACL value is returned
$data['default_acl'] = 'NO-ACL';
if (!isExtensionActive('sql_patches')) {
// Not found, which is bad, so we need to allow all
$data['default_acl'] = 'allow';
- } elseif (isset($GLOBALS['cache_array']['admin']['def_acl'][$adminId])) {
+ } elseif (isset($GLOBALS['cache_array']['admin']['default_acl'][$adminId])) {
// Use cache
- $data['default_acl'] = $GLOBALS['cache_array']['admin']['def_acl'][$adminId];
+ $data['default_acl'] = $GLOBALS['cache_array']['admin']['default_acl'][$adminId];
// Update cache hits
incrementStatsEntry('cache_hits');
$data = SQL_FETCHARRAY($result_admin_id);
// Set cache
- $GLOBALS['cache_array']['admin']['def_acl'][$adminId] = $data['default_acl'];
+ $GLOBALS['cache_array']['admin']['default_acl'][$adminId] = $data['default_acl'];
}
// Free result
return $data['default_acl'];
}
+// Get menu mode (la_mode) of admin id
+function getAdminMenuMode ($adminId) {
+ // By default an invalid mode
+ $data['la_mode'] = 'INVALID';
+
+ // Is sql_patches there and was it found in cache?
+ if (!isExtensionActive('sql_patches')) {
+ // Not found, which is bad, so we need to allow all
+ $data['la_mode'] = 'global';
+ } elseif (isset($GLOBALS['cache_array']['admin']['la_mode'][$adminId])) {
+ // Use cache
+ $data['la_mode'] = $GLOBALS['cache_array']['admin']['la_mode'][$adminId];
+
+ // Update cache hits
+ incrementStatsEntry('cache_hits');
+ } elseif (!isExtensionActive('cache')) {
+ // Load from database
+ $result_admin_id = SQL_QUERY_ESC("SELECT `la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1",
+ array(bigintval($adminId)), __FUNCTION__, __LINE__);
+
+ // Do we have an entry?
+ if (SQL_NUMROWS($result_admin_id) == 1) {
+ // Fetch data
+ $data = SQL_FETCHARRAY($result_admin_id);
+
+ // Set cache
+ $GLOBALS['cache_array']['admin']['la_mode'][$adminId] = $data['la_mode'];
+ }
+
+ // Free result
+ SQL_FREERESULT($result_admin_id);
+ }
+
+ // Return default ACL
+ return $data['la_mode'];
+}
+
// Generates an option list from various parameters
function generateOptionList ($table, $id, $name, $default = '', $special = '', $whereStatement = '', $disabled = array(), $callback = '') {
$ret = '';
// Data from database
$SPEC = ', `' . $id . '`';
if (!empty($special)) {
- $SPEC = ', `' . $special . '`';
+ $SPEC = ', `' . $special . '` AS `special`';
} // END - if
// Query the database
- $result = SQL_QUERY_ESC("SELECT `%s`,`%s`".$SPEC." FROM `{?_MYSQL_PREFIX?}_%s` ".$whereStatement." ORDER BY `%s` ASC",
+ $result = SQL_QUERY_ESC("SELECT `%s` AS `id`,`%s` AS `name`".$SPEC." FROM `{?_MYSQL_PREFIX?}_%s` ".$whereStatement." ORDER BY `%s` ASC",
array(
$id,
$name,
// Do we have rows?
if (!SQL_HASZERONUMS($result)) {
- // Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
- // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
- while (list($value, $title, $add) = SQL_FETCHROW($result)) {
- if (empty($special)) $add = '';
- $ret .= '<option value="' . $value . '"';
- if ($default == $value) {
+ // Found data so add them as OPTION lines
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Is special set?
+ if (!isset($content['special'])) {
+ // Set it to empty
+ $content['special'] = '';
+ } // END - if
+
+ $ret .= '<option value="' . $content['id'] . '"';
+
+ if ($default == $content['id']) {
// Selected by default
$ret .= ' selected="selected"';
- } elseif (isset($disabled[$value])) {
+ } elseif (isset($disabled[$content['id']])) {
// Disabled!
$ret .= ' disabled="disabled"';
}
// Add it, if set
- if (!empty($add)) {
- $add = ' ('.$add.')';
+ if (!empty($content['special'])) {
+ $content['special'] = ' (' . $content['special'] . ')';
} // END - if
// Is the call-back function set?
if (!empty($callback)) {
// Call it
- $title = call_user_func_array($callback, array($title));
+ $content['name'] = call_user_func_array($callback, array($content['name']));
} // END - if
// Finish option list
- $ret .= '>' . $title . $add . '</option>';
+ $ret .= '>' . $content['name'] . $content['special'] . '</option>';
} // END - while
} else {
// No data found
<tr>
<td class="bottom" align="right">{--ADMIN_ADMINS_SELECT_MODE--}:</td>
<td class="bottom">
- <select name="mode" size="1" class="form_select">
- $content[mode_options]
- </select>
+ {%pipe,generateAdminAccessModeSelectionBox%}
</td>
</tr>
<tr>
<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_proxy%}" method="post">
+<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&what=config_session%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
<tr>
<td colspan="2" align="center" class="table_header bottom">
$content[what_selection]
</td>
<td class="{%template,ColorSwitch%} bottom" align="center">
- <select name="mode[$content[id]]" size="1" class="form_select">
- $content[mode_options]
- </select>
+ {%pipe,generateAdminAccessModeSelectionBox=$content[id]%}
</td>
</tr>
<input type="password" class="form_field" name="pass1[$content[id]]" size="10" maxlength="255" />
<input type="password" class="form_field" name="pass2[$content[id]]" size="10" maxlength="255" />
</td>
- <td align="center" class="{%template,ColorSwitch%} bottom">
- <select name="mode[$content[id]]" size="1" class="form_select">
- $content[mode]
- </select>
+ <td align="center" class="{%template,ColorSwitch%} bottom right">
+ $content[mode]
</td>
<td align="center" class="{%template,ColorSwitch%} bottom">
- <select name="la_mode[$content[id]]" size="1" class="form_select">
- $content[la_mode]
- </select>
+ {%pipe,generateAdminMenuModeSelectionBox=$content[id]%}
</td>
</tr>