Просмотр файла include/moder.php

Размер файла: 44.16Kb
<?php
INCLUDE_ONCE("connect.php");
include_once("config.php");
include_once("users.php");
include_once("functions.php");
if($status == "moderator" or $status == "admin")
 {

	switch($_GET['mode'])
	{
	case 'mtopic':
	$id_theme = intval($_GET['id']);
	$t_i = mysql_query("SELECT * FROM `themes` WHERE `id`=".$id_theme);
	if(mysql_num_rows($t_i) < 1)
	{
		if($version == "wml")
			{
				header('Content-type: text/vnd.wap.wml; charset=utf-8');
				header("Cache-Control: no-cache");
				echo(doctype("Ошибка").'
Тема удалена! <br/>
---   <br />
<a href="./?p=0&amp;v=wml&amp;sid='.$sid.'">Форумы</a>
</p></card></wml>');
			} elseif($version == "xhtml")
				{
					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");
					echo('<html>
<head>
<title>Ошибка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'">
<font color="#FFFFFF"><b>Ошибка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'"></td></tr>
<tr><td bgcolor="'.$style['text'].'">Тема удалена</td></tr>
<tr><td bgcolor="'.$style['bottom'].'">
<a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'">Назад</a>
</td></tr></table>
</body></html>');
				}
	} else
	{
	$id_post = topic2post($id_theme);
	$SQL = mysql_query("SELECT * FROM `posts` WHERE `id`=".$id_post);
	$line = mysql_fetch_array($SQL);
	$sqls = mysql_query("SELECT status FROM users WHERE username = '".$line['name']."'");
	$rows = mysql_fetch_assoc($sqls);
	$t_info = mysql_fetch_array($t_i);
	if($version == "wml")
	{
 		header("Content-type: text/vnd.wap.wml; charset=utf-8");
 		header("Cache-Control: no-cache");
echo(doctype("Модераторская").'Логин ['.$line['name'].'] <br/>
User-Agent: ['.strtok($line['useragent'], "/").'] <br/>
IP: ['.$line['ip'].']<br/>
---<br />
<a href="./?p=25&amp;mode=del&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=wml&amp;fid='.$t_info['id_forum'].'">Удалить тему</a><br/>');
	if($t_info['pos'] == 1)
	{
		echo('<a href="./?p=25&amp;mode=bolt&amp;b=1&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=wml&amp;fid='.$t_info['id_forum'].'">Закрепить тему</a><br/>');
	} else
	{
		echo('<a href="./?p=25&amp;mode=bolt&amp;b=0&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=wml&amp;fid='.$t_info['id_forum'].'">Открепить тему</a><br/>');
	}
echo('---<br/>
Блокировать на :<br/>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select><br/>
Причина: <br/>
<input type="text" name="mess"/><br/>
<anchor>[Блокировать]
<go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=ban" method="post">
<postfield name="time" value="$(time)"/>
<postfield name="mess" value="$(mess)"/>
<postfield name="who" value="'.$line['name'].'"/>
<postfield name="ip" value="'.$line['ip'].'"/>
<postfield name="ua" value="'.$line['useragent'].'"/>
<postfield name="fid" value="'.$t_info['id_forum'].'"/>

</go></anchor><br/><br/>
- - - <br/>
Переименовать:<br/>
<input type="text" name="rename" value="'.$t_info['tname'].'"/> <br/>
<anchor>[Переименовать]
<go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=rename" method="post">
<postfield name="rename" value="$(rename)"/>
<postfield name="tid" value="'.$id_theme.'"/>
<postfield name="fid" value="'.$t_info['id_forum'].'"/>
</go></anchor><br/>
- - - <br/>
Переместить:<br/>
<select name="nf">');
$fidsS = mysql_query("SELECT id, name FROM `forums`");
while($fids = mysql_fetch_array($fidsS))
	{
		echo('<option value="'.$fids['id'].'">'.$fids['name'].'</option>');
 	}
 echo('</select><br />
 <anchor>[Переместить]
 <go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=nf" method="post">
 <postfield name="nf" value="$(nf)"/>
<postfield name="tid" value="'.$id_theme.'"/>
<postfield name="fid" value="'.$t_info['id_forum'].'"/>
</go></anchor><br/>
- - - <br/>
<a href="./?p=25&amp;mode=adel&amp;v=wml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br />
<a href="./?p=2&amp;v=wml&amp;sid='.$sid.'&amp;f='.$t_info['id_forum'].'">Назад</a><br />

</p></card></wml>');
					} elseif($version == "xhtml")
					{
						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");
						echo('<html>
<head>
<title>Модерка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'" colspan="2">
<font color="#FFFFFF"><b>Модерка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'" colspan="2">
<a href="./?p=25&amp;mode=del&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=xhtml&amp;fid='.$t_info['id_forum'].'" style="background-color: #FF0000; color: #FFFFFF; text-decoration: underline">Удалить тему</a><br/>');
	if($t_info['pos'] == 1)
	{
		echo('<a href="./?p=25&amp;mode=bolt&amp;b=1&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=xhtml&amp;fid='.$t_info['id_forum'].'">Закрепить тему</a><br/>');
	} else
	{
		echo('<a href="./?p=25&amp;mode=bolt&amp;b=0&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=xhtml&amp;fid='.$t_info['id_forum'].'">Открепить тему</a><br/>');
	}
echo('</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Логин:</td><td> ['.$line['name'].']</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
User-Agent:</td><td>['.strtok($line['useragent'], "/").'] </td></tr>
<tr bgcolor="'.$style['text'].'"><td>
IP:</td><td> [<a href="./?p=25&amp;v='.$version.'&amp;mode=whois&amp;sid='.$sid.'&amp;ip='.$line['ip'].'">'.$line['ip'].'</a>]</td></tr>');
if($rows['status'] == 'user')
{
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=ban" method="post">
Блокировать на:</td><td>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Причина: </td><td>
<input type="text" name="mess"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td align="center" colspan="2">
<input type="submit" value="Блокировать"/><br/>
<input type="hidden" name="ua" value="'.$line['useragent'].'"/>
<input type="hidden" name="who" value="'.$line['name'].'"/>
<input type="hidden" name="ip" value="'.$line['ip'].'"/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'"/>
</form></td></tr>');}
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=rename" method="post">
Переименовать:</td><td>
<input type="text" name="rename" value="'.$t_info['tname'].'"/><br/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'" />
<input type="hidden" name="tid" value="'.$id_theme.'"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td colspan="2" align="center">
<input type="submit" value="Переименовать" />
</form></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Переместить:</td><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=nf" method="post">
<select name="nf">');
$fidsS = mysql_query("SELECT id, name FROM `forums`");
while($fids = mysql_fetch_array($fidsS))
	{
		echo('<option value="'.$fids['id'].'">'.$fids['name'].'</option>');
 	}
 echo('</select><br />
 <input type="hidden" name="fid" value="'.$t_info['id_forum'].'"/>
 <input type="hidden" name="tid" value="'.$id_theme.'"/>
 </td></tr>
 <tr bgcolor="'.$style['text'].'"><td align="center" colspan="2">
 <input type="submit" value="Переместить"/>
 </form></td></tr>
<tr bgcolor="'.$style['bottom'].'"><td colspan="2">
<a href="./?p=25&amp;mode=adel&amp;v=xhtml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br />
<a href="./?p=2&amp;v=xhtml&amp;sid='.$sid.'&amp;f='.$t_info['id_forum'].'">Назад</a><br />
</td></tr></table>
</body></html>');
			  }
		}
break;

case 'mtopicm':
if( in_array($status, array('admin')) )
			{	
			$id_theme = intval($_GET['id']);
	$t_i = mysql_query("SELECT * FROM `mthemes` WHERE `id`=".$id_theme);
	if(mysql_num_rows($t_i) < 1)
	{
		if($version == "wml")
			{
				header('Content-type: text/vnd.wap.wml; charset=utf-8');
				header("Cache-Control: no-cache");
				echo(doctype("Ошибка").'
Тема удалена!  <br />
---   <br />
<a href="./?p=1&amp;v=wml&amp;sid='.$sid.'">Форумы</a>
</p></card></wml>');
			} elseif($version == "xhtml")
				{
					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");
					echo('<html>
<head>
<title>Ошибка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'">
<font color="#FFFFFF"><b>Ошибка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'"></td></tr>
<tr><td bgcolor="'.$style['text'].'">Тема удалена</td></tr>
<tr><td bgcolor="'.$style['bottom'].'">
<a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'">Назад</a>
</td></tr></table>
</body></html>');
				}
	} else
	{
	$id_post = topic2postm($id_theme);
	$SQL = mysql_query("SELECT * FROM `mposts` WHERE `id`=".$id_post);
	$line = mysql_fetch_array($SQL);
	$sqls = mysql_query("SELECT status FROM users WHERE username = '".$line['name']."'");
	$rows = mysql_fetch_assoc($sqls);
	$t_info = mysql_fetch_array($t_i);
	if($version == "wml")
	{
 		header("Content-type: text/vnd.wap.wml; charset=utf-8");
 		header("Cache-Control: no-cache");
echo(doctype("Модераторская").'Логин ['.$line['name'].'] <br/>
User-Agent: ['.strtok($line['useragent'], "/").']<br/>
IP: ['.$line['ip'].'] <br />
---<br />
<a href="./?p=25&amp;mode=delm&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=wml&amp;fid='.$t_info['id_forum'].'">Удалить тему</a><br/>');
	if($t_info['pos'] == 1)
	{
		echo('<a href="./?p=25&amp;mode=boltm&amp;b=1&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=wml&amp;fid='.$t_info['id_forum'].'">Закрепить тему</a><br/>');
	} else
	{
		echo('<a href="./?p=25&amp;mode=boltm&amp;b=0&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=wml&amp;fid='.$t_info['id_forum'].'">Открепить тему</a><br/>');
	}
echo('---<br/>
Блокировать на : <br/>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select><br/>
Причина: <br/>
<input type="text" name="mess"/><br/>
<anchor>[Блокировать]
<go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=ban" method="post">
<postfield name="time" value="$(time)"/>
<postfield name="mess" value="$(mess)"/>
<postfield name="who" value="'.$line['name'].'"/>
<postfield name="ip" value="'.$line['ip'].'"/>
<postfield name="ua" value="'.$line['useragent'].'"/>
<postfield name="fid" value="'.$t_info['id_forum'].'"/>
</go></anchor><br/><br/>
- - - <br />
Переименовать:<br/>
<input type="text" name="rename" value="'.$t_info['tname'].'"/><br/>
<anchor>[Переименовать]
<go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=renamem" method="post">
<postfield name="renamem" value="$(rename)"/>
<postfield name="tid" value="'.$id_theme.'"/>
<postfield name="fid" value="'.$t_info['id_forum'].'"/>
</go></anchor><br/>
- - - <br/>
Переместить:<br/>
<select name="nf">');
$fidsS = mysql_query("SELECT id, name FROM `mforums`");
while($fids = mysql_fetch_array($fidsS))
	{
		echo('<option value="'.$fids['id'].'">'.$fids['name'].'</option>');
 	}
 echo('</select><br/>
 <anchor>[Переместить]
 <go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=nfm" method="post">
 <postfield name="nfm" value="$(nf)"/>
<postfield name="tid" value="'.$id_theme.'"/>
<postfield name="fid" value="'.$t_info['id_forum'].'"/>
</go></anchor><br/>
- - - <br />
<a href="./?p=25&amp;mode=adel&amp;v=wml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br/>
<a href="./?p=3&amp;v=wml&amp;sid='.$sid.'&amp;f='.$t_info['id_forum'].'">Назад</a><br/>
</p></card></wml>');
					} elseif($version == "xhtml")
					{
						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");
						echo('<html>
<head>
<title>Модерка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'" colspan="2">
<font color="#FFFFFF"><b>Модерка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'" colspan="2">
<a href="./?p=25&amp;mode=delm&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=xhtml&amp;fid='.$t_info['id_forum'].'" style="background-color: #FF0000; color: #FFFFFF; text-decoration: underline">Удалить тему</a><br/>');
	if($t_info['pos'] == 1)
	{
		echo('<a href="./?p=25&amp;mode=boltm&amp;b=1&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=xhtml&amp;fid='.$t_info['id_forum'].'">Закрепить тему</a><br/>');
	} else
	{
		echo('<a href="./?p=25&amp;mode=boltm&amp;b=0&amp;sid='.$sid.'&amp;tid='.$id_theme.'&amp;v=xhtml&amp;fid='.$t_info['id_forum'].'">Открепить тему</a><br/>');
	}
echo('
</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Логин:</td><td> ['.$line['name'].']</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
User-Agent:</td><td>['.strtok($line['useragent'], "/").'] </td></tr>
<tr bgcolor="'.$style['text'].'"><td>
IP:</td><td> [<a href="./?p=25&amp;v='.$version.'&amp;mode=whois&amp;sid='.$sid.'&amp;ip='.$line['ip'].'">'.$line['ip'].'</a>]</td></tr>');
if($rows['status'] == 'user')
{
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=ban" method="post">
Блокировать на:</td><td>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Причина: </td><td>
<input type="text" name="mess"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td align="center" colspan="2">
<input type="submit" value="Блокировать"/><br/>
<input type="hidden" name="ua" value="'.$line['useragent'].'"/>
<input type="hidden" name="who" value="'.$line['name'].'"/>
<input type="hidden" name="ip" value="'.$line['ip'].'"/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'"/>
</form></td></tr>');}
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=rename" method="post">
Переименовать:</td><td>
<input type="text" name="rename" value="'.$t_info['tname'].'"/><br/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'" />
<input type="hidden" name="tid" value="'.$id_theme.'"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td colspan="2" align="center">
<input type="submit" value="Переименовать" />
</form></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Переместить:</td><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=nf" method="post">
<select name="nf">');
$fidsS = mysql_query("SELECT id, name FROM `mforums`");
while($fids = mysql_fetch_array($fidsS))
	{
		echo('<option value="'.$fids['id'].'">'.$fids['name'].'</option>');
 	}
 echo('</select><br />
 <input type="hidden" name="fid" value="'.$t_info['id_forum'].'"/>
 <input type="hidden" name="tid" value="'.$id_theme.'" />
 </td></tr>
 <tr bgcolor="'.$style['text'].'"><td align="center" colspan="2">
 <input type="submit" value="Переместить"/>
 </form></td></tr>
<tr bgcolor="'.$style['bottom'].'"><td colspan="2">
<a href="./?p=25&amp;mode=adel&amp;v=xhtml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br/>
<a href="./?p=3&amp;v=xhtml&amp;sid='.$sid.'&amp;f='.$t_info['id_forum'].'">Назад</a><br/>
</td></tr></table>
</body></html>');
			  }
		}
		}
break;
case 'mpost':
	$t_info = mysql_fetch_array(mysql_query("SELECT * FROM `themes` WHERE `id`=".intval($_GET['tid'])));
	if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `posts` WHERE `id`=".intval($_GET['id'])), 0))
	{
		if($version == "wml")
			{
				header('Content-type: text/vnd.wap.wml; charset=utf-8');
				header("Cache-Control: no-cache");
				echo(doctype("Ошибка").'
Поста не существует!  <br />
---   <br />
<a href="./?p=0&amp;v=wml&amp;sid='.$sid.'">Форумы</a>
</p></card></wml>');
			} elseif($version == "xhtml")
				{
					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");
					echo('<html>
<head>
<title>Ошибка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'">
<font color="#FFFFFF"><b>Ошибка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'"></td></tr>
<tr><td bgcolor="'.$style['text'].'">Поста не существует!</td></tr>
<tr><td bgcolor="'.$style['bottom'].'">
<a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'">Назад</a>
</td></tr></table>
</body></html>');
				}
	} else
	{
		$qline = mysql_query("SELECT * FROM `posts` WHERE `id`=".intval($_GET['id']));
		$line = mysql_fetch_array($qline);
		$sqls = mysql_query("SELECT status FROM users WHERE username = '".$line['name']."'");
		$rows = mysql_fetch_assoc($sqls);
		 if($version == "wml")
	{
 		header("Content-type: text/vnd.wap.wml; charset=utf-8");
 		header("Cache-Control: no-cache");
echo(doctype("Модераторская").'
Логин ['.$line['name'].'] <br />
User-Agent: ['.strtok($line['useragent'], "/").'] <br />
IP: ['.$line['ip'].'] <br />
---<br />
<a href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=del&amp;pid='.$_GET['id'].'&amp;tid='.$_GET['tid'].'">Удалить пост</a><br />
---<br />
Блокировать на :<br/>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select><br />
Причина: <br />
<input type="text" name="mess" /><br />
<anchor>[Блокировать]
<go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=ban" method="post">
<postfield name="time" value="$(time)" />
<postfield name="mess" value="$(mess)" />
<postfield name="ip" value="'.$line['ip'].'" />
<postfield name="who" value="'.$line['name'].'" />
<postfield name="ua" value="'.$line['useragent'].'" />
<postfield name="fid" value="'.$t_info['id_forum'].'" />

</go></anchor><br /><br />
- - - <br />
<a href="./?p=25&amp;mode=adel&amp;v=wml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br />
<a href="./?p=4&amp;v=wml&amp;sid='.$sid.'&amp;t='.$_GET['tid'].'">Назад</a>  <br />
<a href="./?p=0&amp;v=wml&amp;sid='.$sid.'">Форумы</a>
</p></card></wml>');
					} elseif($version == "xhtml")
					{
						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");
						echo('<html>
<head>
<title>Модерка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'" colspan="2">
<font color="#FFFFFF"><b>Модерка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'" colspan="2">
<a href="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=del&amp;pid='.$_GET['id'].'&amp;tid='.$line['id_theme'].' " style="background-color: #FF0000; color: #FFFFFF; text-decoration: underline">Удалить пост</a>
</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Логин:</td><td>['.$line['name'].']</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
User-Agent:</td><td>['.strtok($line['useragent'], "/").']</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
IP: </td><td>[<a href="./?p=25&amp;v='.$version.'&amp;mode=whois&amp;sid='.$sid.'&amp;ip='.$line['ip'].'">'.$line['ip'].'</a>] </td></tr>');
if($rows['status'] == 'user')
{
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=ban" method="post">
Блокировать на:</td><td>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Причина: </td><td>
<input type="text" name="mess"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td align="center" colspan="2">
<input type="submit" value="Блокировать"/><br/>
<input type="hidden" name="ua" value="'.$line['useragent'].'"/>
<input type="hidden" name="who" value="'.$line['name'].'"/>
<input type="hidden" name="ip" value="'.$line['ip'].'"/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'"/>
</form></td></tr>');}
echo('<tr bgcolor="'.$style['bottom'].'"><td colspan="2">
<a href="./?p=25&amp;mode=adel&amp;v=xhtml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br />
<a href="./?p=4&amp;v=xhtml&amp;sid='.$sid.'&amp;t='.$_GET['tid'].'">Назад</a><br />
<a href="./?p=0&amp;v=xhtml&amp;sid='.$sid.'">Форумы</a>
</td></tr></table>
</body></html>');
			  }
	}
break;
case 'mpostm':
if( in_array($status, array('admin')) )
			{
	$t_info = mysql_fetch_array(mysql_query("SELECT * FROM `mthemes` WHERE `id`=".intval($_GET['tid'])));
	if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `mposts` WHERE `id`=".intval($_GET['id'])), 0))
	{
		if($version == "wml")
			{
				header('Content-type: text/vnd.wap.wml; charset=utf-8');
				header("Cache-Control: no-cache");
				echo(doctype("Ошибка").'
Поста не существует!  <br />
---   <br />
<a href="./?p=0&amp;v=wml&amp;sid='.$sid.'">Форумы</a>
</p></card></wml>');
			} elseif($version == "xhtml")
				{
					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");
					echo('<html>
<head>
<title>Ошибка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'">
<font color="#FFFFFF"><b>Ошибка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'"></td></tr>
<tr><td bgcolor="'.$style['text'].'">Поста не существует!</td></tr>
<tr><td bgcolor="'.$style['bottom'].'">
<a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'">Назад</a>
</td></tr></table>
</body></html>');
				}
	} else
	{
		$qline = mysql_query("SELECT * FROM `mposts` WHERE `id`=".intval($_GET['id']));
		$line = mysql_fetch_array($qline);
		$sqls = mysql_query("SELECT status FROM users WHERE username = '".$line['name']."'");
		$rows = mysql_fetch_assoc($sqls);
		 if($version == "wml")
	{
 		header("Content-type: text/vnd.wap.wml; charset=utf-8");
 		header("Cache-Control: no-cache");
echo(doctype("Модераторская").'
Логин ['.$line['name'].'] <br />
User-Agent: ['.strtok($line['useragent'], "/").'] <br />
IP: ['.$line['ip'].'] <br />
---<br />
<a href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=delm&amp;pid='.$_GET['id'].'&amp;tid='.$_GET['tid'].'">Удалить пост</a><br />
---<br />
Блокировать на : <br />
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select><br />
Причина: <br />
<input type="text" name="mess" /><br />
<anchor>[Блокировать]
<go href="./?p=25&amp;v=wml&amp;sid='.$sid.'&amp;mode=ban" method="post">
<postfield name="time" value="$(time)" />
<postfield name="mess" value="$(mess)" />
<postfield name="ip" value="'.$line['ip'].'" />
<postfield name="who" value="'.$line['name'].'" />
<postfield name="ua" value="'.$line['useragent'].'" />
<postfield name="fid" value="'.$t_info['id_forum'].'" />
</go></anchor><br /><br />
- - - <br />
<a href="./?p=25&amp;mode=adel&amp;v=wml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br />
<a href="./?p=5&amp;v=wml&amp;sid='.$sid.'&amp;p='.$_GET['tid'].'">Назад</a>  <br />
<a href="./?p=1&amp;v=wml&amp;sid='.$sid.'">Форумы</a>
</p></card></wml>');
					} elseif($version == "xhtml")
					{
						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");
						echo('<html>
<head>
<title>Модерка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'" colspan="2">
<font color="#FFFFFF"><b>Модерка</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'" colspan="2">
<a href="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=delm&amp;pid='.$_GET['id'].'&amp;tid='.$line['id_theme'].' " style="background-color: #FF0000; color: #FFFFFF; text-decoration: underline">Удалить пост</a>
</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Логин:</td><td>['.$line['name'].']</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
User-Agent:</td><td>['.strtok($line['useragent'], "/").']</td></tr>
<tr bgcolor="'.$style['text'].'"><td>
IP:</td><td> [<a href="./?p=25&amp;v='.$version.'&amp;mode=whois&amp;sid='.$sid.'&amp;ip='.$line['ip'].'">'.$line['ip'].'</a>]</td></tr>');
if($rows['status'] == 'user')
{
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=ban" method="post">
Блокировать на:</td><td>
<select name="time">
<option value="3600">1 час.</option>
<option value="21600">6 час.</option>
<option value="86400">1 день</option>
<option value="604800">1 неделя</option>
<option value="2592000">1 месяц</option>
<option value="ipua3600">UA+IP 1 час.</option>
<option value="ipua21600">UA+IP 6 час.</option>
<option value="ipua86400">UA+IP 1 день</option>
<option value="ipua604800">UA+IP 1 неделя</option>
<option value="ipua2592000">UA+IP 1 месяц</option>
</select></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Причина: </td><td>
<input type="text" name="mess"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td align="center" colspan="2">
<input type="submit" value="Блокировать"/><br/>
<input type="hidden" name="ua" value="'.$line['useragent'].'"/>
<input type="hidden" name="who" value="'.$line['name'].'"/>
<input type="hidden" name="ip" value="'.$line['ip'].'"/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'"/>
</form></td></tr>');}
echo('<tr bgcolor="'.$style['text'].'"><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=rename" method="post">
Переименовать:</td><td>
<input type="text" name="rename" value="'.$t_info['tname'].'"/><br/>
<input type="hidden" name="fid" value="'.$t_info['id_forum'].'" />
<input type="hidden" name="tid" value="'.$id_theme.'"/></td></tr>
<tr bgcolor="'.$style['text'].'"><td colspan="2" align="center">
<input type="submit" value="Переименовать" />
</form></td></tr>
<tr bgcolor="'.$style['text'].'"><td>
Переместить:</td><td>
<form action="./?p=25&amp;v=xhtml&amp;sid='.$sid.'&amp;mode=nf" method="post">
<select name="nf">');
echo('<tr bgcolor="'.$style['bottom'].'"><td colspan="2">
<a href="./?p=25&amp;mode=adel&amp;v=xhtml&amp;sid='.$sid.'&amp;id='.username2id($line['name']).'&amp;fid='.$t_info['id_forum'].'">Удалить все от ника за последний час</a><br />
<a href="./?p=5&amp;v=xhtml&amp;sid='.$sid.'&amp;p='.$_GET['tid'].'">Назад</a><br />
<a href="./?p=1&amp;v=xhtml&amp;sid='.$sid.'">Форумы</a>
</td></tr></table>
</body></html>');
			  }


	}
}
break;
case 'rename':
	if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `themes` WHERE `id`=".intval($_POST['tid'])), 0))
	{
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	} else
	{
		mysql_query("UPDATE `themes` SET `tname`='".htmlspecialchars(sql($_POST['rename']))."' WHERE `id`=".intval($_POST['tid']));
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	}
break;
			case 'renamem':
	if( in_array($status, array('admin')) )
			{		
	if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `mthemes` WHERE `id`=".intval($_POST['tid'])), 0))
	{
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	} else
	{
		mysql_query("UPDATE `mthemes` SET `tname`='".htmlspecialchars(sql($_POST['rename']))."' WHERE `id`=".intval($_POST['tid']));
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	}
	}
break;
case 'nf':
if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `themes` WHERE `id`=".intval($_POST['tid'])), 0))
	{
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	} else
	{
		mysql_query("UPDATE `themes` SET `id_forum`=".intval($_POST['nf'])." WHERE `id`=".intval($_POST['tid']));
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	}
break;
case 'nfm':
if( in_array($status, array('admin')) )
			{
if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `mthemes` WHERE `id`=".intval($_POST['tid'])), 0))
	{
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	} else
	{
		mysql_query("UPDATE `mthemes` SET `id_forum`=".intval($_POST['nf'])." WHERE `id`=".intval($_POST['tid']));
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
	}
	}
break;
case 'del':
	if(empty($_GET['pid']))
	{
		if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `themes` WHERE `id`=".intval($_GET['tid'])), 0))
		{
			header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
		} else
		{
			if($status == "admin"){ $SQL = "DELETE FROM `themes` WHERE `id`=".intval($_GET['tid']);
			mysql_query("DELETE FROM `posts` WHERE `id_theme`=".intval($_GET['tid'])); }
			else { $SQL =  "UPDATE `themes` SET `del`=1, `mdel`='".$username."' WHERE `id`=".intval($_GET['tid']); }
		mysql_query($SQL);
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
		}
	} else
	{
		if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `posts` WHERE `id`=".intval($_GET['pid'])), 0))
		{
			header("Location: ".$forumdir.'p=4&v='.$version.'&t='.$_GET['tid'].'&sid='.$sid);
		} else
		{
		mysql_query("DELETE FROM `posts` WHERE `id`=".intval($_GET['pid']));
		header("Location: ".$forumdir.'p=4&v='.$version.'&t='.$_GET['tid'].'&sid='.$sid);
		}
	}

break;
case 'delm':
if( in_array($status, array('admin')) )
			{
	if(empty($_GET['pid']))
	{
		if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `mthemes` WHERE `id`=".intval($_GET['tid'])), 0))
		{
			header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
		} else
		{
			if($status == "admin"){ $SQL = "DELETE FROM `mthemes` WHERE `id`=".intval($_GET['tid']);
			mysql_query("DELETE FROM `mposts` WHERE `id_theme`=".intval($_GET['tid'])); }
			else { $SQL =  "UPDATE `mthemes` SET `del`=1, `mdel`='".$username."' WHERE `id`=".intval($_GET['tid']); }
		mysql_query($SQL);
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
		}
	} else
	{
		if(!mysql_result(mysql_query("SELECT COUNT(*) FROM `mposts` WHERE `id`=".intval($_GET['pid'])), 0))
		{
			header("Location: ".$forumdir.'p=5&v='.$version.'&t='.$_GET['tid'].'&sid='.$sid);
		} else
		{
		mysql_query("DELETE FROM `mposts` WHERE `id`=".intval($_GET['pid']));
		header("Location: ".$forumdir.'p=5&v='.$version.'&t='.$_GET['tid'].'&sid='.$sid);
		}
	}
}
break;
case 'bolt':
	if($_GET['b'] == "1")
	{
		mysql_query("UPDATE `themes` SET `pos`=0 WHERE `id`=".intval($_GET['tid']));
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
	} else
	{
		mysql_query("UPDATE `themes` SET `pos`=1 WHERE `id`=".intval($_GET['tid']));
		header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
	}
break;
case 'boltm':
if( in_array($status, array('admin')) )
			{
	if($_GET['b'] == "1")
	{
		mysql_query("UPDATE `mthemes` SET `pos`=0 WHERE `id`=".intval($_GET['tid']));
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
	} else
	{
		mysql_query("UPDATE `mthemes` SET `pos`=1 WHERE `id`=".intval($_GET['tid']));
		header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
	}
	}
break;
case 'ban':
if (!empty($_POST['who'])) // проверка бвна в БД
$sql_result = mysql_query("SELECT * FROM `ban`
WHERE `username` = '".$_POST['who']."' LIMIT 1;");
if (mysql_num_rows($sql_result))
{
if($version == "wml")
	{
		header("Content-type: text/vnd.wap.wml; charset=utf-8");
		header("Cache-Control: no-cache");
		echo(doctype("Модерка").$tag);
$rows = mysql_fetch_array($sql_result);
$print="Пользователь уже заблокирован!<br/>Банил: ".$rows['moder']."";
echo($print);
		}
		elseif($version == "xhtml")
		{
$rows = mysql_fetch_array($sql_result);
$print="Пользователь уже заблокирован!<br/>Банил: ".$rows['moder']."";
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");
echo('<html>
<head>
<title>Модерка</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'">
<font color="#FFFFFF"><b>Модерка</b></font>
</td></tr>');
echo('<tr><td bgcolor="'.$style['bottom'].'">
<a href="./?p=0&amp;v=xhtml&amp;sid=4PaBsBRh3u">Форумы</a><br/>'.$tag.''.$tagC.'</td></tr>
<tr bgcolor="'.$style['text'].'"><td>'.$tag);
echo($print);
}
  if($version == "wml")
  {
echo('<br/>- - - -<br/>
<anchor>Назад<prev/></anchor>
'.$tagC.'</p></card></wml>');
	} elseif($version == "xhtml")
	{
echo("</td></tr>\r\n" .
"<tr bgcolor='" . $style['bottom'] . "'><td>\r\n" .
"<a href=\"javascript:history.back()\">Назад</a>\r\n" .
"</td></tr>\r\n" .
"</table></body></html>");
	}
exit();
}
					else
    if($_POST['time'] == "ipua3600")
	{
		$SQL = "INSERT INTO `ban` VALUES(0, '".$_POST['ip']."', '".$_POST['ua']."', '".$_POST['who']."', ".(time() + 05).", '".$_POST['mess']."', '".$username."', '".$status."')";
	} elseif($_POST['time'] == "ipua21600")
	{
		$SQL = "INSERT INTO `ban` VALUES(0, '".$_POST['ip']."', '".$_POST['ua']."', '".$_POST['who']."', ".(time() + 21600).", '".$_POST['mess']."', '".$username."', '".$status."')";
	} elseif($_POST['time'] == "ipua86400")
	{
		$SQL = "INSERT INTO `ban` VALUES(0, '".$_POST['ip']."', '".$_POST['ua']."', '".$_POST['who']."', ".(time() + 86400).", '".$_POST['mess']."', '".$username."', '".$status."')";
	} elseif($_POST['time'] == "ipua604800")
	{
		$SQL = "INSERT INTO `ban` VALUES(0, '".$_POST['ip']."', '".$_POST['ua']."', '".$_POST['who']."', ".(time() + 604800).", '".$_POST['mess']."', '".$username."', '".$status."')";
	} elseif($_POST['time'] == "ipua2592000")
	{
		$SQL = "INSERT INTO `ban` VALUES(0, '".$_POST['ip']."', '".$_POST['ua']."', '".$_POST['who']."', ".(time() + 2592000).", '".$_POST['mess']."', '".$username."', '".$status."')";
	} else
    {
    $SQL = "INSERT INTO `ban` VALUES(0, '', '', '".$_POST['who']."', ".(time() + intval($_POST['time'])).", '".$_POST['mess']."', '".$username."', '".$status."')";
    }
    mysql_query($SQL);
    header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_POST['fid']);
 break;

case 'checkbox':
if ($_POST['id']=='')
{
$print = "Нужно отметить хоть одну тему или сообщение для удаления!";
			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");
			echo('<html>
			<head>
			<title>Ошибка</title>
			</head>
			<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
			<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
			<tr><td align="center" bgcolor="'.$style['title'].'">
			<font color="#FFFFFF"><b>Ошибка</b></font>
			</td></tr>');
			echo('<tr><td bgcolor="'.$style['bottom'].'">'.$tag.'
			' . $tagC . '</td></tr>
			<tr bgcolor="'.$style['text'].'"><td>'.$tag);
			echo($print);
			echo("</td></tr>\r\n" .
			"<tr bgcolor='" . $style['bottom'] . "'><td>\r\n" .
			"<a href='javascript:history.back()'>Назад</a>\r\n" .
			"</td></tr>\r\n" .
			"</table></body></html>");
}
		if(!empty($_GET['fid']) && !empty($_POST['id']))
		{
			mysql_query ( "DELETE FROM `themes` WHERE `id` IN(".implode(", ", array_map("intval", (array)$_POST['id'])).")" );
			mysql_query("DELETE FROM `posts` WHERE `id_theme` IN(".implode(", ", array_map("intval", (array)$_POST['id'])).")" );
			header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
		} elseif(!empty($_GET['tid']) && !empty($_POST['id']))
		{
			mysql_query( "DELETE FROM `posts` WHERE `id` IN(".implode(", ", array_map("intval", $_POST['id'])).")" );
			header("Location: ".$forumdir.'p=4&v='.$version.'&sid='.$sid.'&t='.$_GET['tid']);
		}
break;
case 'adel':
	$time = (time() - (60 * 60));
	$usern = mysql_fetch_array(mysql_query("SELECT `username` FROM `users` WHERE `id`=".intval($_GET['id'])));
	mysql_query("DELETE FROM `themes` WHERE `name`='".$usern['username']."' AND `time` > '".$time."'");
	mysql_query("DELETE FROM `posts` WHERE `name`='".$usern['username']."' AND `time` > '".$time."'");
	header("Location: ".$forumdir.'p=2&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
break;
case 'whois':
	$ip = $_GET['ip']."\r\n";
	$fp = fsockopen("whois.ripe.net", 43, $errno, $errstr);
    if(!$fp)
    {
    	exit;
    }
	fwrite($fp, $ip."\r\n");

	$info = "";

		while(!feof($fp))
		{
			$info .= fread($fp, 1024);
		}
		fclose($fp);
		if($version == "xhtml")
		{
			header("Content-type: text/html; charset=utf-8");

			echo('<html>
<head>
<title>'.$ip.'</title>
</head>
<body bgcolor="'.$style['background'].'" link="'.$style['link'].'" vlink="'.$style['link'].'" text="#000000">
<table align="center" border="0" cellspacing="1" cellpadding="5" width="350">
<tr><td align="center" bgcolor="'.$style['title'].'">
<font color="#FFFFFF"><b>'.$ip.'</b></font>
</td></tr>
<tr><td bgcolor="'.$style['bottom'].'"></td></tr>
<tr><td bgcolor="'.$style['text'].'">'.nl2br($info).'</td></tr>
<tr><td bgcolor="'.$style['bottom'].'">
<a href="'.htmlspecialchars($_SERVER['HTTP_REFERER']).'">Назад</a>
</td></tr></table>
</body></html>');
		} elseif($version == "wml")
		{
			header("Content-type: text/vnd.wap.wml; charset=utf-8");
			echo(doctype($ip));
			echo(nl2br($info)."\r\n");
			echo("<anchor>Назад<prev /></anchor>\r\n
			</p></card></wml>");
		}

break;
case 'checkboxm':

		if(!empty($_GET['fid']) && !empty($_POST['id']))
		{
			mysql_query ( "DELETE FROM `mthemes` WHERE `id` IN(".implode(", ", array_map("intval", (array)$_POST['id'])).")" );
			mysql_query("DELETE FROM `mposts` WHERE `id_theme` IN(".implode(", ", array_map("intval", (array)$_POST['id'])).")" );
			header("Location: ".$forumdir.'p=3&v='.$version.'&sid='.$sid.'&f='.$_GET['fid']);
		} elseif(!empty($_GET['tid']) && !empty($_POST['id']))
		{
			mysql_query( "DELETE FROM `mposts` WHERE `id` IN(".implode(", ", array_map("intval", $_POST['id'])).")" );
			header("Location: ".$forumdir.'p=5&v='.$version.'&sid='.$sid.'&t='.$_GET['tid']);
		}
break;
	}
 }

?>