Вход Регистрация
Файл: forum.php
Строк: 1053
<?
if (!empty($_POST['ss_'])){
$t intval($_POST['ss_']);
setcookie ("theme"$t);}
$ip=$_SERVER['REMOTE_ADDR'];
session_start();
$title="Форумn";
$font='<font color="#ffd022">';
$fend='</font>';
include (
"header.php");
include (
"aut.php");
include (
"func/translit.php");
include (
"bb.php");

    echo 
$div["im"];
     echo 
"<img src="/logo.gif" alt=""/><br/>";
      echo 
$div["end"];
     echo 
$div["okcent"];
    echo 
$div["gif"];
 
////////////////////////////////////////////////////////////////////////////////
if ($autorize['level'] == '1')
{echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">Админка</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
$div["end"];}
////////////////////////////////////////////////////////////////////////////////
include ('anti_serv.php');
if (
$i >= 1) {
echo 
$div["ten"];
print 
"Личные сообщения! ";
echo 
"[<a href="mail.php?".session_name()."=".session_id()."&amp;mod=input">Читать</a>]<br/>";
echo 
$div["end"];
}
////////////////////////////////////////////////////////////////////////////////

$tm time();
if (
$autorize['log'])
$padd mysql_query("update uzvers set onl='$tm' where `id` = '".$autorize['id']."';"); }

function 
cutString($string$len)
{ if (
strlen($string) <= $len)
{ return 
$string; }
return 
substr($string0$len) . "..."; }

function 
t_smile($str){

$str=str_replace("<img src=","Иди нахуй,Хакер недоделанный",$str);

$str=str_replace(":)","<img src="smile/).gif" alt=":)"/>",$str);

$str=str_replace(":(","<img src="smile/(.gif" alt=":("/>",$str);

$str=str_replace("gg","<img src="smile/gg.gif" alt="Гг"/>",$str);

$str=str_replace("rolf","<img src="smile/ggg.gif" alt="Ггг"/>",$str);

$str=str_replace("8)","<img src="smile/8).gif" alt="Ёу-у"/>",$str);

$str=str_replace("beer","<img src="smile/beer.gif" alt="Пиво"/>",$str);

$str=str_replace("bye","<img src="smile/bye.gif" alt="Пока"/>",$str);

$str=str_replace("cool","<img src="smile/cool.gif" alt="Круто"/>",$str);

$str=str_replace("crazy","<img src="smile/crazy.gif" alt="Сrazy"/>",$str);

$str=str_replace("heart","<img src="smile/heart.gif" alt="Сердце"/>",$str);

$str=str_replace("no","<img src="smile/no.gif" alt="Низнаю"/>",$str);

$str=str_replace("8[","<img src="smile/ooo.gif" alt=""/>",$str);

$str=str_replace("sorry","<img src="smile/sorry.gif" alt="Извиняюсь"/>",$str);

$str=str_replace("wall","<img src="smile/wall.gif" alt="Убейся"/>",$str);

return 
$str; }
////////////////////////////////////////////////////////////////////////////////
$til time();

$kl $til $autorize['clos'];
if ((
$autorize['ban'] == '1')OR ($_SESSION['login'] == '') OR ($kl 86400)){

echo 
$div["ten"];
echo 
'<center>';
echo 
"Вы забанены до ".date('Y.m.d в H:i:s'$autorize['clos'] + 86400)."!<br/>";
echo 
'</center>';
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];
echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<b><a href="enter.php?".session_name()."=".session_id()."&amp;fmode=admin">В кабинет</a></b><br/>";
echo 
$div["end"];

include (
"footer.php");
die();
}

