Файл: soc-set/panel/zc.php
Строк: 71
<?php
require_once('../core/start.php');
check_auth();
head('Управление загруз-центром');
echo DIV_TITLE . 'Управление загруз-центром' . CLOSE_DIV;
if (privilegy('zc') == FALSE) {
header("Location: ".HOME."/panel");
exit();
}
if (!empty($_POST['sett'])) {
$cat = num($_POST['cat']);
$files = num($_POST['files']);
$comm = num($_POST['comm']);
if (empty($cat) || empty($files) || empty($comm)) {
echo DIV_ERROR . 'Пустое значение' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".CONFIG." SET `write_load_cat` = ?, `write_load_files` = ?, `write_load_comm` = ? ", array($cat, $files, $comm));
header("Location: ".HOME."/panel/zc/");
}
}
echo DIV_AUT;
echo '<b>Подкатегорий:</b><br />';
echo '<form action="#" method="POST">';
echo '<select name="cat">';
echo '<option '.(5 == $config['write']['loads_cat'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(10 == $config['write']['loads_cat'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['loads_cat'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['loads_cat'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '<option '.(30 == $config['write']['loads_cat'] ? 'selected="selected"' : NULL).' value="30">30</option>';
echo '<option '.(50 == $config['write']['loads_cat'] ? 'selected="selected"' : NULL).' value="50">50</option>';
echo '</select><br /><br />';
echo '<b>Файлов на страницу:</b><br />';
echo '<select name="files">';
echo '<option '.(5 == $config['write']['loads_file'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(10 == $config['write']['loads_file'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['loads_file'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['loads_file'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '<option '.(30 == $config['write']['loads_file'] ? 'selected="selected"' : NULL).' value="30">30</option>';
echo '<option '.(50 == $config['write']['loads_file'] ? 'selected="selected"' : NULL).' value="50">50</option>';
echo '</select><br /><br />';
echo '<b>Комментарий на страницу:</b><br />';
echo '<select name="comm">';
echo '<option '.(5 == $config['write']['loads_comm'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(10 == $config['write']['loads_comm'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['loads_comm'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['loads_comm'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '<option '.(30 == $config['write']['loads_comm'] ? 'selected="selected"' : NULL).' value="30">30</option>';
echo '<option '.(50 == $config['write']['loads_comm'] ? 'selected="selected"' : NULL).' value="50">50</option>';
echo '</select><br /><br />';
echo '<input type="submit" name="sett" value="Сохранить" /></form>';
echo CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Главная</a> / <a href="'.HOME.'/panel">Панель управления</a> / <b>Управление загруз-центром</b>' . CLOSE_DIV;
require_once('../core/stop.php');
?>