Файл: soc-set/panel/blog.php
Строк: 71
<?php
require_once('../core/start.php');
check_auth();
head('Управление блогом');
echo DIV_TITLE . 'Управление блогом' . CLOSE_DIV;
if (privilegy('blog') == FALSE) {
header("Location: ".HOME."/panel");
exit();
}
if (!empty($_POST['sett'])) {
$blog = num($_POST['blog_str']);
$blog_comm = num($_POST['blog_comm_str']);
$blog_comm_view = num($_POST['blog_comm_view_str']);
if (empty($blog) || empty($blog_comm) || empty($blog_comm_view)) {
echo DIV_ERROR . 'Пустое значение' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".CONFIG." SET `write_blog` = ?, `write_blog_comm` = ?, `write_blog_comm_view` = ? ",
array($blog, $blog_comm, $blog_comm_view));
header("Location: ".HOME."/panel/blog/");
}
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo '<b>Записей на страницу:</b><br />';
echo '<select name="blog_str">';
echo '<option '.(3 == $config['write']['blog'] ? 'selected="selected"' : NULL).' value="3">3</option>';
echo '<option '.(5 == $config['write']['blog'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(8 == $config['write']['blog'] ? 'selected="selected"' : NULL).' value="8">8</option>';
echo '<option '.(10 == $config['write']['blog'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['blog'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['blog'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '</select><br /><br />';
echo '<b>Комментарий на страницу:</b><br />';
echo '<select name="blog_comm_str">';
echo '<option '.(3 == $config['write']['blog_comm'] ? 'selected="selected"' : NULL).' value="3">3</option>';
echo '<option '.(5 == $config['write']['blog_comm'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(8 == $config['write']['blog_comm'] ? 'selected="selected"' : NULL).' value="8">8</option>';
echo '<option '.(10 == $config['write']['blog_comm'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['blog_comm'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['blog_comm'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '</select><br /><br />';
echo '<b>Количество вывода последних комментарий:</b><br />';
echo '<select name="blog_comm_view_str">';
echo '<option '.(3 == $config['write']['blog_comm_view'] ? 'selected="selected"' : NULL).' value="3">3</option>';
echo '<option '.(5 == $config['write']['blog_comm_view'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(8 == $config['write']['blog_comm_view'] ? 'selected="selected"' : NULL).' value="8">8</option>';
echo '<option '.(10 == $config['write']['blog_comm_view'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['blog_comm_view'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['blog_comm_view'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '</select><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');
?>