Файл: public_html/system/header.php
Строк: 105
<?php
echo '<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="'.$HOME.'/favicon.ico"/>
<link rel="stylesheet" href="'.$HOME.'/design/standart.css" type="text/css"/>
<meta name="Reply-to" content="soul_eaterman@mail.ru"/>
<meta name="copyright" content="'.$HOME.'" />
<meta name="author" content="SPRINT"/>
<title>'.$title.'</title>
</head>
<body>';
if($user['id']){
$req = mysql_query("SELECT * FROM `item` WHERE `user` = '$user[login]' and `tip`='armor' and `odet`='1'");
$avto=mysql_num_rows($req);
if($avto>=1){
$item = mysql_fetch_array($req);
$antiradarmor=$item[antirad];
}else{
$antiradarmor=10;
}
$req = mysql_query("SELECT * FROM `item` WHERE `user` = '$user[login]' and `tip`='gasmask' and `odet`='1'");
$avto=mysql_num_rows($req);
if($avto>=1){
$item = mysql_fetch_array($req);
$antiradgasmask=$item[antirad];
}else{
$antiradgasmask=0;
}
$antirad=$antiradarmor+$antiradgasmask;
$date = time();
$point=intval((time()-$user['lastenergy'])/20);
if($point>=1){
$newmp=$user['energy']+(1*$point);
if($newmp>100){$newmp=100;}
mysql_query("UPDATE users SET energy = '$newmp', lastenergy = '$date' WHERE login = '$user[login]'");
}
if($user[radiation]>$antirad){
$pointrad=intval((time()-$user['lastrad'])/60);
if($pointrad>=1){
$rad=$user[radiation]/5;
$newhp=$user[hp]-($rad*$pointrad);
if($newhp<=0){$newhp=0;}
mysql_query("UPDATE users SET hp = '$newhp', lastrad = '$date' WHERE login = '$user[login]'");
}}else{
$pointmrad=intval((time()-$user['lastrad'])/120);
if($pointmrad>=1){
$mrad=1*$pointmrad;
$mrad=$user[radiation]-$mrad;
if($minusrad<0){$minusrad==0;}
mysql_query("UPDATE users SET radiation = '$minusrad', lastrad = '$date' WHERE login = '$user[login]'");}}
echo"<div class='head'>";
if($user[radiation]>$antirad){$color="brown";}else{$color="#BABABA";}
echo "<center><img src='/images/rub.png'>$user[rub] <img src='/images/burn.png'><font color='$color'>$user[radiation]</font></center>";
if($user[level]==3){
echo "<center><a href='/adminka.php'><b>[</b>АДМИНКА<b>]</b></a></center>";}
echo"</div><div class='menu'>";
echo'<div style="background: gray; height: 2px; border: 1px inset gray; width:100%;"><div style="background: #971515; height: 1px; border: 1px outset #971515; width: '.$user[hp].'%;"> </div></div>';
echo "<div style='margin-top: 2px; margin-bottom: 1px;'>";
echo'<div style="background: gray; height: 2px; border: 1px inset gray; width:100%;"><div style="background:#1C559B;height: 1px; border: 1px outset #1C559B; width: '.$user[energy].'%;"> </div></div></div><br/>';
if($user[pve]==0 and $user[pvp]==0){
if($user[hp]<=0){
mysql_query("UPDATE users SET x = '0', y = '0', hp = '25', radiation = '0' WHERE login = '$user[login]'");
echo "Вы потеряли сознание...<br/><a href='loc.php'>Дальше</a>";
require_once('system/footer.php');
exit;}
}
}
?>