Размер файла: 6.86Kb
<?php
error_reporting(0);
$ttl='| Сказать';
$urls='add.php';
include("config.php");
include("./includes/constants/add");
include("./includes/".$ver."/banned");
$bots = file("bots/bots.dat");
$nocache = rand(10000, 99999);
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;
header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
include("./template/head.php");
//AUTH
$q = mysql_query("SELECT * FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".$password."';");
if(mysql_num_rows($q) == 0)
{
include("./reginc.php");
include("./template/foot.php");
exit();
}
else
{
$user = mysql_fetch_array($q);
$kick = $user['kick'];
$moder = $user['moder'];
$reason = $user['reason'];
$ban = $user['ban'];
$level = $user['level'];
$translit = $user['translit'];
$fsize = $user['fsize'];
$emotions = $user['emotions'];
}
//END AUTH
$rid = intval($_GET['rid']);
$sql = mysql_query("SELECT * FROM `chat_rooms` WHERE `id` = '".$rid."';");
if(mysql_affected_rows() == 0)
{
echo "<small>Такой комнаты не существует.<br/>\n";
include("./template/head.php");
include("./template/foot.php");
exit();
}
if($kick > time())
{
echo "Вы временно заблокированы модератором <u>$moder</u>. Разбан будет через <u>".($kick - time())."</u> сек.<br/>\n";
echo "Причина: $reason<br/>\n";
include("./template/head.php");
include("./template/foot.php");
exit();
}
//ONLINE
$online = time() + 60;
$update = mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = '".$rid."', `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
//END ONLINE
if($fsize == 0)
{
$fsize = "small";
}
if($fsize == 1)
{
$fsize = "normal";
}
if($fsize == 2)
{
$fsize = "large";
}
echo "<form action=\"room.php?rid=$rid&nocache=$nocache\" method=\"post\">\n";
echo "Сообщение:<br/>\n";
echo "<input type=\"text\" name=\"msg\" maxlength=\"300\" value=\"\"/><br/>\n";
echo "Цвет:<br/>\n";
//echo "<select name=\"color\">\n";
//echo "<option value=\"black\" selected=\"selected\">Черный</option>\n";
//echo "<option value=\"red\">Красный</option>\n";
//echo "<option value=\"blue\">Синий</option>\n";
//echo "<option value=\"#008000\">Темно-зеленый</option>\n";
//echo "<option value=\"#606060\">Тускло-серый</option>\n";
//echo "<option value=\"#FFA500\">Оранжевый</option>\n";
//echo "<option value=\"#0066FF\">Голубой</option>\n";
//echo "<option value=\"#228B22\">Зеленый лесной</option>\n";
//echo "<option value=\"#D02090\">Красно-фиолетовый</option>\n";
//echo "<option value=\"#B03060\">Темно-бордовый</option>\n";
//echo "<option value=\"#8A2BE2\">Фиолетово-синий</option>\n";
//echo "</select><br/>\n
echo "<input type=\"radio\" name=\"options\" value=\"black\"/><font color=\"black\">Черный</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"red\"/><font color=\"red\">Красный</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"blue\"/><font color=\"blue\">Синий</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#008000\"/><font color=\"#008000\">Темно-зеленый</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#606060\"/><font color=\"#606060\">Тускло-серый</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#FFA500\"/><font color=\"#FFA500\">Оранжевый</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#0066FF\"/><font color=\"#0066FF\">Голубой</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#228B22\"/><font color=\"#228B22\">Зеленый лесной</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#D02090\"/><font color=\"#D02090\">Красно-фиолетовый</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#B03060\"/><font color=\"#B03060\">Темно-бордовый</font><br />";
echo "<input type=\"radio\" name=\"options\" value=\"#8A2BE2\"/><font color=\"#8A2BE2\">Фиолетово-синий</font><br />";
echo "<option value=\"black\" selected=\"selected\">Черный</option>\n";
echo "<option value=\"red\">Красный</option>\n";
echo "<option value=\"blue\">Синий</option>\n";
echo "<option value=\"#008000\">Темно-зеленый</option>\n";
echo "<option value=\"#606060\">Тускло-серый</option>\n";
echo "<option value=\"#FFA500\">Оранжевый</option>\n";
echo "<option value=\"#0066FF\">Голубой</option>\n";
echo "<option value=\"#228B22\">Зеленый лесной</option>\n";
echo "<option value=\"#D02090\">Красно-фиолетовый</option>\n";
echo "<option value=\"#B03060\">Темно-бордовый</option>\n";
echo "<option value=\"#8A2BE2\">Фиолетово-синий</option>\n";
if($translit == 1)
{
echo "Транслитировать:\n";
echo "<input type=\"checkbox\" name=\"translit\" value=\"true\" checked=\"checked\" /><br/>\n";
}
if($level > 0)
{
echo "Аттрибуты:<br/>\n";
echo "<select name=\"attributs\" multiple=\"multiple\">\n";
if($level > 2) echo "<option value=\"bold\">Жирный</option>\n";
echo "<option value=\"underline\">Подчеркнутый</option>\n";
if($level == 4)echo "<option value=\"italic\">Курсив</option>\n";
echo "</select><br/>\n";
}
if($level == 4)
{
echo "Размер:<br/>\n";
echo "<select name=\"fsize\">\n";
echo "<option value=\"0\">Маленький</option>\n";
echo "<option value=\"1\" selected=\"selected\">Нормальный</option>\n";
echo "<option value=\"2\">Большой</option>\n";
echo "</select><br/>\n";
}
if($emotions == 1)
{
echo "Эмоции:<br/>\n";
echo "<select name=\"emotions\">\n";
echo "<option value=\"0\" selected=\"selected\">Без эмоций</option>\n";
echo "<option value=\"1\">Радостно</option>\n";
echo "<option value=\"2\">Печально</option>\n";
echo "<option value=\"3\">Удивленно</option>\n";
echo "<option value=\"4\">Ласково</option>\n";
echo "<option value=\"5\">Смущенно</option>\n";
echo "<option value=\"6\">Кокетливо</option>\n";
echo "<option value=\"7\">Обиженно</option>\n";
echo "<option value=\"8\">Настойчиво</option>\n";
echo "<option value=\"9\">Шепотом</option>\n";
echo "<option value=\"10\">Задумчиво</option>\n";
echo "<option value=\"11\">Злобно</option>\n";
echo "</select><br/>\n";
}
echo "<input type=\"submit\" name=\"submit\" value=\"Сказать\" /></form></div>\n";
echo "<a href=\"room.php?rid=$rid&nocache=$nocache\">Назад</a><br/>\n";
echo "<a href=\"index.php\">Меню чата</a><br/>\n";
include("./template/foot.php");
break;
?>