Файл: panel/forum.php
Строк: 79
<?php
/**
* @package Prime Social
* @link http://primesocial.ru
* @copyright Copyright (C) 2016 Prime Social
* @author BoB | http://primesocial.ru/about
*/
require_once('../core/start.php');
check_auth();
head('Forumni boshqarish');
if (privilegy('forum') == FALSE) {
header("Location: ".HOME."/panel");
exit();
}
if (!empty($_POST['sett'])) {
$razd = num($_POST['razd_str']);
$theme = num($_POST['theme_str']);
$post = num($_POST['post_str']);
if (empty($razd) || empty($theme) || empty($post)) {
echo DIV_ERROR . 'Xech nima tanlanmagan' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".CONFIG." SET `write_forum_post` = ?, `write_forum_theme` = ?, `write_forum_razd` = ? ", array($post, $theme, $razd));
header("Location: ".HOME."/panel/forum/");
}
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo '<b>Sahifadagi bo`limlar:</b><br />';
echo '<select name="razd_str">';
echo '<option '.(3 == $config['write']['forum_razd'] ? 'selected="selected"' : NULL).' value="3">3</option>';
echo '<option '.(5 == $config['write']['forum_razd'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(8 == $config['write']['forum_razd'] ? 'selected="selected"' : NULL).' value="8">8</option>';
echo '<option '.(10 == $config['write']['forum_razd'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['forum_razd'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['forum_razd'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '</select><br />';
echo '<b>Sahifadagi mavzular:</b><br />';
echo '<select name="theme_str">';
echo '<option '.(3 == $config['write']['forum_theme'] ? 'selected="selected"' : NULL).' value="3">3</option>';
echo '<option '.(5 == $config['write']['forum_theme'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(8 == $config['write']['forum_theme'] ? 'selected="selected"' : NULL).' value="8">8</option>';
echo '<option '.(10 == $config['write']['forum_theme'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['forum_theme'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['forum_theme'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '</select><br />';
echo '<b>Sahifadagi sharhlar:</b><br />';
echo '<select name="post_str">';
echo '<option '.(3 == $config['write']['forum_post'] ? 'selected="selected"' : NULL).' value="3">3</option>';
echo '<option '.(5 == $config['write']['forum_post'] ? 'selected="selected"' : NULL).' value="5">5</option>';
echo '<option '.(8 == $config['write']['forum_post'] ? 'selected="selected"' : NULL).' value="8">8</option>';
echo '<option '.(10 == $config['write']['forum_post'] ? 'selected="selected"' : NULL).' value="10">10</option>';
echo '<option '.(15 == $config['write']['forum_post'] ? 'selected="selected"' : NULL).' value="15">15</option>';
echo '<option '.(20 == $config['write']['forum_post'] ? 'selected="selected"' : NULL).' value="20">20</option>';
echo '</select><br />';
echo '<input type="submit" name="sett" value="O`zgartirish" /></form>';
echo CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/panel">Boshqaruv paneli</a> / <b>Forumni boshqarish</b>' . CLOSE_DIV;
require_once('../core/stop.php');
?>