Просмотр файла game.php

Размер файла: 3.97Kb
<?php
include "ini.php";
include "includes/header.php";
include "includes/inc_online.php";
print "<p><small>";

$id=cyr(htmlspecialchars(stripslashes(trim($id))));
$login=cyr(htmlspecialchars(stripslashes(trim($login))));
$pass=cyr(htmlspecialchars(stripslashes(trim($pass))));

if(!empty($login)) 
{  
$q = mysql_query("select secur,golod,band,guns,cars,id,login,pass,status,reg_data,money,level,police,health from users where login='".cyr($login)."';"); 
}
elseif(!empty($id)) 
{
$q = mysql_query("select secur,golod,band,guns,cars,id,login,pass,status,reg_data,money,level,police,health from users where id='".$id."';"); 
}
else
{
die ($lang['empty_login']."</small></p></card></wml>");
}

$data = mysql_fetch_array($q);

$id=$data['id'];
$login=$data['login'];
$status=$data['status'];
$reg_data=$data['reg_data'];
$money=$data['money'];
$level=$data['level'];
$police=$data['police'];
$health=$data['health'];
$cars=$data['cars'];
$guns=$data['guns'];
$band=$data['band'];
$golod=$data['golod'];
$secur=$data['secur'];

if($pass!=$data['pass'])
{
die ($lang['empty_login']."</small></p></card></wml>");
}

mysql_query("update users set last='".time()."',city='0' where id='".$id."';");


print "<a href=\"http://wenz.org.ru/gta/city1/news.php?id=$id&amp;pass=$pass\"><b>Новоcти!!!(прочти)</b></a><br/>";
print "<a href=\"http://wenz.org.ru\">Общение и Пpeдложения по игpe</a><br/>";
print "<b>---------------</b><br/>";
print $lang['game_hello1'].", $login! ".$lang['game_hello2']."<br/>";



print "<b>[".$lang['game_towns']."]</b><br/>";
if($level<1)
{
print "<a href=\"city1/index.php?id=$id&amp;pass=$pass\">".$lang['game_city1']."</a><br/>";
print $lang['game_city2']."<br/>".$lang['game_city3']."<br/>";
}
elseif($level>=1 && $level<2)
{
print "<a href=\"city1/index.php?id=$id&amp;pass=$pass\">".$lang['game_city1']."</a><br/>";
print "<a href=\"city2/index.php?id=$id&amp;pass=$pass\">".$lang['game_city2']."</a><br/>";
print "<a href=\"city3/index.php?id=$id&amp;pass=$pass\">".$lang['game_city3']."</a><br/>";
}
elseif($level>=2)
{
print "<a href=\"city1/index.php?id=$id&amp;pass=$pass\">".$lang['game_city1']."</a><br/>";
print "<a href=\"city2/index.php?id=$id&amp;pass=$pass\">".$lang['game_city2']."</a><br/>";
print "<a href=\"city3/index.php?id=$id&amp;pass=$pass\">".$lang['game_city3']."</a><br/>";
}
if(!empty($band))
{
$band_q=mysql_query("select members from bands where name='".$band."';");
$band_array=mysql_fetch_array($band_q);
$members=$band_array['members'];
$band_members = explode(".", $members);
if(empty($members) || !in_array($login,$band_members))
mysql_query("update users set band='' where id='".$id."';");
else
{
print "<b>[".$lang['game_your_band']."]</b><br/>";
print "<a href=\"bands/band_panel.php?id=$id&amp;pass=$pass\">$band</a><br/>";
}
}

include("includes/inc_statusy.php");

print "<b>[".$lang['game_stats']."]</b><br/>";

print $lang['uv_money'].": <b>$money $$</b><br/>";
print $lang['uv_health'].": <b>$health %</b><br/>";
print $lang['uv_golod'].": <b>$golod %</b><br/>";
print $lang['uv_police'].": <b>$police</b><br/>";
print $lang['uv_level'].": <b>$level</b><br/>";
print $lang['uv_status'].": <b>$status</b><br/>";
print $lang['uv_secur'].": <b>$secur</b>";

if(!empty($cars))
{
$cars_count = explode(".", $cars);
$count_cars=count($cars_count);
print "<br/>".$lang['game_cars']." <b>($count_cars)</b>:<br/>";
for($i=0;$i<$count_cars;$i++)
{
print $cars_count[$i].","; 
}
}
if(!empty($guns))
{
$guns_count = explode(".", $guns);
$count_guns=count($guns_count);
print "<br/>".$lang['game_guns']." <b>($count_guns)</b>:<br/>";
for($i=0;$i<$count_guns;$i++)
{
print $guns_count[$i].","; 
}




}



print "         <br/>";
print "<a href=\"/gta/profile.php?id=$id&amp;pass=$pass\">Изменение пpофиля</a><br/>";
print "<a href=\"/gta/exit.php?id=$id&amp;pass=$pass\">Выход</a><br/>";

mysql_close();
print "</small></p></card></wml>";
?>