$qi1 mysql_query("select * from `forum_ban` where `ip` = '".$ip."';");
$mi mysql_fetch_array($qi1);
if (
$ip == $mi['0']) {die();}
switch (
$fmode){
#######################################################################################
default:
$ac mysql_query("update uzvers set act='на главной форума' where `id` = '".$autorize['id']."';") or die ('Error!');

$qi mysql_query("select * from `forum_cat`;");
while(
$row=mysql_fetch_array($qi))
{

echo 
$div["ten"];
$q2 mysql_query("select COUNT(*) from `forum_themes` where `cat` = '".$row['id']."';");
$r2=mysql_fetch_array($q2);
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=cat&amp;cid=".$row['id']."">".$row['name']."</a> ";
echo 
" [".($font)."".$r2['0']."".($fend)." / ";

$s 0;
$q2 mysql_query("select * from `forum_themes` where `cat` = '".$row['id']."';");
while(
$r1=mysql_fetch_array($q2))
{
$q3 mysql_query("select * from `forum_msgs` where `topic` = '".$r1['id']."';");
while(
$r3=mysql_fetch_array($q3))
{
$s++;}
}

echo 
"".($font)."$s".($fend)."]<br/>";
echo 
$div["end"];
}


echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
'<center>';
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=help_smile">Смайлы</a>|-|-|";
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=baned">Забаненые</a><br/>";
echo 
'</center>';
echo 
$div["end"];
echo 
$div["ten"];
echo 
'<center>';
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=rating">Рейтинг</a>|-|-|";
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=profile">Профиль</a><br/>";
echo 
'</center>';
echo 
$div["end"];
echo 
$div["ten"];
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<a href="enter.php?".session_name()."=".session_id()."">В панель</a><br/>";
echo 
$div["end"];

$tim time();
$to_on $tim -300;
$qi1 mysql_query("select COUNT(*) from `uzvers` where `onl` > '".$to_on."';");
$ki mysql_fetch_array($qi1);

echo 
$div["ten"];
echo 
'<center>';
echo 
"[ Онлайн: <a href="forum.php?".session_name()."=".session_id()."&amp;fmode=onl">".$ki['0']."</a> ]<br/>";
echo 
'</center>';
echo 
$div["end"];
break;
#######################################################################################
case 'onl':
@
mysql_query("update uzvers set act='смотрит список онлайн' where `id` = '".$autorize['id']."';");
$tim time();
$to_on $tim -300;
$qi1 mysql_query("select * from `uzvers` where `onl` > '".$to_on."' ORDER by `onl` DESC;");
$i =1;
while(
$mi mysql_fetch_array($qi1))
{
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=user&amp;uid=".$mi['id']."">".$mi['log']."</a> - ".$mi['act']."<br/>";
echo 
$div["end"];
}
echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="javascript:history.back(1)">Назад</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'rating':
@
mysql_query("update uzvers set act='смотрит рейтинг' where `id` = '".$autorize['id']."';");

$qi mysql_query("select * from `uzvers` order by `posts` desc LIMIT 0,20;");
$i 0;
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
$i++;
echo 
$i;
echo 
". ".$row['log']." постов: ".$row['posts']."<br/>";
echo 
$div["end"];
}
echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=default">К форуму</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'admin':
@
mysql_query("update uzvers set act='администрирует' where `id` = '".$autorize['id']."';");
if (
$autorize['level'] !== '1') {die();}
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_moder">Модераторы</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_stat">Сменить статус юзеру</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_ban">Забаненные</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_addr">Добавить раздел</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_delr">Удалить раздел</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_del">Удалять темы</a></b><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=truncate">Очистить форум</a></b><br/>";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=default">К форуму</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'truncate';
if (
$autorize['level'] !== '1') {die();}
mysql_query ("truncate table `forum_cat`;");
mysql_query ("truncate table `forum_themes`;");
mysql_query ("truncate table `forum_msgs`;");
echo 
$div["ten"];
echo 
"Форум успешно очищен!";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'a_delr':

if (
$autorize['level'] !== '1') {die();}
if (!empty(
$_GET['rid']))
{
$rid intval($_GET['rid']);
$d1 mysql_query("DELETE FROM `forum_cat` WHERE `id` = $rid");
echo 
$div["ten"];
echo 
"Раздел удален!";
echo 
$div["end"];
}else{
$qi mysql_query("select * from `forum_cat`;");
$i 0;
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
"".$row['name']." [<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=a_delr&amp;rid=".$row['id']."">удалить</a>] <br/>";
echo 
$div["end"];
}
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'a_addr':

if (
$autorize['level'] !== '1') {die();}
if (!empty(
$_POST['nr']))
{
$radd mysql_query("insert into forum_cat set id='',name='".$_POST['nr']."',pos='';") or die ('Error!');
echo 
$div["ten"];
echo 
"Новый раздел добавлен!";
echo 
$div["end"];
}else{
echo 
$div["ten"];
echo 
"<form action="forum.php?".session_name()."=".session_id()."&amp;fmode=a_addr" method="post">
<input class="
ibutton" type="text" name="nr"/><br/>
<input class="
ibutton" type="submit" name="ok" value="Создать"/></form>";
echo 
$div["end"];
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'a_stat':

if (
$autorize['level'] !== '1') {die();}
if (!empty(
$_POST['st']))
{
$sst $_POST['st'];
$sid $_POST['id'];
$radd mysql_query("update uzvers set status_='$sst' where `id` = '$sid';") or die ('Error!');
echo 
$div["ten"];
echo 
"Статус изменен!";
echo 
$div["end"];
}else{
echo 
$div["ten"];
echo 
"<form action="forum.php?".session_name()."=".session_id()."&amp;fmode=a_stat" method="post">
Введите ID:<br/><input class="
ibutton" type="text" name="id"/><br/>
Статус:<br/><input class="
ibutton" type="text" name="st"/><br/>
<input class="
ibutton" type="submit" name="ok" value="Присвоить"/></form>";
echo 
$div["end"];
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'a_moder':

if (
$autorize['level'] !== '1') {die();}
$qi mysql_query("select * from `uzvers` where `level` =  '0';");
$i 0;
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=user&amp;uid=".$row['id']."">".$row['log']."</a>---";
echo 
"[<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=unmod&amp;uid=".$row['id']."">Уволить</a>]";
echo 
"[<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=unmod&amp;uid=".$row['id']."">Бан</a>]<br/>";
echo 
$div["end"];
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'a_ban':

