# eco_oce (30.04.2017 / 20:06)
foreach (glob('../theme/*/*.css') as $val)
$itu = explode('/', dirname($val));
$theme_list[] = array_pop($itu);
$set_user['skin'] = isset($_POST['skin']) &&
Syntactically yes, correctly.
Добавлено: 30.04.2017 / 20:09
# eco_oce (30.04.2017 / 20:07)
Is not working,
Maybe you need to put all the code in the body of the loop?
* (+/-)
foreach (glob('../theme/*/*.css') as $val) {
$itu = explode('/', dirname($val));
$theme_list[] = array_pop($itu);
$set_user['skin'] = isset($_POST['skin']) && in_array($_POST['skin'], $theme_list) ? functions::check($_POST['skin']) : $set['skindef'];
}
Добавлено: 30.04.2017 / 20:12
I'm not sure, try it.
// Устанавливаем скин
foreach (glob('../theme/*/*.css') as $val) {
$array = explode('/', dirname($val));
$theme_list[] = array_pop($array);
}
$set_user['skin'] = isset($_POST['skin']) && in_array($_POST['skin'], $theme_list) ?
functions::check($_POST['skin']) : $set['skindef'];