<?


if (isset($_GET['go']))
{

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']='oke'; // заголовок страницы
include_once '../sys/inc/thead.php';
title();
aut();


if (isset($_POST['rules']) && $_POST['rules']==1) {
$user['rules']=1; mysql_query("UPDATE `user` SET `rules` = '1' WHERE `id` = '$user[id]' LIMIT 1"); }
else
{
$user['rules']=0; mysql_query("UPDATE `user` SET `rules` = '0' WHERE `id` = '$user[id]' LIMIT 1"); }

msg ('Прaвилa успешно приняты');
include_once '../sys/inc/tfoot.php';
}
else
{

echo "<form method=\"post\" action=\"/rules/oke.php?go\">";


echo "<label><input type='checkbox' name='rules'".($user['rules']==1?' checked="checked"':null)." value='1' />Я соглaceн c прaвилaми</label><br />\n";


echo "<input type=\"submit\" value=\"Oke\" />";

echo "</form>\n";
}
?>
