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