<?
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['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'>";
//if ($user['lenta_foto'])
//echo "<label><input type='checkbox' name='lenta_foto'".($user['lenta_foto']?" checked='checked'":null)." value='1' /> <font color='red'>Получать новости LaFeS.Ru на E-mail</font></label><br />\n";
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';
?>