if (
$autorize['level'] !== '1') {die();}
$til time();
$kl $til $autorize['clos'];
$qi mysql_query("select * from `uzvers` where `clos` >  '86400';");
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=user&amp;uid=".$row['id']."">".$row['log']."</a>---";
echo 
"[<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=unban&amp;uid=".$row['id']."">Разбанить</a>]<br/>";
echo 
$div["end"];
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'mod':

if (
$autorize['level'] !== '1') {die();}
$uid intval($_GET['uid']);
$padd mysql_query("update uzvers set level='0' where `id` = '".$uid."';");
    
echo 
$div["ten"];    
echo 
"Модератор назначен!";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'unmod':

if (
$autorize['level'] !== '1') {die();}
$uid intval($_GET['uid']);
$padd mysql_query("update uzvers set level='2' where `id` = '".$uid."';");
    
echo 
$div["ten"];    
echo 
"Модератор уволен!";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'ban':

if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
$uid intval($_GET['uid']);
$m time();
$padd mysql_query("update uzvers set `clos`='".$m."' where `id` = '".$uid."';");
        
echo 
$div["ten"];    
echo 
"Юзер забанен на 24 часа!";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
}else{
die();
}
break;
#######################################################################################
case 'unban':

if (
$autorize['level'] !== '1') {die();}
$uid intval($_GET['uid']);
$padd mysql_query("update uzvers set `clos`='0' where `id` = '".$uid."';");

echo 
$div["ten"];    
echo 
"Юзер разбанен!";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'a_del':

if (
$autorize['level'] !== '1') {die();}
$uid intval($_GET['uid']);
$qi mysql_query("select * from `forum_themes` order by `time` desc;");
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=theme&amp;tid=".$row['id']."">".$row['name']."</a> ";
echo 
" [<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=del_theme&amp;tid=".$row['id']."">Удалить</a>]<br/>";
echo 
$div["end"];
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=admin">К админке</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'profile':

@
mysql_query("update uzvers set act='смотрит свой профиль' where `id` = '".$autorize['id']."';");
$uid $autorize['id'];
$qi mysql_query("select * from `uzvers` where `id` = '$uid' LIMIT 1;");
while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
"Имя: ".$row['log']."<br/>";
echo 
"Пароль: ".$row['psss']."<br/>";
echo 
"Кошелек: ".$row['wm']."<br/>";
echo 
"ICQ: ".$row['icq']."<br/>";
echo 
"Сайт: <a href="".$row['site']."">".$row['site']."</a><br/>";
echo 
"Постов: ".$row['posts']."<br/>";
echo 
"Статус: ".$row['status_']."<br/>";
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=default">К форуму</a><br/>";
echo 
$div["end"];
}
break;

