Файл: user/settings/panel.php
Строк: 102
<?
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['up_panel']) && ($_POST['up_panel']==2 || $_POST['up_panel']==1 || $_POST['up_panel']==0))
{
$user['up_panel']=intval($_POST['up_panel']);
mysql_query("UPDATE `user` SET `up_panel` = '$user[up_panel]' WHERE `id` = '$user[id]' LIMIT 1");
}
else $err='Ошибка вида панели!';
if (isset($_POST['paneltime']) && ($_POST['paneltime']==1 || $_POST['paneltime']==0))
{
$user['paneltime']=intval($_POST['paneltime']);
mysql_query("UPDATE `user` SET `paneltime` = '$user[paneltime]' WHERE `id` = '$user[id]' LIMIT 1");
}
else
{
$user['paneltime']=0;
mysql_query("UPDATE `user` SET `paneltime` = '0' WHERE `id` = '$user[id]' LIMIT 1");
}
if (!isset($err))msg('Изменения успешно приняты');
}
err();
aut();
echo "<form method='post' action='?$passgen'>n";
echo "<div class='p_t'>";
echo "<img src='/style/icons/set.png'> Вид панелей:<br />";
echo "</div>";
echo "<input name='up_panel' type='radio' ".($user['up_panel']==0?' checked="checked"':null)." value='0' />Иконки";
if ($user['up_panel'] == 0)echo " <img src='/style/icons/yes.png'>";
echo "<br /><input name='up_panel' type='radio' ".($user['up_panel']==1?' checked="checked"':null)." value='1' />Слова";
if ($user['up_panel'] == 1)echo " <img src='/style/icons/yes.png'>";
echo "<br /><input name='up_panel' type='radio' ".($user['up_panel']==2?' checked="checked"':null)." value='2' />Буквы";
if ($user['up_panel'] == 2)echo " <img src='/style/icons/yes.png'>";
echo '<br />Отображать время: ';
echo "<label><input type='checkbox' name='paneltime'".($user['paneltime']?" checked='checked'":null)." value='1' /></label>";
if ($user['paneltime']==1)echo " <img src='/style/icons/yes.png'>";
echo "<div class='p_t'>";
echo "<input type='submit' name='save' value='Сохранить' />n";
echo "</div>";
echo "</form>n";
echo "<div class='post'>n";
if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
echo "«<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a>n";
echo "</div>n";
include_once '../../sys/inc/tfoot.php';
?>