<?
require'../config.php';
$align='left';
$title='анкеты';
aut();
head();
who_add(0,'enter');
$act = $_GET['act'];
if (empty($act)){
if ($_GET['i']==1)echo '<b>Фон успешно сохранен.</b><br />';
if (isset($_POST['save'])){
$user['fon']=mysql_real_escape_string(htmlspecialchars($_POST['fon']));
mysql_query("UPDATE `users` SET `fon` = '".my_esc($user[fon])."' WHERE `id` = '$user[id]' LIMIT 1");
}
echo '<b>Выберите фон</b><br/>';
if ($ver!='wml')echo '<form method="post" action="font?act=fon&'.SID.'" name="auth">';
?>
<input type='radio' name='fon' value='0' checked='checked'><b>Выключить фон</b><br/><br/>
<input type='radio' name='fon' value='1' checked='checked'><img src='../style/fon/1.png' width='60' height='60'></img><br/>
<input type='radio' name='fon' value='2' checked='checked'><img src='../style/fon/2.png' width='60' height='60'></img><br/>
<input type='radio' name='fon' value='3' checked='checked'><img src='../style/fon/3.png' width='60' height='60'></img><br/>
<input type='radio' name='fon' value='4' checked='checked'><img src='../style/fon/4.png' width='60' height='60'></img><br/>
<input type='radio' name='fon' value='5' checked='checked'><img src='../style/fon/5.png' width='60' height='60'></img><br/>
<input type='radio' name='fon' value='6' checked='checked'><img src='../style/fon/6.png' width='60' height='60'></img><br/>
<input type='radio' name='fon' value='7' checked='checked'><img src='../style/fon/7.png' width='60' height='60'></img><br/>
<br/>
<input type='submit' name='save' value='Изменить' /><br/>
<?php
}else
{
if($_POST['fon'] >= 0 and $_POST['fon'] <=7)
{
$fon = intval($_POST['fon']);
$db->sql_query ("Update users set fon='".$fon."' where id ='".$user['id']."'");
}
header ('Location: font?i=1&'.SID); exit;
}
echo '<br />';
echo gb.'<a href="'.H.'my/index">Личный кабинет</a>'.div;
echo gb.'<a href="'.H.'enter">Прихожая</a>'.div;
foot();
?>