<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';

only_reg();
$set['title']='Настройки администраторов';
include_once '../sys/inc/thead.php';
title();

if (isset($_POST['save'])){

if (isset($_POST['obit']) && ($_POST['obit']==1 || $_POST['obit']==0))
{
$user['obit']=intval($_POST['obit']);
mysql_query("UPDATE `user` SET `obit` = '$user[obit]' WHERE `id` = '$user[id]' LIMIT 1");
}
else $err='Ошибка показа скрытия должности';

if (!isset($err))msg('Изменения успешно приняты');
}
err();

echo "<form method='post' action='?$passgen'>\n";
if (user_access('adm_news'))echo "<div class='menu_razd'>";
if (user_access('adm_news'))echo "Убрать показ и значки должности<br />\n<select name='obit'>\n";
if (user_access('adm_news'))echo "<option value='1'".($user['obit']==1?" selected='selected'":null).">Да</option>\n";
if (user_access('adm_news'))echo "<option value='0'".($user['obit']==0?" selected='selected'":null).">Нет</option>\n";
if (user_access('adm_news'))echo "</select><br />\n";
if (user_access('adm_news'))echo "* Маскировка под обычного юзера<br />\n";
if (user_access('adm_news'))echo "<input type='submit' name='save' value='Сохранить' />\n";
if (user_access('adm_news'))echo "</form>\n";
if (user_access('adm_news'))echo "</div>\n";
echo "<div class='rekl'>";
echo "<img src='/style/back.gif' alt='' class='icon'/>\n";
echo " <a href='/umenu.php'>Мое меню</a> <br/>\n";
echo "</div>\n";
include_once '../sys/inc/tfoot.php';
?>