- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
foreach(mpqn(mpqw("SELECT * FROM {$conf['db']['prefix']}modules_index", "Список модулей", function($error) use($conf){
if(strpos($error, "doesn't exist")){
qw(pre("ALTER TABLE {$conf['db']['prefix']}modules RENAME {$conf['db']['prefix']}modules_index"));
}else{ pre("Ошибка обработки ошибки", $error); }
})) as $modules){
if(array_search($conf['user']['uname'], explode(',', $conf['settings']['admin_usr'])) !== false) $modules['access'] = 5;
$conf['modules'][ $modules['folder'] ] = $modules;
$conf['modules'][ $modules['folder'] ]['modname'] = $modules['modname'] = (strpos($_SERVER['HTTP_HOST'], "xn--") !== false) ? mb_strtolower($modules['name'], 'UTF-8') : $modules['folder'];
$conf['modules'][ $modules['modname'] ] = &$conf['modules'][ $modules['folder'] ];
$conf['modules'][ mb_strtolower($modules['name']) ] = &$conf['modules'][ $modules['folder'] ];
$conf['modules'][ $modules['id'] ] = &$conf['modules'][ $modules['folder'] ];
}