Файл: search/adm.php
Строк: 48
<?
require_once("../connect.php");
$title = $title . ' :: Админка поиска';
$location = 'Скрыто';
if (!$u['id']) {
header("Location: /reg.php?err=1");
exit;
}
require('../head.php');
if ($u['admin'] == 0 || $u['admin']==1 || $u['admin']==2 || $u['admin']==3 || $u['admin']==4 || $u['admin']==5){
if (isset($_POST['save'])){
if (isset($_POST['forum']) && $_POST['forum']==1) { mysql_query("UPDATE `sea_set` SET `forum` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `forum` = '0' WHERE `id` = '1' LIMIT 1"); }
if (isset($_POST['foto']) && $_POST['foto']==1) { mysql_query("UPDATE `sea_set` SET `foto` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `foto` = '0' WHERE `id` = '1' LIMIT 1"); }
if (isset($_POST['users']) && $_POST['users']==1) { mysql_query("UPDATE `sea_set` SET `users` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `users` = '0' WHERE `id` = '1' LIMIT 1"); }
if (isset($_POST['video']) && $_POST['video']==1) { mysql_query("UPDATE `sea_set` SET `video` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `video` = '0' WHERE `id` = '1' LIMIT 1"); }
if (isset($_POST['muz']) && $_POST['muz']==1) { mysql_query("UPDATE `sea_set` SET `muz` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `muz` = '0' WHERE `id` = '1' LIMIT 1"); }
if (isset($_POST['img']) && $_POST['img']==1) { mysql_query("UPDATE `sea_set` SET `img` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `img` = '0' WHERE `id` = '1' LIMIT 1"); }
if (isset($_POST['java']) && $_POST['java']==1) { mysql_query("UPDATE `sea_set` SET `java` = '1' WHERE `id` = '1' LIMIT 1"); }else{ mysql_query("UPDATE `sea_set` SET `java` = '0' WHERE `id` = '1' LIMIT 1"); }
echo "<div class='foot'>Успех<br/><a href='/search/adm.php'>Перенастроить</a><br/><a href='/search/'>К поиску</a></div>n";
}else{
echo'<div class="div">';
echo "<form method='post' action='?$passgen'>n";
echo "Разделы главные:<br /> <label><input type='checkbox' name='forum'".($sea_set['forum']==1?' checked="checked"':null)." value='1' /> Форум</label><br />n";
echo "<label><input type='checkbox' name='foto'".($sea_set['foto']==1?' checked="checked"':null)." value='1' /> Фото</label><br />n";
echo "<label><input type='checkbox' name='users'".($sea_set['users']==1?' checked="checked"':null)." value='1' /> Обитатели</label><br />n";
echo "Разделы обмен.:<br /> <label><input type='checkbox' name='img'".($sea_set['img']==1?' checked="checked"':null)." value='1' /> Картинки</label><br />n";
echo "<label><input type='checkbox' name='video'".($sea_set['video']==1?' checked="checked"':null)." value='1' /> Видео</label><br />n";
echo "<label><input type='checkbox' name='muz'".($sea_set['muz']==1?' checked="checked"':null)." value='1' /> Музыка</label><br />n";
echo "<label><input type='checkbox' name='java'".($sea_set['java']==1?' checked="checked"':null)." value='1' /> Игры и приложение</label><br />n";
echo "<input type='submit' name='save' value='Сохранить' />n";
echo "</form>n";
echo'</div>';
}
}
require('../foot.php');
?>