Размер файла: 3.36Kb
<?
include_once "../SYSTEM/include/functions.php";
include_once "../SYSTEM/include/mysql.php";
include_once "../SYSTEM/include/param.php";
include_once "../SYSTEM/include/ban.php";
include_once "../SYSTEM/include/sess.php";
include_once "../SYSTEM/include/ban_2.php";
include_once "../SYSTEM/include/theme.php";
$title='Написать';
$mesto='Пишет в форуме';
head();
if (!isset($_GET['id_user']))
{
header("Location: index.php?".SID."&id_forum=$id_forum&id_razd=$id_razd&id_them=$id_them&page=$page");
exit;
}
$chel_id=$_GET['id_user'];
$q = mysql_query("SELECT * FROM `$mysql[pref]users` WHERE `id` = '$chel_id';");
if(mysql_num_rows($q) != 0)
{
$chel = mysql_fetch_array($q);
}
else
{
header("Location: index.php?".SID."&id_forum=$id_forum&id_razd=$id_razd&id_them=$id_them&page=$page");
exit;
}
if (!isset($user))
{
header("Location: ../info.php?id=$chel_id");
exit;
}
if (isset($_GET['id_them']) && isset($_GET['id_razd']) && isset($_GET['id_forum']))
{
$id_forum=intval($_GET['id_forum']);
$id_razd=intval($_GET['id_razd']);
$id_them=intval($_GET['id_them']);
$page=$_GET['page'];
}
else
{
header("Location: index.php?".SID."&id_forum=$id_forum&id_razd=$id_razd&id_them=$id_them&page=$page");
exit;
}
echo "<div class=\"h\">Ответить $chel[nickname]</div><hr />\n";
if ($mail_in_new>0)echo "<div class=\"privat\"><img src=\"../SYSTEM/themes/$them/img/mail0.gif\" alt=\"\" /> <a href=\"../mail.php?act=in\">Приват</a> [$mail_in_new]</div><hr />\n";
$id_them=intval($_GET['id_them']);
$q = mysql_query("SELECT * FROM `$mysql[pref]forum_t` WHERE `id_f` = '$id_forum' AND `id_r` = '$id_razd' AND `id` = '$id_them';");
if(mysql_num_rows($q) != 0)
{
$thema = mysql_fetch_array($q);
}
else
{
header("Location: index.php?".SID."&id_forum=$id_forum&id_razd=$id_razd&id_them=$id_them&page=$page");
exit;
}
if ($thema['close']==0)
{
echo "<form method=\"post\" action=\"add_p.php?act=add&id_forum=$id_forum&id_razd=$id_razd&id_them=$id_them&page=$page\">\n";
echo "<b>Сообщение:</b><br />
<textarea name=\"msg\" class=\"form\" rows=\"3\">$chel[nickname], </textarea><br />\n";
//echo "<input type=\"checkbox\" name=\"tr\" value=\"1\" /> Транслит<br />\n";
echo "<input value=\"Добавить\" class=\"form\" type=\"submit\" />\n";
echo "</form>\n";
}
echo "<a href=\"../PAGES/smiles.php\">Смайлики !</a><br />\n";
if ($user['level']>0)echo "<a href=\"../admin_dfbdaba8c8508412d239e603506162f8/user.php?id=$chel_id&act=ban\">Бан юзера</a><br />\n";
if ($user['level']>1)echo "<a href=\"../admin_dfbdaba8c8508412d239e603506162f8/ban.php?id=$chel_id&act=ban\">Бан юзера по IP</a><br />\n";
if ($chel['level']<$user['level'] || $user['id']==$chel_id && $user['level']>2)
echo "<a href=\"../admin_dfbdaba8c8508412d239e603506162f8/user.php?id=$chel_id&act=data\">Изменить данные</a><br />\n";
echo "<a href=\"../info.php?id=$chel_id\">Анкета</a><br />\n";
if ($user['id']!=$chel_id)echo "<a href=\"../mail.php?act=crt&id=$chel_id\">Написать письмо</a><br />\n";
echo "<a href=\"index.php?id_forum=$id_forum&id_razd=$id_razd&id_them=$id_them&page=$page\">Вернуться</a><br />\n";
foot();
?>