Файл: files/zagarena.php
Строк: 270
<?php
include_once"files/ini.php";
include_once"files/data.php";
include_once"files/lvl.php";
include_once"files/lvlclan.php";
include_once"files/regeneration.php";
echo '<title>l2mo.ru - '.$log.'</title>';
if($_SESSION['version'] == 'new'){
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="stylesheet" type="text/css" href="css/new/style.css?"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta content="noindex, nofollow" name="robots" />';
echo "<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-38152348-1']);
_gaq.push(['_setDomainName', 'l2mo.ru']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>";
echo '</head><body>
<table>
<tr>
<td class="lt1"></td><td class="t1"><div><b>Wap LineAge</b></div></td><td class="rt1"></td>
</tr>
<tr>
<td class="l"></td>
<td class="centertd">';
}elseif($_SESSION['version'] == 'web'){
include_once 'files/web_golova.php';
}
include_once"files/opiti.dat";
if($udata16 > $udata17){
mysql_query("UPDATE `users` SET `udata16`='$udata17' WHERE `udata0`='$log'");
}
if($udata29 > $udata30){
mysql_query("UPDATE `users` SET `udata16`='$udata17' WHERE `udata0`='$log'");
}
if($udata37==TWI){
$kkk=time()-86400;
if($udata52<=$kkk){
mysql_query("UPDATE `users` SET `udata37`='' WHERE `udata0`='$log'");
}
}
$time=time();
///////
$req = mysql_query("SELECT * FROM `table_vip` WHERE `time`<='$time' and `nick`='$log'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto=='1'){
mysql_query("UPDATE `users` SET `udata75`='' WHERE `udata0`='$log'");
mysql_query("DELETE FROM `table_vip` WHERE `nick`='$log' LIMIT 1");
}
////////////////////////////////Рекомендации////////////////////////////////////////////////
mysql_query("DELETE FROM `rec` WHERE `time`<('".time()."'-'54000') ");
///////////////////////////////////////////////////////////////////////////////////////////////////////
//Перевод секунд в минуты, часы, дни. Добавил 20.03.10
function sec2day($sec=NULL)
{
$days = floor($sec/86400);
$hours = floor(($sec/3600)-$days*24);
$minuts = floor(($sec-$hours*3600-$days*86400)/60);
$seconds = $sec-($minuts*60+$hours*3600+$days*86400);
if ($days!=0)$days = $days.' дн. ';
else $days = NULL;
if ($hours!=0)$hours = $hours.' ч. ';
else $hours = NULL;
if ($minuts!=0)$minuts = $minuts.' мин. ';
else $minuts = NULL;
$sectoday = $days.''.$hours.''.$minuts.''.$seconds.' сек.';
return $sectoday;
}
function sec3day($sec1=NULL)
{
$days1 = floor($sec1/86400);
if ($days1!=0)$days1 = $days1.'';
else $days1 = NULL;
$sectoday1 = $days1.'';
return $sectoday1;
}
$dateTotal1 = time();
$dateTotal2 = $dateTotal1 - $udata56;
$fffv=$udata60+$dateTotal2;
if ($dateTotal2 <= 600)mysql_query("UPDATE `users` SET `udata60` = '".$fffv."' WHERE `udata0` = '$log' LIMIT 1");
if($udata34=="0"){
echo"<small><a href="pers.php?log=$log&pas=$pas">$log - $udata9 уровень. </a></small><br/>";
echo"<img src="hp.php?" alt="HP: $udata16/$udata17"/><br/>";
echo"<img src="mp.php?" alt="MP: $udata29/$udata30"/><br/>";
echo"<img src="exp.php?" alt="EXP: $exp %"/><hr>";
}else{
echo"<small><a href="pers.php?log=$log&pas=$pas">$log - $udata9 уровень. </a></small><br/>";
echo"<img src="hp.php?" alt="HP: $udata16/$udata17"/><br/>";
echo"<img src="mp.php?" alt="MP: $udata29/$udata30"/><br/>";
echo"<img src="exp.php?" alt="EXP: $exp %"/><hr>";
}
/////////////////////БЛОК/////////////////////////////////
$t=time();
$req = mysql_query("SELECT * FROM `ban` WHERE `usr` = '$log' LIMIT 1");
// //////////////////////////
$avto = mysql_num_rows($req);
if ($avto == 1) {
echo "<div class="warning s">";
$ban = mysql_fetch_array($req);
if($ban[ban_time]<$t){
mysql_query("DELETE FROM `ban` WHERE `usr` = '$log'");
}else{
echo"Вы находитесь в бане!<br> Причина бана: $ban[text]<br> Осталось: ";
$ban[ban_time]=$ban[ban_time]-time();
if($ban[ban_time]<60){
echo "$ban[ban_time] сек.";
}elseif($ban[ban_time]>60 and $ban[ban_time]<3600){
$ban[ban_time]=round($ban[ban_time]/60);
echo "$ban[ban_time] мин.";
}else{
$ban[ban_time]=round($ban[ban_time]/3600);
echo "$ban[ban_time] часов";
}
echo '</div>';
include('files/down.php');exit;
}
}
$q = mysql_query("SELECT COUNT(*) FROM `msg_r` WHERE `user_to` = '$log' AND `read` = '1';");
$new_mail = mysql_result($q, 0);
if ($new_mail>0)
{
echo "<div class="warning s">У вас <big><b><a href="msg.php?">[$new_mail]</a></b></big> новых сообщений</div>";
}
//////////////////////////////ПАТИ//////////////////////////
$a = @mysql_query("select * from paty WHERE `paty0`='$log' and `paty2`='ok' ");
while($arr=mysql_fetch_array($a)){
if($arr['paty0']==$log){
echo'<div class="warning s">Вы в пати с '.$arr[paty1].' <a href=paty.php?go=del&name='.$arr[paty1].'>Отменить</a></div>';
}
}
$a = @mysql_query("select * from paty WHERE `paty1`='$log' and `paty2`='ok' ");
while($arr=mysql_fetch_array($a)){
if($arr['paty1']==$log){
echo'<div class="warning s">Вы в пати с '.$arr[paty0].' <a href=paty.php?go=del&name='.$arr[paty0].'>Отменить</a></div>';
}
}
$a = @mysql_query("select * from paty WHERE `paty1`='$log' and `paty2`='time' ");
while($arr=mysql_fetch_array($a)){
if($arr['paty1']==$log){
echo'<div class="warning s">'.$arr[paty0].' предлагает вам пати вы согласны? <a href=paty.php?go=ok>Да</a> | <a href=paty.php?go=no>Нет</a></div>';
}
}
$a = @mysql_query("select * from paty WHERE `paty0`='$log' and `paty2`='time' ");
while($arr=mysql_fetch_array($a)){
if($arr['paty0']==$log){
echo'<div class="warning s">Вы ожидаете на потверждения пати игрока '.$arr[paty1].' <a href=paty.php?go=del&name='.$arr[paty1].'>Отменить</a></div>';
}
}
$pit = mysql_query("SELECT * from `pit` WHERE `usr`='".$log."' and `active`='yes' LIMIT 1");
$pi=mysql_num_rows($pit);
if($pi==1){
echo"<div class="warning s">$namepit: Уровень $lvlpit<br>
Жизни: $hppit/$allhppit<br>
Атака/Зашита: $attack/$def<br>
EXP: $pitexpp</div>";
}
$us3 = mysql_query("SELECT * FROM `baffs` WHERE `login`='$log' ");
$user3=mysql_num_rows($us3);
if($user3>0){
while($use=mysql_fetch_array($us3)){
if($use[name]=="baffatk"){$baff="Бафф на Физ.Атк.";}
if($use[name]=="baffarmor"){$baff="Бафф на Физ.Защ.";}
if($use[name]=="baffmatk"){$baff="Бафф на Маг.Атк.";}
if($use[name]=="baffmzashita"){$baff="Бафф на Маг.Защ.";}
$ostatok=$use[time]-time();
echo"<div class="warning s"><small>$baff (Сила: $use[kol_sila]| Осталось:".sec2day($ostatok).")</small></div>";
}
}
////////////////////////////////////////////////////////
$us2 = mysql_query("SELECT * FROM `pitmag` WHERE `login`='$log' ");
$user2=mysql_num_rows($us2);
if($user2>0){
echo '<div class="warning s">';
while($pit=mysql_fetch_array($us2)){
if($pit[vid]=="petatk"){$pom="Атакующий";}
if($pit[vid]=="petmp"){$pom="Дает Доп. Ману";}
echo"<b>$pit[name]</b> - $pom</br><font color=red>$pit[hp]/$pit[allhp] HP</font></br>";
if($pit[vid]=="petatk"){
echo"<font color=blue>$pit[mp]/$pit[allmp] MP</font></br>";
}}
echo '</div>';
}
//////////////////////////////БАФФЫ////////////////////////////////////////
$time=time();
///////
$req = mysql_query("SELECT * FROM `aurs` WHERE `actimer`<='$time' and `usr`='$log' and `name`='Повышеная зашита'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto=='1'){
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr` = '$log'");
$mag = mysql_fetch_assoc($req);
$udata3=$udata3-$mag['sila'];
mysql_query("UPDATE `users` SET `udata3`='$udata3' WHERE `udata0`='$log'");
mysql_query("DELETE FROM `aurs` WHERE `usr` = '$log' and `name`='Повышеная зашита' LIMIT 1");
}
$time=time();
///////
$req = mysql_query("SELECT * FROM `aurs` WHERE `actimer`<='$time' and `usr`='$log'");
////////////////////////////
$avto=mysql_num_rows($req);
if($avto=='1'){
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr` = '$log' and `name`='Повышеная атака'");
$mag = mysql_fetch_assoc($req);
$udata4=$udata4-$mag['sila'];
mysql_query("UPDATE `users` SET `udata4`='$udata4' WHERE `udata0`='$log'");
mysql_query("DELETE FROM `aurs` WHERE `usr` = '$log' and `name`='Повышеная атака' LIMIT 1");}
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr` = '$log' and `name`='Повышеная атака'");
$avto=mysql_num_rows($req);
if($avto==1){
echo "<div class="warning s">";
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr`='$log' and `name`='Повышеная атака' ");
////////////////////////////
$avto=mysql_num_rows($req);
$aro = mysql_fetch_array($req);
echo"<div class="image-radius" style="background: url(img/151.png); width: 20px; height: 20px;"></div>$aro[name] (+$aro[sila] | ";
$aro[actimer]=$aro[actimer]-time();
if($aro[actimer]<60){
echo "Осталось: $aro[actimer] сек.)";
}else{
$aro[actimer]=round($aro[actimer]/60);
echo "Осталось: $aro[actimer] мин.)<br>";}
echo '</div>';
}
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr` = '$log' and `name`='Повышеная зашита'");
$avto=mysql_num_rows($req);
if($avto==1){
echo "<div class="warning s">";
$req = mysql_query("SELECT * FROM `aurs` WHERE `usr`='$log' and `name`='Повышеная зашита' ");
////////////////////////////
$avto=mysql_num_rows($req);
$aro = mysql_fetch_array($req);
echo"<div class="image-radius" style="background: url(img/144.png); width: 20px; height: 20px;"></div> $aro[name] (+$aro[sila] | ";
$aro[actimer]=$aro[actimer]-time();
if($aro[actimer]<60){
echo "Осталось: $aro[actimer] сек.)";
}else{
$aro[actimer]=round($aro[actimer]/60);
echo "Осталось: $aro[actimer] мин.)";}
echo '</div>';
}
include_once"files/achieve.php";
////////////////////////////////КАРТИНКИ///////////////////////////////////
if($udata34=="1"){
function img2($image2) {return eregi_replace("((<img src)[-a-zA-Z0-9@:%_+.~#?;&//=)/" >]+)","", $image2);} ob_start("img2");
function img($image) {return eregi_replace("((<img src)[-a-zA-Z0-9@:%_+.~#?;&//=)/" >]+<br/>)","", $image);} ob_start("img");
}
///////////////////// Закрытие ИГРЫ //////////////////////////
$switch = @file("local/game/switch.dat");
$swi = explode("||", $switch[0]);
$switchdetail = $swi[0];
$switchdate = $swi[1];
$u = explode(".",$login);
if ($switch!==false && $log!=="ByUNNAMED") {
echo "<div class="warning s">";
echo "<b>Игра временно закрыта</b><br />";
echo'Причина: '.$switchdetail.'<br />Дата закрытия: '.$switchdate.'<br/><a href="index.php">выход</a><br />';
echo '</div>';
include_once "files/down.php";
exit;}
$qi = mysql_query("SELECT * from `sell` WHERE `uda7`='".$log."' ");
while($row=mysql_fetch_array($qi))
if($row['uda7']==$log){
echo"Вы продаёте вещи<br><a href="sellruktime.php?">Вернутся</a><br/>";
include_once "files/down.php";
exit;
}
$qi = mysql_query("SELECT * from `sellcoin` WHERE `coin0`='".$log."' ");
while($row=mysql_fetch_array($qi))
if($row['coin0']==$log){
echo"<div class="warning s">Вы продаёте вещи<br><a href="sellcoin.php?">Вернутся</a></div>";
include_once "files/down.php";
exit;
}
////////////////////////////////////////////////////////
list($msec,$sec)=explode(chr(32),microtime());
$gtime=$sec+$msec;
////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////
$us2 = mysql_query("SELECT * FROM `baffs` WHERE `login`='$log' AND `active`='off' ");
$user2=mysql_num_rows($us2);
if($user2>0){
while($user1=mysql_fetch_array($us2)){
if($user1[name]=="baffatk"){
$atk=$udata4*$user1[sila]/100;
$udata4=$atk+$udata4;
mysql_query("UPDATE `users` SET `udata4`='$udata4' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on', `kol_sila`='$atk' WHERE `login`='$log' AND `name`='baffatk' ");
}
if($user1[name]=="baffarmor"){
$atk=$udata3*$user1[sila]/100;
$udata3=$atk+$udata3;
mysql_query("UPDATE `users` SET `udata3`='$udata3' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on', `kol_sila`='$atk' WHERE `login`='$log' AND `name`='baffarmor' ");
}
if($user1[name]=="baffmatk"){
$atk=$udata83*$user1[sila]/100;
$udata83=$atk+$udata83;
mysql_query("UPDATE `users` SET `udata83`='$udata83' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on', `kol_sila`='$atk' WHERE `login`='$log' AND `name`='baffmatk' ");
}
if($user1[name]=="baffmzashita"){
$atk=$udata82*$user1[sila]/100;
$udata82=$atk+$udata82;
mysql_query("UPDATE `users` SET `udata82`='$udata82' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on', `kol_sila`='$atk' WHERE `login`='$log' AND `name`='baffmzashita' ");
}
}}
$us2 = mysql_query("SELECT * FROM `baffs` WHERE `login`='$log' AND `time`<'".time()."' ");
$user2=mysql_num_rows($us2);
if($user2>0){
while($user1=mysql_fetch_array($us2)){
if($user1[name]=="baffatk"){
$udata4=$udata4-$user1[kol_sila];
mysql_query("UPDATE `users` SET `udata4`='$udata4' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on' WHERE `login`='$log' AND `name`='baffatk' ");
}
if($user1[name]=="baffarmor"){
$udata3=round($udata3-$user1[kol_sila]);
mysql_query("UPDATE `users` SET `udata3`='$udata3' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on' WHERE `login`='$log' AND `name`='baffarmor' ");
}
if($user1[name]=="baffmatk"){
$udata83=$udata83-$user1[kol_sila];
mysql_query("UPDATE `users` SET `udata83`='$udata83' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on' WHERE `login`='$log' AND `name`='baffmatk' ");
}
if($user1[name]=="baffmzashita"){
$udata82=$udata82-$user1[kol_sila];
mysql_query("UPDATE `users` SET `udata82`='$udata82' WHERE `udata0`='$log'");
mysql_query("UPDATE `baffs` SET `active`='on' WHERE `login`='$log' AND `name`='baffmzashita' ");
}
}
mysql_query("DELETE FROM `baffs` WHERE `login`='$log' AND `time`<'".time()."' ");
}
////////////////////////////////////////////////////////
$us2 = mysql_query("SELECT * FROM `pitmag` WHERE `login`='$log' AND `active`='on' ");
$user2=mysql_num_rows($us2);
if($user2>0){
while($pit=mysql_fetch_array($us2)){
if($pit[vid]=="petatk"){$pom="Атакующий";}
if($pit[vid]=="petmp"){$pom="Дает Доп. Ману";}
echo"<b>$pit[name]</b> - $pom</br><font color=red>$pit[hp]/$pit[allhp] HP</font></br>";
if($pit[vid]=="petatk"){
echo"<div class="warning s"><font color=blue>$pit[mp]/$pit[allmp] MP</font></div>";
}}
}
echo '<div class="page"><div class="block">';
include_once "files/event.php";
?>