#######################################################################################
case 'cat':
@
mysql_query("update uzvers set act='просматривает раздел' where `id` = '".$autorize['id']."';");
$cid intval($_GET['cid']);
if (
$cid == 0) {$cid=1;}
$startan intval($_GET['startan']);
if(empty(
$startan)) $startan 0;
$startan=intval($startan);
if(
$startan<0$startan=0$num_msgs_an=10;
$arr mysql_query("select * from `forum_themes` where `cat` = '$cid'");
$qi mysql_query("select * from `forum_themes` where `cat` = '$cid' AND `pit` = '1' order by `time` desc limit $startan,$num_msgs_an;");
while(
$row=mysql_fetch_array($qi)){
$q1 mysql_query("select `log` from `uzvers` where `id` = '".$row['author']."';");
$r1=mysql_fetch_array($q1);
$q2 mysql_query("select COUNT(*) from `forum_msgs` where `topic` = '".$row['id']."';");
$r2=mysql_fetch_array($q2);
$tid $row['id'];



echo 
$div["ten"];
print 
''.date('d/m H:i'$row['time']).' <a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=user&amp;uid='.$row['author'].'">'.$r1['0'].'</a><br/>';
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=theme&amp;tid='.$row['id'].'">'.$row['name'].'</a></b> ('.($font).''.$r2['0'].''.($fend).')<br/>';



if (
$r2['0'] > 15){$kt $r2['0'] - 15; print '<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=theme&amp;tid='.$row['id'].'&amp;startan='.$kt.'">'.htmlspecialchars('Далее').'</a>';}
if (
$row['closed'] == 1){print ' ['.($font).'Тема закрыта и закреплена'.($fend).']<br/>';}
else{print 
'['.($font).'Тема закреплена'.($fend).']<br/>';}



if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0')){
print 
'<br/>[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=del_theme&amp;tid='.$row['id'].'">удал</a>]';
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=close&amp;tid='.$row['id'].'">открыть</a>]';
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=pit&amp;tid='.$row['id'].'">раскрепить</a>]<br/>';}
echo 
$div["end"];}

$qi mysql_query("select * from `forum_themes` where `cat` = '$cid' AND `pit` != '1' order by `time` desc limit $startan,$num_msgs_an;");
while(
$row=mysql_fetch_array($qi)){
$q1 mysql_query("select `log` from `uzvers` where `id` = '".$row['author']."';");
$r1=mysql_fetch_array($q1);
$q2 mysql_query("select COUNT(*) from `forum_msgs` where `topic` = '".$row['id']."';");
$r2=mysql_fetch_array($q2);
$tid $row['id'];


echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=user&amp;uid='.$row['author'].'">'.$r1['0'].'</a> '.date('d/m H:i'$row['time']).' <br/><br/>';
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=theme&amp;tid='.$row['id'].'">'.$row['name'].'</a></b> ('.($font).''.$r2['0'].''.($fend).')<br/>';



if (
$r2['0'] > 15){$kt $r2['0'] - 15; print '<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=theme&amp;tid='.$row['id'].'&amp;startan='.$kt.'">'.htmlspecialchars('Далее').'</a>';}



if (
$row['closed'] == 1){print '['.($font).'Тема закрыта'.($fend).']<br/>';}



if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0')){
print 
'<br/>[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=del_theme&amp;tid='.$row['id'].'">удал</a>]';
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=close&amp;tid='.$row['id'].'">отк/зак</a>]';
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=pit&amp;tid='.$row['id'].'">закрепить</a>]<br/>';}
echo 
$div["end"];}

$i = @mysql_num_rows($arr);
echo 
$div["ten"];
if(
$startan!=0)
{print 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=cat&amp;cid=$cid&amp;startan=".($startan-$num_msgs_an)."">".htmlspecialchars("Назад")."</a> ";}
if(
$i>$startan+$num_msgs_an)
{print 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=cat&amp;cid=$cid&amp;startan=".($startan+$num_msgs_an)."">".htmlspecialchars("Далее")."</a><br/>";}
echo 
$div["end"];
echo 
$div["ten"];
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=new_theme&amp;cid='.$cid.'">Создать тему</a></b><br/>';
echo 
$div["end"];
echo 
$div["ten"];
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=default">К разделам</a></b><br/>';
echo 
$div["end"];

$tim time();
$to_on $tim -300;
$qi1 mysql_query("select COUNT(*) from `uzvers` where `onl` > '".$to_on."';");
$ki mysql_fetch_array($qi1);
echo 
$div["ten"];
echo 
'<center>';
print 
'[ Онлайн: <a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=onl">'.$ki['0'].'</a> ]<br/>';
echo 
'</center>';
echo 
$div["end"];
break;



#######################################################################################
case 'new_theme';
@
mysql_query("update uzvers set act='создает тему' where `id` = '".$autorize['id']."';");
$cid intval($_GET['cid']);
$q1 mysql_query("select `name` from `forum_cat` where `id` = '".$cid."';");
$r1=mysql_fetch_array($q1);
if (empty(
$_POST['ok']))
{
echo 
$div["ten"];
print 
'Ваш ник: '.($font).''.$autorize['log'].''.($fend).'<br/>';
print 
'Подфорум: '.($font).''.$r1['0'].''.($fend).'<br/>';
echo 
$div["end"];
if (
$_SESSION['wap']=="xml"){
echo 
$div["ten"];
echo 
"<form action="forum.php?".session_name()."=".session_id()."&amp;fmode=new_theme&amp;cid=".$cid."" method="post">
Название темы: <br/><input class="
ibutton" type="text" name="topic_name" /><br/>
Сообщение:<br/><textarea class="
ibutton" name="msg" cols="27" rows="4"></textarea><br/>
Транслит: <select name="
trans"><option value="0">Нет</option><option value="1">Да</option></select><br/>
<input class="
ibutton" type="submit" name="ok" value="Создать"/></form>";
echo 
$div["end"];

echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=help_smile&amp;cid='.$cid.'">Смайлы</a><br/>';
echo 
$div["end"];
}else{
print 
'Название темы: <br/>
</small><input type="text" name="topic_name"/><br/>
<small>Сообщение:<br/></small>
<input name="msg" type="text"/><br/>
<small>Транслит:<br/></small>
<select name="trans">
<option value="0">Нет</option>
<option value="1">Да</option>
</select><br/><small>
<anchor title="send">Создать<go href="forum.php?'
.session_name().'='.session_id().'&amp;fmode=new_theme&amp;cid='.$cid.'" method="post">
<postfield name="topic_name" value="$(topic_name)"/>
<postfield name="msg" value="$(msg)"/>
<postfield name="trans" value="$(trans)"/>
<postfield name="ok" value="new"/>
</go></anchor><br/>'
;
}
}else{
echo 
$div["ten"];
$trans intval($_POST['trans']);
$tmm time();
$tname an($_POST['topic_name']);
$tmsg an($_POST['msg']);
$tmsg t_smile($tmsg);
$tmsg=preg_replace("#(https?|ftp)://S+[^s.,>)];'"!?]#",'<a href="go.php?url=\0">\0</a>',$tmsg);
$error '';
$rz $tmm $autorize['upd'];
if (
$trans 1$trans 1;
if (
$trans == 1) {
$tname latrus($tname);
$tmsg latrus($tmsg);
}
$tmsg bb_codes($tmsg);
if ((
$autorize['level'] = '1') OR ($autorize['level'] = '0')){}else{    if ($rz <= 15$error='Одно сообщение в 15 секунд!<br/>';}
if(empty(
$tname)) $error='Не введено название темы!<br/>';
if(empty(
$tmsg)) $error=$error.'Не введено сообщение!<br/>';
$tname cutString($tname40);
$tmsg cutString($tmsg1000);
$tmsg str_replace('rnrn''<br/>'$tmsg);
if (empty(
$error))
{
$tadd mysql_query("insert into forum_themes set id='',cat='$cid',name='$tname',author='".$autorize['id']."',closed='0', time='".time()."';") or die ('Error!');
$idd mysql_insert_id();
$madd mysql_query("insert into forum_msgs set id='',topic='$idd',aut='".$autorize['id']."',msg='$tmsg', time='".time()."';") or die ('Error!');
$padd mysql_query("update uzvers set posts=posts+1 where `id` = '".$autorize['id']."';");
$padd mysql_query("update uzvers set upd='$tmm' where `id` = '".$autorize['id']."';");
print 
'Тема создана!<br/>';
echo 
$div["end"];
echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=theme&amp;tid='.$idd.'">К теме</a><br/>';
}else{
print 
$error;
}
echo 
$div["end"];
}

echo 
$div["ten"];
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'">К разделам</a></b><br/>';
echo 
$div["end"];
break;
#######################################################################################
case 'new_post';

@
mysql_query("update uzvers set act='отвечает в теме' where `id` = '".$autorize['id']."';");
$tid intval($_GET['tid']);
$q1 mysql_query("select `name` from `forum_themes` where `id` = '".$tid."';");
$r1=mysql_fetch_array($q1);
if (empty(
$_POST['ok']))
{
echo 
$div["ten"];
print 
'Ваш ник: '.($font).''.$autorize['log'].''.($fend).'<br/>';
print 
'Тема: '.($font).''.$r1['0'].''.($fend).'<br/>';
echo 
$div["end"];

if (
$_SESSION['wap']=="xml"){
echo 
$div["ten"];
echo 
"<form action="forum.php?".session_name()."=".session_id()."&amp;fmode=new_post&amp;tid=".$tid."" method="post">
<textarea name="
msg" cols="27" rows="4"></textarea><br/>
Транслит:<select name="
trans"><option value="0">Нет</option><option value="1">Да</option></select><br/>
<input class="
ibutton" type="submit" name="ok" value="Написать"/></form>";
echo 
$div["end"];

echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=help_smile&amp;cid='.$cid.'">Смайлы</a><br/>';
echo 
$div["end"];

}else{
print 
'Сообщение:<br/></small>
<input name="msg" type="text"/><br/>
<small>Транслит:<br/></small>
<select name="trans">
<option value="0">Нет</option>
<option value="1">Да</option>
</select><br/><small>
<anchor title="send">Написать<go href="forum.php?'
.session_name().'='.session_id().'&amp;fmode=new_post&amp;tid='.$tid.'" method="post">
<postfield name="ok" value="$(new)"/>
<postfield name="msg" value="$(msg)"/>
</go></anchor><br/>'
;
}
}else{
echo 
$div["ten"];
$trans intval($_POST['trans']);
$tid $_GET['tid'];
$q1 mysql_query("select * from `forum_themes` where `id` = '".$tid."';");
$r1=mysql_fetch_array($q1);
$tmm time();
$tmsg an($_POST['msg']);
$tmsg cutString($tmsg1000);
$tmsg t_smile($tmsg);
$tmsg=preg_replace("#(https?|ftp)://S+[^s.,>)];'"!?]#",'<a href="go.php?url=\0">\0</a>',$tmsg);
if ($trans 1$trans 1;
if (
$trans == 1) {
$tname latrus($tname);
$tmsg latrus($tmsg);
}
$tmsg bb_codes($tmsg);
$error '';
if (
$r1['closed'] == '1'$error=$error.'Тема закрыта<br/>';
if(empty(
$tmsg)) $error=$error.'Не введено сообщение!<br/>';
$rz $tmm $autorize['upd'];
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0')){}else{if ($rz <= 15$error='Одно сообщение в 15 секунд!<br/>';}
$tmsg str_replace('rn''<br/>'$tmsg);
$tmsg str_replace('rnrn''<br/>'$tmsg);
if (empty(
$error))
{
$madd mysql_query("insert into forum_msgs set id='',topic='$tid',aut='".$autorize['id']."',msg='$tmsg', time='".time()."';") or die ('Error!');
$padd mysql_query("update uzvers set posts=posts+1 where `id` = '".$autorize['id']."';");
$padd mysql_query("update uzvers set upd='$tmm' where `id` = '".$autorize['id']."';");
$io time();
$padd mysql_query("update forum_themes set time='".$io."' where `id` = '".$tid."';");

print 
'Сообщение добавлено!<br/>';
echo 
$div["end"];
echo 
$div["ten"];
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=theme&amp;tid='.$tid.'">Перейти в тему</a></b><br/>';

}else{
print 
$error;
}
echo 
$div["end"];
}
echo 
$div["ten"];
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=cat&amp;cid=30">Перейти в раздел</a></b>';
echo 
$div["end"];
break;
#######################################################################################
case 'user':
@
mysql_query("update uzvers set act='смотрит профиль пользователя' where `id` = '".$autorize['id']."';");
$uid intval($_GET['uid']);
$qi mysql_query("select * from `uzvers` where `id` = '$uid' LIMIT 1;");
while(
$row=mysql_fetch_array($qi))
{if (
$autorize['level'] == '1'){
echo 
$div["ten"];
if (
$row['level'] !== '0'){print '[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=mod&amp;uid='.$row['id'].'">Сделать модератором</a>]';}
else{print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=unmod&amp;uid='.$row['id'].'">Снять модератора</a>]';}
echo 
$div["end"];}

if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
echo 
$div["ten"];
if (
$row['ban'] == '0')
{
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=ban&amp;uid='.$row['id'].'">Банить</a>]';
}else{
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=unban&amp;uid='.$row['id'].'">Разбан</a>]';
}
print 
'[<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=ban_ip&amp;uid='.$row['id'].'">Бан по IP</a>]<br/>';
echo 
$div["end"];
}

echo 
$div["ten"];
print 
'Ник: '.($font).''.$row['log'].''.($fend).'<br/>';
print 
'ID: '.($font).''.$row['id'].''.($fend).'<br/>';
if (
$autorize['level'] == '1')
{
print 
'Пароль: '.($font).''$row['psss'].''.($fend).'<br/>';
print 
'Адреса: '.($font).''$row['ip1'].','.$row['ip2'].','.$row['ip3'].','.$row['ip4'].','.$row['ip5'].''.($fend).'<br/>';
}
if (
$row['level'] == 2) { $lvl ''.($font).'Пользователь'.($fend).'';}
if (
$row['level'] == 1) { $lvl ''.($font).'Администратор'.($fend).'';}
if (
$row['level'] == 0) { $lvl ''.($font).'Модератор'.($fend).'';}
print 
'Уровень: '.($font).''.$lvl.''.($fend).'<br/>';
print 
'Кошелек: '.($font).''.$row['wm'].''.($fend).'<br/>';
print 
'ICQ: '.($font).''.$row['icq'].''.($fend).'<br/>';
print 
'Сайт: <a href="'.$row['site'].'">'.$row['site'].'</a><br/>';
print 
'Постов: '.($font).''.$row['posts'].''.($fend).'<br/>';
print 
'Статус: '.($font).''.$row['status_'].''.($fend).'<br/>';
echo 
$div["end"];
echo 
$div["ten"];
print 
'<a href="javascript:history.back(1)">Назад</a><br/>';
echo 
$div["end"];
}
break;
#######################################################################################
case 'help_smile':
    @
mysql_query("update uzvers set act='смотрит смайлы' where `id` = '".$autorize['id']."';");

echo 
$div["ten"];
echo 
"".($font)." :) ".($fend)." | <img src="smile/).gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." :( ".($fend)." | <img src="smile/(.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." gg ".($fend)." | <img src="smile/gg.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." rolf ".($fend)." | <img src="smile/ggg.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." 8) ".($fend)." | <img src="smile/8).gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." beer ".($fend)." | <img src="smile/beer.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." bye ".($fend)." | <img src="smile/bye.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." cool ".($fend)." | <img src="smile/cool.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." crazy ".($fend)." | <img src="smile/crazy.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." heart ".($fend)." | <img src="smile/heart.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." no ".($fend)." | <img src="smile/no.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." 8[ ".($fend)." | <img src="smile/ooo.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." sorry ".($fend)." | <img src="smile/sorry.gif" alt=""/><br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"".($font)." wall ".($fend)." | <img src="smile/wall.gif" alt=""/><br/>";
echo 
$div["end"];

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="javascript:history.back(1)">Назад</a><br/>";
echo 
$div["end"];
break;
#######################################################################################
case 'theme':
@
mysql_query("update uzvers set act='просматривает тему' where `id` = '".$autorize['id']."';");
$tid intval($_GET['tid']);
$startan intval($_GET['startan']);
if(empty(
$startan)) $startan 0;
$startan=intval($startan);
if(
$startan<0$startan=0$num_msgs_an=15;
$arr mysql_query("select * from `forum_msgs` where `topic` = '$tid'");
$qi mysql_query("select * from `forum_msgs` where `topic` = '$tid' order by `time` ASC limit $startan,$num_msgs_an;");
while(
$row=mysql_fetch_array($qi))
{
$_m1 '';
$_m2 '';
$q1 mysql_query("select `log`, `level`, `onl` from `uzvers` where `id` = '".$row['aut']."';");
$r1=mysql_fetch_array($q1);
if (
$r1['level'] == 0)
{
if (
$_SESSION['wap']=="xml")$_m1 '';
else 
$_m1 '';
if (
$_SESSION['wap']=="xml")$_m2 '';
else 
$_m2 '';
}
if (
$r1['level'] == 1)
{
if (
$_SESSION['wap']=="xml")$_m1 '';
else 
$_m1 '';
if (
$_SESSION['wap']=="xml")$_m2 '';
else 
$_m2 '';
}
$now_time time();
$huy $now_time $r1['2'];
if (
$huy <= 300) {
$stat true;
}else{
$stat false;
}
echo 
$div["ten"];
print 
'<a href="mail.php?'.session_name().'='.session_id().'&amp;mod=sent&amp;user='.$r1['0'].'"><img src="pismo.gif" alt="private"/></a> ('.date('H:i d/m'$row['time']).')';
print 
' '.$_m1.'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=user&amp;uid='.$row['aut'].'">'.$r1['0'].'</a>'.$_m2.' ';
    
if (!
$stat){
if (
$_SESSION['wap']=="xml")print ' ['.($font).'не в сети'.($fend).']';
else print 
' ['.($font).'не в сети'.($fend).']';

}else{
if (
$_SESSION['wap']=="xml")print ' ['.($font).'в сети'.($fend).']';
else  print 
' ['.($font).'в сети'.($fend).']';
}

if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0')){
if (
$_SESSION['wap']=="xml")print ' [<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=del_post&amp;pid='.$row['id'].'">удал</a>]';
else print 
' [<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=del_post&amp;pid='.$row['id'].'">удал</a>]';}

print 
'<br/><br/>';

if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0')){
if (
$_SESSION['wap']=="xml")print '<font color="yellow"><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=edit_post&amp;pid='.$row['id'].'">edit</a></font> ';
else print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=edit_post&amp;pid='.$row['id'].'">edit</a> ';}

if (
$_SESSION['wap']=="xml")
print 
$row['msg'];
else print  
''.wml_valid($row['msg']).'<br/>';
echo 
$div["end"];
}
    

echo 
$div["ten"];
$i = @mysql_num_rows($arr);
if(
$startan!=0){
print 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=theme&amp;tid=$tid&amp;startan=".($startan-$num_msgs_an)."">".htmlspecialchars("Назад")."</a></b><br/>"$a=1;}
if(
$i>$startan+$num_msgs_an){
print 
"<b><a href="forum.php?".session_name()."=".session_id()."&amp;fmode=theme&amp;tid=$tid&amp;startan=".($startan+$num_msgs_an)."">".htmlspecialchars("Далее")."</a></b><br/>"$a =1;}
echo 
$div["end"];

if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
echo 
$div["ten"];
print 
'<b><a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=del_theme&amp;tid='.$tid.'">Удалить тему</a></b><br/>';
echo 
$div["end"];
}

echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=new_post&amp;tid='.$tid.'">Новое сообщение</a><br/>';
echo 
$div["end"];
$q1 mysql_query("select `cat` FROM `forum_themes` WHERE `id` = $tid");
$r1=mysql_fetch_array($q1);
echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=cat&amp;cid='.$r1['0'].'">К темам</a><br/>';
echo 
$div["end"];
echo 
$div["ten"];
print 
'<a href="forum.php?'.session_name().'='.session_id().'">К разделам</a><br/>';
echo 
$div["end"];


$tim time();
$to_on $tim -300
$qi1 mysql_query("select COUNT(*) from `uzvers` where `onl` > '".$to_on."';");
$ki mysql_fetch_array($qi1);

echo 
$div["ten"];
echo 
'<center>';
print 
'[ Онлайн: <a href="forum.php?'.session_name().'='.session_id().'&amp;fmode=onl">'.$ki['0'] .'</a> ]<br/>';
echo 
'</center>';
echo 
$div["end"];
break;
#######################################################################################
case 'del_theme':

$tid intval($_GET['tid']);
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
$q1 mysql_query("select `cat` FROM `forum_themes` WHERE `id` = $tid");
$r1=mysql_fetch_array($q1);
$d1 mysql_query("DELETE FROM `forum_themes` WHERE `id` = $tid");
if (
$d1)
{
echo 
$div["ten"];
echo 
"Тема удалена<br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=cat&amp;cid=".$r1['0']."">Перейти в раздел</a><br/>";
echo 
$div["end"];
}
}
else
{
die (
'Нет доступа');
}
break;

##################################################################################
case 'baned':

@
mysql_query("update uzvers set act='bnd' where `id` = '".$autorize['id']."';");
$til time();
$kl $til $autorize['clos'];
$qi mysql_query("select * from `uzvers` where `clos` >  '86400';");
if (
mysql_affected_rows()==0)
{
echo 
$div["ten"];
echo 
"Забаненых нет!<br/>";
echo 
$div["end"];
}else{

while(
$row=mysql_fetch_array($qi))
{
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=user&amp;uid=".$row['id']."">".$row['log']."</a> -";
echo 
$div["end"];
}
}

echo 
$div["ten"];
echo 
$div["end"];

echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=default">К форуму</a><br/>";
echo 
$div["end"];
break;

#######################################################################################
case 'close':

$tid intval($_GET['tid']);
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
$qi mysql_query("select * from `forum_themes` where `id` = '$tid';");
$m0 mysql_fetch_array($qi);
if (
$m0['closed'] == 1)
{
$radd mysql_query("update forum_themes set closed='0' where `id` = '$tid';") or die ('Error!');
echo 
$div["ten"];        
echo 
"Тема открыта!";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}else{
$radd mysql_query("update forum_themes set closed='1' where `id` = '$tid';") or die ('Error!');
echo 
$div["ten"];
echo 
"Тема закрыта!";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}
}else{
die (
'Нет доступа');
}
break;
#######################################################################################
case 'pit':
$tid intval($_GET['tid']);
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
$qi mysql_query("select * from `forum_themes` where `id` = '$tid';");
$m0 mysql_fetch_array($qi);
if (
$m0['pit'] == 1)
{
$radd mysql_query("update forum_themes set pit='0' where `id` = '$tid';") or die ('Error!');
echo 
$div["ten"];
echo 
"Тема раскреплена!";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}else{
$radd mysql_query("update forum_themes set pit='1' where `id` = '$tid';") or die ('Error!');
echo 
$div["ten"];
echo 
"Тема закреплена!";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}
}else{
die (
'Нет доступа');
}
break;
#######################################################################################
case 'del_post':
$pid intval($_GET['pid']);
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
$q1 mysql_query("select `topic` FROM `forum_msgs` WHERE `id` = $pid");
$r1=mysql_fetch_array($q1);
$d1 mysql_query("DELETE FROM `forum_msgs` WHERE `id` = $pid");
if (
$d1)
{
echo 
$div["ten"];
echo 
"Сообщение удалено!<br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<a href="forum.php?".session_name()."=".session_id()."&amp;fmode=theme&amp;tid=".$r1['0']."">В тему</a><br/>";
echo 
$div["end"];
}
}else{
die (
'Нет доступа');
}
break;
#######################################################################################
case 'del_file':

