View file chat/user.php

File size: 2.57Kb
<?
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."");
exit;
}



$chel_id=intval($_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."");
exit;
}

if (!isset($user))
{
header("Location: ../info.php?id=$chel_id");
exit;
}

if (isset($_GET['id_r']))
{
$id_r=intval($_GET['id_r']);

}
else
{
header("Location: index.php?".SID."&id_r=$id_r");
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_r=intval($_GET['id_r']);
$q = mysql_query("SELECT * FROM `$mysql[pref]chat_room` WHERE `id` = '$id_r';");
if(mysql_num_rows($q) != 0)
{
$room = mysql_fetch_array($q);
}
else
{
header("Location: index.php?".SID."");
exit;
}


echo "<form method=\"post\" action=\"add_p.php?act=add&amp;id_r=$id_r\">\n";
echo "<div class=\"a1\">\n<div class=\"a2\">\n";
echo "Сообщение:</div>\n<br />\n<textarea name=\"msg\" rows=\"3\">$chel[nickname], </textarea><br />\n";
echo "<input type=\"checkbox\" name=\"tr\" value=\"1\" /> Транслит<br />\n";
echo "<input value=\"Добавить\" type=\"submit\" />\n";
echo "</div>\n";
echo "</form>\n";





if ($chel['level']<$user['level'] && $user['level']>0)
echo "<a href=\"../admin/user.php?id=$chel_id&amp;act=ban\">Бан юзера</a><br />\n";

if ($chel['level']<$user['level'] && $user['level']>1)
echo "<a href=\"../admin/ban.php?id=$chel_id&amp;act=ban\">Бан юзера по IP</a><br />\n";

if (($chel['level']<$user['level'] || $user['id']==$chel_id) && $user['level']>2)
echo "<a href=\"../admin/user.php?id=$chel_id&amp;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&amp;id=$chel_id\">Написать письмо</a><br />\n";


echo "<a href=\"index.php?id_forum=$id_forum&amp;id_razd=$id_razd&amp;id_them=$id_them&amp;page=$page\">Вернуться</a><br />\n";


foot();
?>