View file guest/user.php

File size: 2.47Kb
<?

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['mp']))

define('G', BASEDIR);

else

define('G', BASEDIR.'guest/');


if (!isset($_GET['id_user']))

{

header("Location: ".G."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);

}



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";



if ($chel_id!=0)

$nick = "[b]$chel[nickname][/b], ";

else $nick = '';


echo "<form method=\"post\" action=\"add.php?act=add".((isset($_GET['mp'])) ? '&amp;mp' : '')."\">\n";


echo "<b>Сообщение:</b><br />\n<br />\n<textarea name=\"msg\" class=\"form\" rows=\"3\">$nick</textarea><br />\n";

//echo "<input type=\"checkbox\" name=\"tr\" value=\"1\" /> Транслит<br />\n";

echo "<input value=\"Добавить\" class=\"form\" type=\"submit\" />\n";


echo "</form>\n";


if ($chel_id!=0)

{

if ($chel['level']<$user['level'] && $user['level']>0)

echo "<a href=\"".BASEDIR."admin/user.php?id=$chel_id&amp;act=ban\">Бан юзера</a><br />\n";


if ($chel['level']<$user['level'] && $user['level']>1)

echo "<a href=\"".BASEDIR."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=\"".BASEDIR."admin/user.php?id=$chel_id&amp;act=data\">Изменить данные</a><br />\n";

echo "<a href=\"".BASEDIR."info.php?id=$chel_id\">Анкета</a><br />\n";


if ($user['id']!=$chel_id)echo "<a href=\"".BASEDIR."mail.php?act=crt&amp;id=$chel_id\">Написать письмо</a><br />\n";

}


echo "<a href=\"".G."index.php\">Вернуться</a><br />\n";

if(!isset($_GET['mp']))

echo "<a href=\"../index.php\">На главную</a><br />\n";

foot();

?>