$pid intval($_GET['fid']);
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
$d1 mysql_query("DELETE FROM `forum_files` WHERE `id` = $fid");
if (
$d1)
{
echo 
$div["ten"];
echo 
"Файл удален!<br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}
}else{
die (
'Нет доступа');
}
break;
#######################################################################################
case 'edit_post':

$pid intval($_GET['pid']);
if ((
$autorize['level'] == '1') OR ($autorize['level'] == '0'))
{
if (empty(
$_POST)){
$q1 mysql_query("select `topic`, `msg` FROM `forum_msgs` WHERE `id` = $pid");
$r1=mysql_fetch_array($q1);
$m htmlspecialchars($r1['1']);
echo 
$div["ten"];
echo 
"<form action="forum.php?".session_name()."=".session_id()."&amp;fmode=edit_post&amp;pid=".$pid."" method="post" name="qt">
Сообщение:<br/><input class="
ibutton" type="text" value="".$m."" name="post"/><br/>
<input class="
ibutton" type="submit" value="Изменить" name="3post"/></form>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}else{

$mm $_POST['post'].'
<br/>Отредактировал '
.$autorize['log'].' 'date('d.m.Y в H:i'time()).'';

$pid $_GET['pid'];
$io mysql_query("update forum_msgs set msg='$mm' where `id` = '$pid';") or die ('Error!');

echo 
$div["ten"];
echo 
"Сообщение изменено!<br/>";
echo 
$div["end"];
echo 
$div["ten"];
echo 
"<b><a href="javascript:history.back(1)">Назад</a></b><br/>";
echo 
$div["end"];
}
}else{
die (
'Нет доступа');
}
#######################################################################################
}

$tim time();
$to_on $tim -300;
$qi1 mysql_query("select COUNT(*) from `uzvers` where `onl` > '".$to_on."';");
$ki mysql_fetch_array($qi1);
include (
"footer.php");
?>
Онлайн: 0
Реклама