Файл: gamefaq.php
Строк: 408
<?php
include 'inc/mysql.php';
include 'inc/check.php';
if(isset($_SESSION['auth']) && $_SESSION['auth']==1){
include 'inc/shapka.php';
switch($_GET[go]){
default:
echo'<div class="menudiv">Помощь</div><br />';
echo '<center>';
$qi = mysql_query("SELECT * FROM `library_forum` ORDER by `id` ASC");
$avto=mysql_num_rows($qi);
if($avto>=1){
while($row=mysql_fetch_array($qi))
{
$u=mysql_query("SELECT * FROM `library_forum_topik` WHERE `razdel`='$row[id]' ORDER by `id` DESC");
$dat=mysql_fetch_array($u);
$uids=$dat[tema];
$u2=mysql_query("SELECT * FROM `library_forum_msg` WHERE `topik`='$row[id]' and `tema`='$dat[id]' ORDER by `id` DESC");
$dat2=mysql_fetch_array($u2);
$uids2=$dat2[user];
$req1 = mysql_query("SELECT `id`,`status`,`login`,`sex` FROM `account` WHERE `id` = '$uids2'");
$_user = mysql_fetch_array($req1);
echo'<a href="gamefaq.php?go=theme&id='.$row[id].'" class="menu_j"><img src="pic/main/forum.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> '.$row[name].' ('.$row[tem].')</a>';
}
}else{
echo'<div class="text">';
echo'<img src="/pic/main/!.png" alt="*"/> Нет разделов об игре...';
echo '</div>';
}
//echo'<div class="rzd"></div>';
echo'<a href="gamefaq.php?go=admin" class="menu_j"><img src="pic/main/admins.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Администрация</a>';
echo'<a href="ratings.php?" class="menu_j"><img src="pic/main/talant.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Рейтинг игроков</a>';
echo'<a href="klan.php?mod=ratings" class="menu_j"><img src="pic/main/inform.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Рейтинг гильдий</a>';
echo'<a href="pravila.php" class="menu_j"><img src="pic/main/pravila.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Правила игры</a>';
if($account['status']=="gm"){
echo'<a href="gamefaq.php?go=razdel" class="menu_j"><img src="pic/main/pers_sohran.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Добавить раздел</a>';
echo'<a href="gamefaq.php?go=new" class="menu_j"><img src="pic/main/pers_sohran.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Добавить статью</a>';
}
break;
case 'post':
echo'<div class="menudiv">Помощь</div>';
echo'<div class="text2">';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum` WHERE `id`='".intval($_GET['id'])."'"),0)){
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum` WHERE `id`='".intval($_GET['id'])."'"));
}else{
header('Location: gamefaq.php?');
exit;
}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum_topik` WHERE `id`='".intval($_GET['topik'])."'"),0)){
$topik=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_topik` WHERE `id`='".intval($_GET['topik'])."'"));
}else{
header('Location: gamefaq.php?');
exit;
}
$g=mysql_query("SELECT * FROM `library_forum_topik` WHERE `razdel`='$forum[id]' AND `id`='$topik[id]' and `status2`='on' LIMIT 1");
if(mysql_num_rows($g)==1){
$cop=10;
$ca=mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum_msg` WHERE `topik`='$forum[id]' AND `tema`='$topik[id]' and `status2`='on' "),0);
$cp=ceil($ca/$cop);
if(isset($_GET['page']) && is_numeric($_GET['page'])){
$page = $_GET['page'];
if($_GET['page']>$cp) $page=$cp;
if($_GET['page']<1)$page=1;
}else{
$page=1;
}
$start=$page*$cop-$cop;
$dlist = 'list1';
$qi = mysql_query("SELECT * FROM `library_forum_msg` WHERE `topik`='$forum[id]' AND `tema`='$topik[id]' and `status2`='on' ORDER by `id` DESC LIMIT $start,$cop");
while($row=mysql_fetch_array($qi))
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$req = mysql_query("SELECT * FROM `library_golos` WHERE `account`='$account[id]' and `ids`='$forum[id]' and `topik`='$topik[id]' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
mysql_query("UPDATE `library_forum_topik` SET `proc`=`proc` + '1' WHERE `id`='$topik[id]'");
mysql_query("INSERT INTO `library_golos` SET `account` = '$account[id]', `ids` = '$forum[id]', `topik` = '$topik[id]'");
header('Location: gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].''); exit;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Голоса за топик
if($_GET['mod']=='up_minus'){
$req = mysql_query("SELECT * FROM `library_rating` WHERE `account`='$account[id]' and `ids`='$forum[id]' and `topik`='$topik[id]' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
mysql_query("UPDATE `library_forum_topik` SET `rating_minus`=`rating_minus` + '1' WHERE `id`='$topik[id]'");
mysql_query("INSERT INTO `library_rating` SET `account` = '$account[id]', `ids` = '$forum[id]', `topik` = '$topik[id]'");
mysql_query("INSERT INTO `forum_rating` SET `account` = '$account[id]', `ids` = '$forum[id]', `topik` = '$topik[id]'");
header('Location: gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].''); exit;
}else{
header('Location: gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].''); exit;
}
}
if($_GET['mod']=='up_plus'){
$req = mysql_query("SELECT * FROM `library_rating` WHERE `account`='$account[id]' and `ids`='$forum[id]' and `topik`='$topik[id]' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
mysql_query("UPDATE `library_forum_topik` SET `rating_plus`=`rating_plus` + '1' WHERE `id`='$topik[id]'");
mysql_query("INSERT INTO `library_rating` SET `account` = '$account[id]', `ids` = '$forum[id]', `topik` = '$topik[id]'");
header('Location: gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].''); exit;
}else{
header('Location: gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].''); exit;
}
}
echo "<img src="pic/main/forum.png"> <a href="gamefaq.php">Помощь</a> / <a href="gamefaq.php?go=theme&id=$forum[id]">$forum[name]</a> / "; echo '<b>'.$topik[tema].'</b> (Дата изменения: <img src="/pic/main/timereg.png" alt="*"/> <font color=00CC00>'.$row[time].'</font> | Автор: ';
$req1 = mysql_query("SELECT `id`,`status`,`login`,`sex` FROM `account` WHERE `id` = '".$row['user']."'");
$_user = mysql_fetch_array($req1);
if($_user['status']=="gm"){
$nik = gradient(''.$_user[login].'','00FF00', '00CC00');
echo '<img src="pic/main/'.$_user[sex].'.png" alt="*"/> '.$nik.' <a href="infa.php?id='.$_user['id'].'"><img src="/pic/main/info.gif" alt="*"/></a> | ';
}else{
if($_user['status']=="moder"){
$nik = gradient(''.$_user[login].'','0066CC', 'AB82FF');
echo '<img src="pic/main/'.$_user[sex].'.png" alt="*"/> '.$nik.' <a href="infa.php?id='.$_user['id'].'"><img src="/pic/main/info.gif" alt="*"/></a> | ';
}else{
if($_user['status']=="bot"){
$nik = gradient(''.$_user[login].'','FFCC00', 'FF9933');
echo '<img src="pic/main/'.$_user[sex].'.png" alt="*"/> '.$nik.' <a href="infa.php?id='.$_user['id'].'"><img src="/pic/main/info.gif" alt="*"/></a> | ';
}else{
echo '
<img src="pic/main/'.$_user[sex].'.png" alt="*"/> '.$_user['login'].' <a href="infa.php?id='.$_user['id'].'"><img src="/pic/main/info.gif" alt="*"/></a> | ';
}}}
echo 'ID статьи: '.$topik[id].' ';
if($account['status']=="gm"){
echo '(<a href="gamefaq.php?go=redakt_text&ids='.$forum[id].'&topik='.$topik[id].'">Редактировать</a>)';
}
echo ' | Прочитано: '.$topik[proc].' | Рейтинг: ';
$req = mysql_query("SELECT * FROM `library_rating` WHERE `account`='$account[id]' and `ids`='$forum[id]' and `topik`='$topik[id]' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
echo '<a href="gamefaq.php?go=post&mod=up_plus&id='.$forum[id].'&topik='.$topik[id].'"><img src="/pic/main/plusa.png" alt="*"/></a> ';
}else{
echo '<img src="/pic/main/plusa.png" alt="*"/> ';
}
echo '<font color=lime>'.$topik[rating_plus].'</font> ';
$req = mysql_query("SELECT * FROM `library_rating` WHERE `account`='$account[id]' and `ids`='$forum[id]' and `topik`='$topik[id]' ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto==0){
echo '<a href="gamefaq.php?go=post&mod=up_minus&id='.$forum[id].'&topik='.$topik[id].'"><img src="/pic/main/minus.png" alt="*"/></a> ';
}else{
echo '<img src="/pic/main/minus.png" alt="*"/> ';
}
echo '<font color=red>'.$topik[rating_minus].'</font>)<br>';
$koment = strip_tags($row['msg']);
$koment = smiles(tags($koment));
echo '<br>';
echo bb($koment);
echo '<div class="separ2"></div>';
}
echo '
<center>
Навигация:
';if($page-1>0){
echo '<a href="gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].'&page='.($page-1).'"><</a> ';
}
if($page-1>0){
echo ' <a href="gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].'&page='.($page-1).'">'.($page-1).'</a> ';
}
echo '<b>'.$page.'</b>';
if($page+1<=$cp){
echo ' <a href="gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].'&page='.($page+1).'">'.($page+1).'</a> ';
}
if($page+1<=$cp){
echo ' <a href="gamefaq.php?go=post&id='.$forum[id].'&topik='.$topik[id].'&page='.($page+1).'">></a> ';
}
echo '</center>';
}
echo '</div>';
break;
case 'up':
if($account['status']=="gm"){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum_topik` WHERE `status2`='on' and `id`='".intval($_GET['ids'])."'"),0)){
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_topik` WHERE `status2`='on' and `id`='".intval($_GET['ids'])."'"));
}else{
header('Location: gamefaq.php?');
exit;
}
$topik=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_topik` WHERE `id`='".intval($_GET['ids'])."'"));
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum` WHERE `id`='".intval($_GET['id'])."'"));
mysql_query("UPDATE `library_forum_topik` SET `lvl`=`lvl` + '1' WHERE `id`='".intval($_GET['ids'])."'");
header('Location: gamefaq.php?go=theme&id='.$forum[id].'');
}else{
header ("Location: gamefaq.php"); exit;
}
echo '</div>';
break;
case 'redakt':
if($account['status']=="gm"){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum_topik` WHERE `status2`='on' and `id`='".intval($_GET['topik'])."'"),0)){
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_topik` WHERE `status2`='on' and `id`='".intval($_GET['topik'])."'"));
}else{
header('Location: gamefaq.php?');
exit;
}
$topik=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_topik` WHERE `id`='".intval($_GET['topik'])."'"));
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum` WHERE `id`='".intval($_GET['ids'])."'"));
echo'<div class="title-top">Редактирование статьи</div><div class="separ2"></div>';
echo'<div class="text2">';
if(empty($_POST[tema])){
echo 'Название статьи:<br>';
echo '<form action="gamefaq.php?go=redakt&id2='.intval($forum['id']).'&topik='.intval($_GET['topik']).'&id='.intval($_GET['topik']).'" method="post">';
echo '<textarea name="tema" cols="30" rows="1">'.$topik[tema].'</textarea>';
echo '<br><input class="button" type="submit" value="Сохранить" /></form>';
}else{
$msg=htmlspecialchars($_POST[tema]);
$time = date("d.m.y в H:i:s");
mysql_query("UPDATE `library_forum_topik` SET `tema`='$msg', `time` = '$time' WHERE `id`='".intval($_GET['topik'])."'");
header('Location: gamefaq.php?go=post&id='.intval($_GET['id2']).'&topik='.$topik[id].'');
}
}else{
header ("Location: gamefaq.php"); exit;
}
echo '</div>';
break;
case 'redakt_text':
if($account['status']=="gm"){
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum_msg` WHERE `status2`='on' and `id`='".intval($_GET['topik'])."'"),0)){
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_msg` WHERE `status2`='on' and `id`='".intval($_GET['topik'])."'"));
}else{
header('Location: gamefaq.php?');
exit;
}
$topik=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum_msg` WHERE `id`='".intval($_GET['topik'])."'"));
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum` WHERE `id`='".intval($_GET['ids'])."'"));
echo'<div class="title-top">Редактирование текста</div><div class="separ2"></div>';
echo'<div class="text2">';
if(empty($_POST[msg])){
echo 'Текст статьи:<br>';
echo '<form action="gamefaq.php?go=redakt_text&id2='.intval($forum['id']).'&topik='.intval($_GET['topik']).'&id='.intval($_GET['topik']).'" method="post">';
echo '<textarea name="msg" cols="30" rows="1">'.$topik[msg].'</textarea>';
echo '<br><input class="button" type="submit" value="Сохранить" /></form></div>';
}else{
$msg=htmlspecialchars($_POST[msg]);
$time = date("d.m.y в H:i:s");
mysql_query("UPDATE `library_forum_msg` SET `user`='$account[id]',`msg`='$msg', `time` = '$time' WHERE `id`='".intval($_GET['topik'])."' and `tema`='".intval($_GET['topik'])."'");
header('Location: gamefaq.php?go=post&id='.intval($_GET['id2']).'&topik='.$topik[id].'');
}
}else{
header ("Location: gamefaq.php"); exit;
}
echo '</div>';
break;
case 'theme':
echo'<div class="menudiv">Помощь</div>';
echo'<div class="text2">';
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum` WHERE `id`='".intval($_GET['id'])."'"),0)){
$forum=mysql_fetch_assoc(mysql_query("SELECT * FROM `library_forum` WHERE `id`='".intval($_GET['id'])."'"));
}else{
header('Location: gamefaq.php?');
exit;
}
echo "<img src="pic/main/forum.png"> <a href="gamefaq.php">Помощь</a> / $forum[name]<br>";
echo '<div class="separ2"></div>';
$cop=10;
$ca=mysql_result(mysql_query("SELECT COUNT(*) FROM `library_forum_topik` WHERE `razdel`='$forum[id]' and `status2`='on' "),0);
$cp=ceil($ca/$cop);
if(isset($_GET['page']) && is_numeric($_GET['page'])){
$page = $_GET['page'];
if($_GET['page']>$cp) $page=$cp;
if($_GET['page']<1)$page=1;
}else{
$page=1;
}
$start=$page*$cop-$cop;
$dlist = 'list1';
$req = mysql_query("SELECT * FROM `library_forum_topik` WHERE `razdel`='$forum[id]' and `status2`='on' ORDER by `lvl` DESC LIMIT $start,$cop ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
$w=explode("*",$mag[name]);
echo"<img src="pic/main/forum_2.png"> <a href="gamefaq.php?go=post&id=$forum[id]&topik=$mag[id]">$mag[tema]</a> <img src='pic/main/timereg.png' alt='*'/> <font color=00CC00>($mag[time])</font>";
if($_GET['gos']=='delete' && ($account['status']=="gm" OR $account['status']=="moder")){
if(isset($_GET['ids'])){
$del = $_GET['ids'];
}
if($del){
mysql_query("DELETE FROM `library_forum_msg` WHERE `tema`='".$del."'");
mysql_query("DELETE FROM `library_forum_topik` WHERE `id`='".$del."'");
mysql_query("DELETE FROM `library_rating` WHERE `topik`='".$del."'");
mysql_query("DELETE FROM `library_golos` WHERE `topik`='".$del."'");
mysql_query("UPDATE `library_forum` SET `tem`=`tem` - '1' WHERE `id`='$forum[id]'");
header('Location: gamefaq.php?go=theme&id='.$forum[id].''); exit;
}else{
header('Location: gamefaq.php?go=theme&id='.$forum[id].''); exit;
}}
if($account['status']=="gm"){
echo ' (<img src='pic/main/up.png'> '.$mag[lvl].' <a href="gamefaq.php?go=up&id='.$forum[id].'&ids='.$mag[id].'">Вверх</a>) (<a href="gamefaq.php?go=redakt&ids='.$forum[id].'&topik='.$mag[id].'">Редактировать</a>) (<a href="gamefaq.php?go=theme&gos=delete&id='.$forum[id].'&ids='.$mag[id].'">Удалить</a>)';
}
echo ' <br>';
}
echo '
<div class="separ2"></div>
<center>
Навигация:
';if($page-1>0){
echo ' <a href="gamefaq.php?go=theme&id='.$forum[id].'&page='.($page-1).'"><</a> ';
}
if($page-1>0){
echo ' <a href="gamefaq.php?go=theme&id='.$forum[id].'&page='.($page-1).'">'.($page-1).'</a> ';
}
echo '<b>'.$page.'</b>';
if($page+1<=$cp){
echo ' <a href="gamefaq.php?go=theme&id='.$forum[id].'&page='.($page+1).'">'.($page+1).'</a> ';
}
if($page+1<=$cp){
echo ' <a href="gamefaq.php?go=theme&id='.$forum[id].'&page='.($page+1).'">></a> ';
}
echo '</center>';
}else{echo "<img src="pic/main/!.png"> В данном разделе пока нет статей.<br>";}
echo '</div>';
break;
case 'new':
echo'<div class="title-top">Новая статья</div><div class="separ2"></div>';
echo'<div class="text2">';
if($account['status']=="gm"){
if(empty($_POST[nazva]) or empty($_POST[msg])){
echo '<form name="form" action="gamefaq.php?go=new" method="post">';
echo "Название статьи:<br>";
echo "<input class="button" name="nazva" maxlength="50" title="Название темы" emptyok="true"/>";
echo "<br>Категория:<br>";
echo"<select name="kategory">
<option value="1">Вопросы новичков</option>
<option value="2">Функционал игры</option>
<option value="3">Игровое общение</option>
<option value="4">Игровые конкурсы/турниры</option>
<option value="5">Разное</option>
</select>";
echo "<br>Текст статьи:<br/>";
echo '<textarea name="msg" cols="20" rows="3"></textarea>
<br><input type="submit" class="submit" value="Создать">
</form>';
}else{
$nazva=htmlspecialchars($_POST[nazva]);
$msg=htmlspecialchars($_POST[msg]);
if(mb_strlen($nazva) < 5)
{
header ("Location: gamefaq.php?go=new"); exit;
exit;
}
if(mb_strlen($msg) < 10)
{
header ("Location: gamefaq.php?go=new"); exit;
exit;
}
$time = date("d.m.y в H:i:s");
mysql_query("INSERT INTO `library_forum_topik` SET `razdel` = '".mysql_real_escape_string($_POST['kategory'])."',`tema` = '$nazva',`user` = '$account[id]',`status2` = 'on',`time` = '$time' ");
mysql_query("UPDATE `library_forum` SET `tem`=`tem` + '1' WHERE `id`='".intval($_POST['kategory'])."'");
$u=mysql_query("SELECT * FROM `library_forum_topik` ORDER by `id` DESC");
$dat=mysql_fetch_array($u);
$uids=$dat[id];
include ("inc/antireklama.php");
mysql_query("INSERT INTO `library_forum_msg` SET `topik` = '".mysql_real_escape_string($_POST['kategory'])."',`tema`='$uids',`msg` = '$msg',`user` = '$account[id]',`time` = '$time ',`status2` = 'on' ");
echo'<img src="/pic/main/pers_sohran.png" alt="*"/> Статья добавлена';
}
echo '</div>';
echo'<a href="gamefaq.php" class="menu_link"><img src="pic/main/rotate.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Вернуться</a>';
}else{header ("Location: gamefaq.php"); exit;}
break;
case 'razdel':
echo'<div class="title-top">Новый раздел</div><div class="separ2"></div>';
echo'<div class="text2">';
if($account['status']=="gm"){
if(empty($_POST[name])){
echo "<form action="gamefaq.php?go=razdel" method="post">";
echo"Название раздела:<br><input class='input' type="text" size="25" name="name" maxlength="25"/><br/>";
echo '<input class="button" type="submit" value="Создать" /></form></div>';
echo'<a href="gamefaq.php" class="menu_link"><img src="pic/main/rotate.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Вернуться</a>';
}else{
$msg=htmlspecialchars($_POST[name]);
if(mb_strlen($msg) < 5)
{
header ("Location: gamefaq.php?go=razdel"); exit;
exit;
}
mysql_query("INSERT INTO `library_forum` SET `name` = '$msg' ");
header ("Location: gamefaq.php"); exit;
}
}else{
header ("Location: gamefaq.php"); exit;
}
echo '</div>';
break;
case 'admin':
echo'<div class="title-top">Администрация</div><div class="separ2"></div>';
echo'<div class="text2">';
echo '<u>Администраторы:</u><br>';
$req = mysql_query("SELECT * FROM `account` WHERE `status`='gm' ORDER BY id DESC LIMIT 3 ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
if($mag['status']=="gm"){
$nik = gradient(''.$mag[login].'','00FF00', '00CC00');
echo '<us><img src="pic/main/'.$mag[sex].'.png" alt="*"/> <a href="infa.php?id='.$mag['id'].'"> '.$nik.'</us></a>';
$d = time()-7000;
if($mag[last_active]<$d){echo" - <font color=red>Offline</font><br>";
}else{
echo" - <font color=00CC00>Online</font><br>";
}
}}}else{
echo '<img src="pic/main/!.png" alt="*"/> Нет администраторов!<br>';
}
echo '<br>';
echo '<u>Модераторы:</u><br>';
$req = mysql_query("SELECT * FROM `account` WHERE `status`='moder' ORDER BY id DESC LIMIT 3 ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
if($mag['status']=="moder"){
$nik = gradient(''.$mag[login].'','0066CC', 'AB82FF');
echo '<us><img src="pic/main/'.$mag[sex].'.png" alt="*"/> <a href="infa.php?id='.$mag['id'].'"> '.$nik.'</us></a>';
$d = time()-7000;
if($mag[last_active]<$d){echo" - <font color=red>Offline</font>";
}else{
echo" - <font color=00CC00>Online</font>";
}
}}}else{
echo '<img src="pic/main/!.png" alt="*"/> Нет модераторов!';
}
echo '<br><br>';
echo '<u>Информаторы:</u><br>';
$req = mysql_query("SELECT * FROM `account` WHERE `status`='bot' ORDER BY id DESC LIMIT 3 ");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
if($mag['status']=="bot"){
$nik = gradient(''.$mag[login].'','FFCC00', 'FF9933');
echo '<us><img src="pic/main/'.$mag[sex].'.png" alt="*"/> <a href="infa.php?id='.$mag['id'].'"> '.$nik.'</us></a>';
$d = time()-7000;
if($mag[last_active]<$d){echo" - <font color=red>Offline</font>";
}else{
echo" - <font color=00CC00>Online</font>";
}
}}}else{
echo '<img src="pic/main/!.png" alt="*"/> Нет системных роботов!<br>';
}
echo '</div>';
echo'<a href="gamefaq.php" class="menu_link"><img src="pic/main/rotate.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Вернуться</a>';
}
}else{
header ("Location: index.php"); exit;
}
include 'inc/nogi.php';
?>