<?
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['pol']) && preg_match('#^([A-zА-я0-9 \-\,.]*)$#ui', $_POST['pol']))
{
$user['pol']=$_POST['pol'];
mysql_query("UPDATE `user` SET `pol` = '".intval($user['pol'])."' WHERE `id` = '$user[id]' LIMIT 1");
}
else $err[]='';





if (!isset($err))msg('Изменения успешно приняты');


err();
aut();

echo "<form method='post' action='?$passgen'>\n";

echo "Ваш пол:<br /><select name='pol'><option value='1'>Мужской</option><option value='0'>Женский</option></select><br /><hr/>\n";


echo "<input type='submit' name='save' value='Сохранить' />\n";
echo "</form>\n";
echo "<div class='foot'>\n";
echo "&raquo;<a href='/info.php'>Посмотреть анкету</a><br />\n";


if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
echo "&laquo;<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a><br />\n";

echo "&laquo;<a href='/umenu.php'>Мое меню</a><br />\n";
echo "</div>\n";

include_once 'sys/inc/tfoot.php';
?>