<?
$set['title']='Редактирование статуса'; // заголовок страницы
echo "<div class='content'><div class'event'><h1>Статус</h1></div><div class='block'>";
if (isset($_POST['status_icon']) && isset($_POST['status_text']) && isset($kolhoz_user))
{
$msg=my_esc($_POST['status_text']);
$icon=intval($_POST['status_icon']);
if (strlen2($msg)>70){$err='Сообщение слишком длинное';}
elseif (strlen2($msg)<1){$err[]='Короткое сообщение';}
elseif(!isset($err)){
mysql_query("UPDATE `kolhoz_user` SET `status_icon` = '".$icon."' WHERE `id` = '".$kolhoz_user['id']."' LIMIT 1");
mysql_query("UPDATE `kolhoz_user` SET `status_text` = '".$msg."' WHERE `id` = '".$kolhoz_user['id']."' LIMIT 1");
msg('Статус добавлен');}}
echo'<form action="?" method="post">';
echo'<input type="radio" name="status_icon" value="1"/><img src="/status/icon/1.gif" /><br />';
echo'<input type="radio" name="status_icon" value="2"/><img src="/status/icon/2.gif" /><br />';
echo'<input type="radio" name="status_icon" value="3"/><img src="/status/icon/3.gif" /><br />';
echo' <input type="radio" name="status_icon" value="4"/><img src="/status/icon/4.gif" /><br />';
echo' <input type="radio" name="status_icon" value="5"/><img src="/status/icon/5.gif" /><br />';
echo' <input type="radio" name="status_icon" value="6"/><img src="/status/icon/6.gif" /> <br />';
echo' <input type="radio" name="status_icon" value="7"/><img src="/status/icon/7.gif" /><br />';
echo' <input type="radio" name="status_icon" value="8"/><img src="/status/icon/8.gif" /><br />';
echo' <input type="radio" name="status_icon" value="9"/><img src="/status/icon/9.gif" /><br />';
echo' <input type="radio" name="status_icon" value="10"/><img src="/status/icon/10.gif" /><br />';
echo' <input type="radio" name="status_icon" value="11"/><img src="/status/icon/11.gif" /><br />';
echo' <input type="radio" name="status_icon" value="12"/><img src="/status/icon/12.gif" /> <br />';
echo' <input type="radio" name="status_icon" value="13"/><img src="/status/icon/13.gif" /><br />';
echo' <input type="radio" name="status_icon" value="14"/><img src="/status/icon/14.gif" /><br />';
echo' <input type="radio" name="status_icon" value="15"/><img src="/status/icon/15.gif" /><br />';
echo' <input type="radio" name="status_icon" value="16"/><img src="/status/icon/16.gif" /><br />';
echo' <input type="radio" name="status_icon" value="14"/><img src="/status/icon/17.gif" />  <br />';
echo' <input type="radio" name="status_icon" value="14"/><img src="/status/icon/18.gif" /><br />';
echo' <input type="radio" name="status_icon" value="14"/><img src="/status/icon/19.gif" /><br />';
echo' <input type="radio" name="status_icon" value="14"/><img src="/status/icon/20.gif" /><br />';
echo' <input type="radio" name="status_icon" value="15"/><img src="/status/icon/21.gif" /> <br />';
echo'Ваш статус: <input type="text" name="status_text" maxlength="70" value="'.$ku['status_text'].'"/>  <br />';
echo'<input type="submit" value="Добавить"/><br/>';
echo "&raquo;<a href='/?user'>Посмотреть анкету</a><br />\n";
include_once 'inc/foot.php'; ////////////Niz
?>