Размер файла: 5.5Kb
<?php
include_once("../incs/conf.php");
include_once("../incs/fmysql.php");
include_once("../incs/fnc2.php");
include_once("../incs/head2.php");
if($on==1 && $user[level]==11){
head("Админ панель - Настройки системы",$meuser,$auth);
echo "<div class='rowup'>";
include_once("../incs/title2.php");
echo "<a href=\"index.php\">Админ панель</a> - Настройки системы</div>";
$a = fil($_GET['act']);
switch($a){
case '':
echo "<form action=\"?act=save\" method=\"post\">";
echo "Закрыть регестрацию<select name=\"reg\"><br>";
if ($settings['reg']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['reg']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Новости<select name=\"news\"><br>";
if ($settings['news']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['news']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Гостевую<select name=\"quest\"><br>";
if ($settings['quest']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['quest']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Чат<select name=\"chat\"><br>";
if ($settings['chat']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['chat']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Форум<select name=\"forum\"><br>";
if ($settings['forum']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['forum']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Обменник<select name=\"obmen\"><br>";
if ($settings['obmen']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['obmen']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Библиотеку<select name=\"lib\"><br>";
if ($settings['lib']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['lib']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Игры<select name=\"games\"><br>";
if ($settings['games']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['games']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Админ-чат<select name=\"admin_chat\"><br>";
if ($settings['admin_chat']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['admin_chat']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать Статистику<select name=\"statistik\"><br>";
if ($settings['statistik']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['statistik']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать счетчики онлайна возле Ф,О,Б<select name=\"schet\"><br>";
if ($settings['schet']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['schet']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Спрятать картинки на главной<select name=\"images\"><br>";
if ($settings['images']==1)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"1\"$sel>Да</option>";
if ($settings['images']==0)$sel='selected="selected"';else $sel=NULL;
echo "<option value=\"0\"$sel>Нет</option>";
echo "</select><br>";
echo "Символов на странице статьи в библиотеке:<br>";
echo "<input type='text' name='lib_page' value='$settings[lib_page]' size='5' maxlength='5' />";
echo "<br>Стоймость повышение рейтинга(в деньгах):<br>";
echo "<input type='text' name='stoymost_rat' value='$settings[stoymost_rat]' size='5' maxlength='5' /><br>";
echo "<input type=\"submit\" name=\"but\" value=\"Сохранить\" /></form>";
break;
case 'save':
$reg=$_POST['reg'];
$news=$_POST['news'];
$quest=$_POST['quest'];
$chat=$_POST['chat'];
$forum=$_POST['forum'];
$obmen=$_POST['obmen'];
$lib=$_POST['lib'];
$games=$_POST['games'];
$admin_chat=$_POST['admin_chat'];
$statistik=$_POST['statistik'];
$bank=$_POST['bank'];
$schet=$_POST['schet'];
$images=$_POST['images'];
$lib_page=$_POST['lib_page'];
$stoymost_rat=$_POST['stoymost_rat'];
mysql_query("UPDATE `settings` SET `reg` = '$reg', `news` = '$news', `quest` = '$quest', `chat` = '$chat', `forum` = '$forum', `obmen` = '$obmen', `lib` = '$lib', `games` = '$games', `admin_chat` = '$admin_chat', `statistik` = '$statistik', `bank` = '$bank', `schet` = '$schet', `images` = '$images', `lib_page` = '$lib_page', `stoymost_rat` = '$stoymost_rat'");
echo "Настройки успешно сохранены<br>";
break;
}
}else{
head("Админ панель",$meuser,$auth);
echo "Извени, но тебе здесь находитса нельзя!<br>";
}
include_once("../incs/down2.php");
?>