Просмотр файла release_fix#2/mods/game/guild/pms.php

Размер файла: 2.6Kb
<?php
session_start();
$mod_title="игра-гильдия";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
$gcx1="";
$mz="";
if($auth=="ok")
{
$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,$exp,$guild) = mysql_fetch_row($cat))
{
$level=$lvl;
$gcx1=$guild;
$mz=$mon;
}
$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($gcx1=="")
{
include "server_config.php";
echo "Вы не состоите в гильдии!<br>";
}
else
{
$gpms="";
$gw0="";
$query = "SELECT * FROM guildc WHERE login='$_COOKIE[login]'";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$guild,$login,$pms) = mysql_fetch_row($cat))
{
$gw0=$guild;
$gpms=$pms;
}
if($gpms=="100")
{
if(empty($_GET['dox']))
{
echo "
<form method='POST' action='?do=game/guild/pms&dox=go'>
пользователь:<br>
<input type='text' name='login' size='15'><br>
права(0=юзер,100=админ):<br>
<input type='text' name='pms' size='15' value='100'><br>
<input type='submit' value='назначить'><br>
</form>
";
}
else
{
$gn2="";
$query0 = "SELECT * FROM guildc WHERE login='$_POST[login]'";
$cat0 = mysql_query ($query0);
if(!$cat0) exit (mysql_error());
while(list($id,$guild,$login,$pms) = mysql_fetch_row($cat0))
{
$gn2=$guild;
}
if($gn2==$gw0)
{
$query="UPDATE guildc SET pms='$_POST[pms]' WHERE login='".$_POST[login]."'";
$result=mysql_query($query)
or die("<span style='color:red'>ошибка!</span><br>");
echo "<span style='color:green'>успешно!<br></span>";
}
else
{
echo "<span style='color:red'>ошибка:хакер сраный!</span><br>";
}
}
}
else
{
echo "вы не администратор гильдии!<br>";
}
}
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>