Файл: chat/say.php
Строк: 57
<?php
require '../lang_inc.php';
require '../sid.php';
require '../config.php';
$link = connect_db();
list($user, $id, $ps) = check_login($link);
include '../head.php';
$rm = my_int($_GET['rm']);
whorm($rm, 'room' . $rm);
$open = mysql_fetch_array(mysql_query("SELECT `open_chat` FROM `setting` WHERE `ids` = '1'"));
if ($open[0] == 0) {
err(''.$lang['Чат закрыт Администратором'].'!');
include '../foot.php';
exit();
}
$empty = mysql_query("SELECT * FROM `rooms` WHERE `id` = '$rm' LIMIT 1");
if (mysql_num_rows($empty) == FALSE) {
header('Location: ../index.php?lg='.$lg.'');
die();
} else {
$inf = mysql_fetch_assoc($empty);
}
$ASnum = mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `room` = 'room$rm' AND `onl` + '200' > '" . time() . "' ORDER BY `onl` DESC"));
echo $div_left . $div_title . $inf['name'] . $div_end . $div_menu . '
<a href="index.php?lg='.$lg.'&'.$ref.'">'.$lang['Комнаты'].' | </a>
<a href="room.php?rm='.$rm.'&lg='.$lg.'">' . $inf['name'] . '</a> |
<b>'.$lang['Сказать'].'</b> |
<a href="whoroom.php?rm='.$rm.'&lg='.$lg.'">'.$lang['Кто здесь'].'(' . $ASnum . ')</a>
' . $div_end;
echo $div_left . '<FORM method="POST" action="room.php?rm='.$rm.'&lg='.$lg.'">
<fieldset>
<textarea name="msg" cols="50" rows="5" style="width: 100%;"></textarea>
<br/>';
##############
if ($user['level'] == 2 || $user['level'] == 4 || $user['level'] == 5) {
echo '<input type="checkbox" name="b" value="1"/> <b>'.$lang['Жирный'].'</b>
<br/>
<input type="checkbox" name="u" value="1"/> <u>'.$lang['Подчеркнутый'].'</u>
<br/>
<input type="checkbox" name="r" value="1"/> <font color="#FF0000">'.$lang['Красный'].'</font>
<br/>';
}
##############
echo '<input type="submit" name="send" value="'.$lang['Сказать'].'"/>
</fieldset>
</FORM>' . $div_end . $block;
echo '<a href="room.php?rm='.$rm.'&lg='.$lg.'">'.$lang['В чат'].'</a>';
include '../foot.php';
?>