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

File size: 6.2Kb
<?php
session_start();
$mod_title="игра-персонаж";
$mod_status="on";
if($mod_status=="on")
{
function mod_body($auth,$adminauth)
{
$level="";
$guildc="";
$avac="";
$arenac="";
$expc="";
$s1="";
$m1="";
$z1="";
$h1="";
$mycl="";
$points2="";
$money="";
$gold1="";
$pvpx="";
$guilds="";
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,$point2,$pvp) = mysql_fetch_row($cat))
{
$guilds=$guild;
$pvpx=$pvp;
$s1=$s;
$m1=$m;
$z1=$z;
$h1=$h;
$avac=$ava;
$level=$lvl;
$expc=$exp;
$mycl=$class;
$points2=$point2;
$gold1=$gold;
$money=$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;
}
include "data/level.php";
if($points2>"0")
{
if(!empty($_GET['dox']))
{
$forup="0";
if($_GET['dox']=="s")
{
$forup=$s1+"1";
}
else if($_GET['dox']=="m")
{
$forup=$m1+"1";
}
else if($_GET['dox']=="z")
{
$forup=$z1+"1";
}
else if($_GET['dox']=="h")
{
$forup=$h1+"1";
}
$pnt=$points2-"1";
$query="UPDATE users SET $_GET[dox]='$forup',point='$pnt' WHERE login='".$_COOKIE[login]."'";
$result=mysql_query($query)
or die("<span style='color:red'>ошибка обновления персонажа!</span><br>");
}
$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,$points,$pvp) = mysql_fetch_row($cat))
{
$s1=$s;
$m1=$m;
$z1=$z;
$h1=$h;
$avac=$ava;
$level=$lvl;
$expc=$exp;
$mycl=$class;
$point=$points;
$gold1=$gold;
$money=$mon;
$guilds=$guild;
$pvpx=$pvp;
}
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>
<img src='$avac' alt='avatar'><br>
<a href='?do=game/avatar'>сменить аватар</a><br>
у вас $point поинтов<br>
ваш клас:$mycl<br>
exp:$expc/$e<br>
уровень:$level<br>
серебро:$money<br>
золото:$gold1<br>
сила:$s1 <a href='?do=game/char&dox=s'>+</a>|<a href='?do=game/points&dox=s'>больше</a><br>
магия:$m1 <a href='?do=game/char&dox=m'>+</a>|<a href='?do=game/points&dox=m'>больше</a><br>
защита:$z1 <a href='?do=game/char&dox=z'>+</a>|<a href='?do=game/points&dox=z'>больше</a><br>
жизни:$h1 <a href='?do=game/char&dox=h'>+</a>|<a href='?do=game/points&dox=h'>больше</a><br>
ваша гильдия:$guilds<br>
PvP очки:$pvpx<br>
<a href='?do=game/settings'>настройки</a><br>
<a href='?do=game/mail/index'>почта</a><br>
<a href='?do=game/invent'>инвентарь</a><br>
<a href='?do=game/items'>квест итемы</a><br>
";
echo "Ваши награды:<br>";
$query = "SELECT * FROM awards WHERE login='$_COOKIE[login]' ORDER BY id DESC LIMIT 0,5";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$name,$img) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/award_info&name=$name'><img src='$img' alt='$name' border='0'></a>";
}
echo "<br><a href='?do=game/awards&login=$_COOKIE[login]'>[все награды]</a><br>";
echo "Ваши подарки:<br>";
$query = "SELECT * FROM mygifts WHERE login='$_COOKIE[login]' ORDER BY id DESC LIMIT 0,5";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$img,$name) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/gift_info&name=$name'><img src='img/gifts/$img' alt='$name' border='0'></a>";
}
echo "<br><a href='?do=game/gifts&login=$_COOKIE[login]'>[все подарки]</a><br>";
echo "<br>";
}
else
{
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>
<img src='$avac' alt='avatar'><br>
<a href='?do=game/avatar'>сменить аватар</a><br>
ваш клас:$mycl<br>
exp:$expc/$e<br>
уровень:$level<br>
серебро:$money<br>
золото:$gold1<br>
сила:$s1<br>
магия:$m1<br>
защита:$z1<br>
жизни:$h1<br>
<a href='?do=game/settings'>настройки</a><br>
<a href='?do=game/mail/index'>почта</a><br>
<a href='?do=game/invent'>инвентарь</a><br>
<a href='?do=game/items'>квест итемы</a><br>
ваша гильдия:$guilds<br>
PvP очки:$pvpx<br>
";
echo "Ваши награды:<br>";
$query = "SELECT * FROM awards WHERE login='$_COOKIE[login]' ORDER BY id DESC LIMIT 0,5";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$name,$img) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/award_info&name=$name'><img src='$img' alt='$name' border='0'></a>";
}
echo "<br><a href='?do=game/awards&login=$_COOKIE[login]'>[все награды]</a><br>";
echo "Ваши подарки:<br>";
$query = "SELECT * FROM mygifts WHERE login='$_COOKIE[login]' ORDER BY id DESC LIMIT 0,5";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$img,$name) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/gift_info&name=$name'><img src='img/gifts/$img' alt='$name' border='0'></a>";
}
echo "<br><a href='?do=game/gifts&login=$_COOKIE[login]'>[все подарки]</a><br>";
echo "<br>";
}
echo "Модификации: <a href='?do=game/mods/cat'>[каталог]</a><br>";
$query = "SELECT * FROM mods WHERE login='$_COOKIE[login]' ORDER BY id DESC";
$cat = mysql_query ($query);
if(!$cat) exit (mysql_error());
while(list($id,$login,$name,$mid) = mysql_fetch_row($cat))
{
echo "<a href='?do=game/mods/index&mid=$mid'>$name</a> <a href='?do=game/mods/uninstall&mid=$mid'>[удалить]</a><br>";
}
echo "<br>";
include "data/buttons.auth.php";
}
else
{
echo "
Ошибка авторизации!<br>
";
}
}
}
else
{
function mod_body($auth,$adminauth)
{
echo "мод выключен администратором!<br>";
}
}
?>