<?
echo "<div class=\"trow\">\n";
echo "<a href=\"/anketa.php\">Анкета</a> &gt; ICQ<br />\n";
echo "</div>\n";

if (isset($_GET['set']))
{
if (isset($_POST['ank_icq']) && (is_numeric($_POST['ank_icq']) && strlen($_POST['ank_icq'])>=5 && strlen($_POST['ank_icq'])<=9 || $_POST['ank_icq']==NULL))
{
$user['ank_icq']=$_POST['ank_icq'];
if ($user['ank_icq']==null)$user['ank_icq']='null';
mysql_query("UPDATE `user` SET `ank_icq` = $user[ank_icq] WHERE `id` = '$user[id]' LIMIT 1");
if ($user['ank_icq']=='null')$user['ank_icq']=NULL;
}
else $err='Неверный формат ICQ';
header ("Location: anketa.php?ok&".SID."");
exit;}
err();
aut();

echo "<form method=\"post\" action=\"anketa.php?p=icq&amp;set\">\n";
echo "ICQ:<br />\n<input type='text' name='ank_icq' value='$user[ank_icq]' maxlength='9' /><br/>\n";
echo "<input value=\"Изменить\" class=\"form\" type=\"submit\" />\n";
echo "</form>\n";


?>
