View file release_fix#2/mods/game/item.php

File size: 1.92Kb
<?php
session_start();
$mod_title="игра-инфо о $_GET[name]";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$arenac="";
if($auth=="ok")
{
$mcl="";
$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;
}
$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";
}
$t1="";
$t2="";
$i_exp="";
$i_s="";
$i_m="";
$i_z="";
$i_mon="";
$i_gold="";
$namx="";
$query = "SELECT * FROM shop  WHERE id='$_GET[name]' ORDER BY id DESC LIMIT $_pg,$_pg2";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$name,$text,$s,$m,$z,$exp,$class,$mon,$gold,$h) = mysql_fetch_row($cat))
{
$namx=$name;
$t1="ok";
$t2=$class;
$i_s=$s;
$i_m=$m;
$i_z=$z;
$i_exp=$exp;
$i_mon=$mon;
$i_gold=$gold;
}
if($t1 != "ok")
{
echo "<span style='color:red'>Предмет $_GET[item] несуществует!</span><br>";
}
else
{
echo "предмет, $namx:<br>
exp:$i_exp<br>
сила:$i_s<br>
магия:$i_m<br>
защита:$i_z<br>
жизни:$h;
";
}
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>