<?php
session_start();
$mod_title="игра-меню GM-а";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
if($auth=="ok")
{
$mcl="";
$perms="";
$query = "SELECT * FROM users WHERE login='$_COOKIE[login]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$pass,$mail,$reg,$class,$m,$h,$z,$s,$mon,$gold,$pms,$lvl,$ava,$ban,$online) = mysql_fetch_row($cat))
{
$mcl=$class;
$level=$lvl;
$perms=$pms;
}
$query = "SELECT * FROM count";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$guild,$arena) = mysql_fetch_row($cat))
{
$guildc=$guild;
$arenac=$arena;
}
echo "
<img src='img/bo.png'> <a href='?do=game/char'>персонаж($level)</a>|<img src='img/bs.png'> <a href='?do=game/history'>история</a><br>
<br>
";
$_pg="0";
$ag="-10";
$_pg2="10";
if(!empty($_GET['_pg']))
{
$ag=$_GET['_pg']-"10";
$_pg=$_GET['_pg'];
$_pg2=$_GET['_pg']+"10";
}
if($perms=="100")
{
if(empty($_GET['dox']))
{
$query = "SELECT * FROM location ORDER BY id DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/gm/delmob&dox=go&inst=$name'>открыть локацию $name</a><br>";
}
}
else if($_GET['dox']=="go")
{
$query = "SELECT * FROM mobs WHERE inst='$_GET[inst]' ORDER BY lvl DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$inst,$lvl,$s,$m,$h,$expp,$expm,$mp,$mm,$drop) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/gm/delmob&dox=del&name=$name'>удалить моба $name</a></a><br>";
}
}
else
{
$query="DELETE FROM mobs WHERE name='$_GET[name]'";
$result=mysql_query($query)
or die("ошибка удаления!");
echo "<span style='color:green'>моб $_GET[name] удалён!</span><br>";
}
echo "<a href='?do=game/gm/delmob&inst=$_GET[inst]&_pg=$ag&dox=$_GET[dox]'><<<назад</a>|<a href='?do=game/gm/delmob&inst=$_GET[inst]&dox=$_GET[dox]&_pg=$_pg2'>далее>>></a><br>";
}
else
{
echo "Вы не администратор!<br>";
}
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>