Файл: test.masteram.us/pages/setlenta.php
Строк: 35
<?
include '../Core.php';
only_reg();
$set['title']='Настройки чата';
include_once '../sys/inc/thead.php';
title();
if (isset($_POST['save'])){
if (isset($_POST['lenta_foto']) && $_POST['lenta_foto']==1)
{
$user['lenta_foto']=1;
mysql_query("UPDATE `user` SET `lenta_foto` = '1' WHERE `id` = '$user[id]' LIMIT 1");
}
else
{
$user['lenta_foto']=0;
mysql_query("UPDATE `user` SET `lenta_foto` = '0' WHERE `id` = '$user[id]' LIMIT 1");
}
if (!isset($err))msg('Изменения успешно приняты');
}
err();
echo "<form method='post' action='?$passgen'>n";
echo "<div class='rekl_main'>";
echo "<label><input type='checkbox' name='lenta_foto'".($user[lenta_foto]?" checked='checked'":null)." value='1' />Уведомлять о новых темах в форуме</label><br />n";
echo "</div>n";
echo "<input type='submit' name='save' value='Сохранить' />n";
echo "</form>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';
?>