File size: 1.93Kb
<?php
// Чат GBodr
// Версия: 1.0
// Автор: Gemorroj
require 'connect.php';
require 'header.php';
require 'result.php';
$us = $row['user'];
$nastroi = $row['nastroi'];
if($_GET['go'] != 1)
{
print $top.'
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>
<card id="nastr" title="Настроение">
<p><small>
<strong>Ваше настроение:</strong><br/>
</small>
<input name="nastroi" maxlength="20" value="'.$nastroi.'" type="text"/><br/>
<small>
*Пустое поле-без настроения<br/>
---<br/>
<anchor>Сохранить
<go href="nastr.php?go=1&id='.$id.'&ps='.$ps.'&ref='.$ref.'" method="post">
<postfield name="nastroi" value="$(nastroi)"/>
</go></anchor>
<br/>
---<br/>
Так же Вы можете <a href="nood.php?id='.$id.'&ps='.$ps.'&ref='.$ref.'">выбрать</a> настроение из списка<br/>
---<br/>';
print '<a href="cabinet.php?id='.$id.'&ps='.$ps.'&ref='.$ref.'">Личный кабинет</a><br/>';
print '---<br/>
<a href="enter.php?id='.$id.'&ps='.$ps.'">Прихожая</a>
</small></p></card></wml>';
mysql_close();
exit;
}
$nastroi = check($_POST['nastroi']);
if(!isset($error))
{
$result = mysql_query('SELECT * `antihack_users` WHERE id = '.$id);
if (mysql_affected_rows() == 0)
{$error = 'database error...';}
else
{$ins_str = "UPDATE `antihack_users` SET nastroi = '".$nastroi."' WHERE id =".$id;}
if(mysql_query($ins_str))
{$msg = 'Ваши настройки изменены';}
else
{$error = mysql_error();}
}
mysql_close();
if(isset($error))
{
print $top;
print '<card id="error" title="Error" ontimer="nastr.php?id='.$id.'&ps='.$ps.'&ref='.$ref.'">
<timer value="5"/>';
print '<p>
'.$error.'
</p></card></wml>';
exit;
}
print $top;
print '<card id="ok" title="Ok" ontimer="cabinet.php?id='.$id.'&ps='.$ps.'&ref='.$ref.'">
<timer value="5"/>';
print '<p>
'.$msg.'
</p></card></wml>';
?>