<?
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();
include_once '../sys/inc/thead.php';
title();
aut();

if (isset($_POST['save'])){   if (isset($_POST['kumir']) && $_POST['kumir']==1){ $user['kumir']=1; mysql_query("UPDATE `user` SET `kumir` = '1' WHERE `id` = '$user[id]' LIMIT 1");} if (isset($_POST['kumir']) && $_POST['kumir']==0){ $user['kumir']=0; mysql_query("UPDATE `user` SET `kumir` = '0' WHERE `id` = '$user[id]' LIMIT 1"); }
if (!isset($err))msg('Изменения успешно приняты');
}
echo "<form method='post' action='?$passgen'>\n";
echo "Добавлять меня в кумиры:<br /> <input name='kumir' type='radio' ".($user['kumir']==0?' checked="checked"':null)." value='0' />Да";echo "<input name='kumir' type='radio' ".($user['kumir']==1?' checked="checked"':null)." value='1' />Нет<br />";
echo "<input type='submit' name='save' value='Сохранить' />\n";echo "</form>\n";
include_once '../sys/inc/tfoot.php';
?>


