// Default is deny
$ret = false;
- // Get admin's defult access right
- if (!empty($cacheArray['admins']['def_acl'][get_session('admin_login')])) {
- // Load from cache
- $default = $cacheArray['admins']['def_acl'][get_session('admin_login')];
-
- // Count cache hits
- $_CONFIG['cache_hits']++;
- } elseif (!is_object($cacheInstance)) {
- // Load from database
- $default = GET_ADMIN_DEFAULT_ACL(get_session('admin_login'));
- }
-
// Get admin's ID
$aid = GET_ADMIN_ID(get_session('admin_login'));
+ // Get admin's defult access right
+ $default = GET_ADMIN_DEFAULT_ACL($aid);
+
+
if (!empty($wht)) {
// Check for parent menu:
// First get it's action value
}
if ($lines == 1) {
// Count cache hits
- $_CONFIG['cache_hits']++;
+ if (isset($_CONFIG['cache_hits'])) { $_CONFIG['cache_hits']++; } else { $_CONFIG['cache_hits'] = 1; }
break;
}
}
if (!empty($POST['pass1'][$id])) $ADD = sprintf(", password='%s'", SQL_ESCAPE($hash));
// Get admin's ID
- $salt = substr(GET_ADMIN_HASH(get_session('admin_login')), 0, -40);
$aid = GET_ADMIN_ID(get_session('admin_login'));
+ $salt = substr(GET_ADMIN_HASH($aid), 0, -40);
// Rewrite cookie when it's own account
if ($aid == $id) {
} // END - if
// Get default ACL from admin to check if we can allow him to change the default ACL
- $default = GET_ADMIN_DEFAULT_ACL(get_session('admin_login'));
+ $default = GET_ADMIN_DEFAULT_ACL(GET_ADMIN_ID(get_session('admin_login')));
// Update admin account
if ($default == "allow") {
// Entry found
$content = SQL_FETCHARRAY($result);
SQL_FREERESULT($result);
- $eval = "\$content['mode'] = ADMINS_".strtoupper($content['mode'])."_MODE;";
- eval($eval);
- $eval = "\$content['la_mode'] = ADMINS_".strtoupper($content['la_mode'])."_LA_SETTING;";
- eval($eval);
+ $content['mode'] = constant('ADMINS_'.strtoupper($content['mode']).'_MODE');
+ $content['la_mode'] = constant('ADMINS_'.strtoupper($content['la_mode']).'_LA_SETTING');
// Prepare some more data
$content['sw'] = $SW;
$SW = 2; $OUT = "";
while ($content = SQL_FETCHARRAY($result)) {
// Compile some variables
- $eval = "\$content['mode'] = ADMINS_".strtoupper($content['mode'])."_MODE;";
- eval($eval);
- $eval = "\$content['la_mode'] = ADMINS_".strtoupper($content['la_mode'])."_LA_SETTING;";
- eval($eval);
+ $content['mode'] = constant('ADMINS_'.strtoupper($content['mode']).'_MODE');
+ $content['la_mode'] = constant('ADMINS_'.strtoupper($content['la_mode']).'_LA_SETTING');
// Prepare some more data
$content['sw'] = $SW;