Файл: l2ps_v5/files/zagdead.php
Строк: 262
<?php
include_once"banzz/banzz.php";
include_once"files/ini.php";
include_once"files/data.php";
include_once"files/lvl.php";
include_once"files/lvlclan.php";
include_once"files/pit.php";
include_once"files/regeneration.php";
include_once"files/gzip.php";
include_once"files/l2pirates_Antihack.php";
//echo'<div class = "up" ></div><div class = "body" ><script src="sneg.js"></script><left><br/>';
//echo"<left>";
include_once"files/themes.php";
include_once"files/opiti.php";
include_once"files/opitpit.php";
/*$pr_q = mysql_query("SELECT * from `config` ");
while($arr = mysql_fetch_array($pr_q)){
$time=time();
$arr[time]=$arr['time']+2592000;
if($time>$arr['time']){
mysql_query("TRUNCATE TABLE battle_log ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE gb ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE gb1 ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE clan_chat ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE msg_r ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE sell ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE l2pirates_hystory ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE viktorina_chat ") or die("Сука не пашет!");
mysql_query("TRUNCATE TABLE zametki ") or die("Сука не пашет!");
$t=time();
mysql_query("UPDATE `config` SET `time`='$t' ");
}}*/
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()."' ");
///////////////////////////////////////////////////////////////////////////////////////////////////////
//Перевод секунд в минуты, часы, дни. Добавил 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 "<u><a href="uslugi.php">$log</a></u> $udata9 Уровень<br>";
$cp = round(100/($udata43/$udata42));
$hp = round(100/($udata17/$udata16));
$mp = round(100/($udata30/$udata29));
echo'<div style="width:auto;margin-top:1px;">
<div style="height:20px;background:#4F4F4F;">
<div style="height:20px;padding-left:10px;float:left;font-size:11px;color:#DCD9DC;">CP '.$udata42.'/'.$udata43.'</div>
<div style="height:20px;'.$cp.'%;background:url(l2pic/logo/cp.png);"></div>
</div></div><div style="width:auto;margin-top:1px;">
<div style="height:20px;background:#4F4F4F;">
<div style="height:20px;padding-left:10px;float:left;font-size:11px;color:#DCD9DC;">HP '.$udata16.'/'.$udata17.'</div>
<div style="height:20px;width:'.$hp.'%;background:url(l2pic/logo/hp.png);"></div>
</div></div><div style="width:auto;margin-top:1px;">
<div style="height:20px;background:#4F4F4F;">
<div style="height:20px;padding-left:10px;float:left;font-size:11px;color:#DCD9DC;">MP '.$udata29.'/'.$udata30.'</div>
<div style="height:20px;width:'.$mp.'%;background:url(l2pic/logo/mp.png);"></div>
</div></div><div style="width:auto;margin-top:1px;">
<div style="height:22px;background:#4F4F4F;">
<div style="height:20px;padding-left:10px;float:left;font-size:11px;color:#DCD9DC;">EXP '.$exp.'%</div>
<div style="height:20px;width:'.$exp.'%;background:url(l2pic/logo/exp.png);"></div>
</div></div><hr>
';
}else{
echo "<u><a href="uslugi.php">$log</a></u> $udata9 Уровень<br><img src='l2pic/energy.gif' alt='pic'/> <u><font color=gold>CP: $udata42/$udata43 </font></u><br/><img src='l2pic/life.png' alt='pic'/> <u><font color=red>HP: $udata16/$udata17 </font></u><br/><img src='l2pic/mana.png' alt='pic'/> <u><font color=blue>MP: $udata29/$udata30</font></u><br/>";
echo"
<img src='l2pic/exp.png' alt='pic'/>$udata9 <font color=#9999CC>($exp%)</font>";
echo'<div style="background:#666666;height:1px;width:100%;padding:0;margin:6px 0;">
<div style="background:#FFDF8C; height:1px; width:'.$exp.'%;"></div></div>';
}
include_once"files/up.php";
include_once"files/achieve.php";
$g=mysql_query("SELECT * FROM `anketa` WHERE `usr`='$log' LIMIT 1");
if(mysql_num_rows($g)==0){
echo "<li><b>Кристина</b> <font color='green'>(Помощник новичков):</font> У вас не создана Анкета!<br/><li><a href="anketa.php">Создать Анкету</a><br><br>";
}
if($udata73=='0'){
echo "<li><b>Кристина</b> <font color='green'>(Помощник новичков):</font> У вас нет секретного слова для восстановления пароля!<br/><li><a href="sekret.php">Создать</a><br><br>";
}
if($udata9<="20"){
if($udata11=="Пусто" or $udata12=="Пусто"){echo"<br><font color=#43CD80>- Пойди в инвентарь и одень оружие, броню и вещи! </font><br><a href="inventar.php?">Одеть вещи</a><br><br>";}
}
////////////////////////////////КАРТИНКИ///////////////////////////////////
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");
}
//////////////////////////////////PK////////////////////////////////////////////
if($udata48=="dead"){
echo'Вы проиграли вас убил игрок - '.$udata49.'<br>В <a href="dead.php?&vibor=gorod">В город</a>';include_once"files/down.php";
$udata16=$udata17;
$udata7=$udata7+1;
mysql_query("UPDATE `users` SET `udata16`='$udata16' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata7`='$udata7' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata49`='' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata48`='' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata37`='' WHERE `udata0`='$log'");
exit;
}
if($udata48=="deadmob"){
echo'Вы проиграли вас убил монстр - '.$udata49.'<br>В <a href="dead.php?&vibor=gorod">В город</a>';include_once"files/down.php";
$udata16=$udata17;
$udata7=$udata7+1;
mysql_query("UPDATE `users` SET `udata16`='$udata16' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata7`='$udata7' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata49`='' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata48`='' WHERE `udata0`='$log'");
mysql_query("UPDATE `users` SET `udata37`='' WHERE `udata0`='$log'");
exit;}
/////////////////////БЛОК/////////////////////////////////
$t=time();
$req = mysql_query("SELECT * FROM `ban` WHERE `usr` = '$log' LIMIT 1");
// //////////////////////////
$avto = mysql_num_rows($req);
if ($avto == 1) {
$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] часов";
}
include('files/down.php');exit;
}
}
///////////////////// Закрытие ИГРЫ //////////////////////////
$switch = @file("local/game/switch.dat");
$swi = explode("||", $switch[0]);
$switchdetail = $swi[0];
$switchdate = $swi[1];
$u = explode(".",$login);
if ($switch!==false && $log!=="Bopo6eu" && $log!=="TheEvil") {
echo "<b>Игра временно закрыта</b><br />";
echo'Причина: '.$switchdetail.'<br />Дата закрытия: '.$switchdate.'<br/><a href="exit.php">выход</a><br />';
include_once "files/down.php";
exit;}
////////////////////////////////КЛАНЫ///////////////////////////////////
$clan=mysql_query("SELECT * FROM `tmp_clan` WHERE `user`='$log' LIMIT 1");
if(mysql_num_rows($clan)==1){
$cl= mysql_fetch_array($clan);
echo"Лидер клана $cl[glava] предлагает вступить в клан $cl[clan]. Вы согласны?<br/><a href="clan.php?go=ok">Да</a> | <a href="clan.php?go=del">Нет</a><br/><br/>";
}
$alliance=mysql_query("SELECT * FROM `tmp_alliance` WHERE `user`='$log' LIMIT 1");
if(mysql_num_rows($alliance)==1){
$al= mysql_fetch_array($alliance);
echo"Лидер альянса $al[glava] предлагает вступить в альянс $al[alliance]. Вы согласны?<br/><a href="alliance.php?action=ok">Да</a> | <a href="alliance.php?action=del">Нет</a><br/><br/>";
}
$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"Вы продаёте вещи<br><a href="sellcoin.php?">Вернуться</a><br/>";
include_once "files/down.php";
exit;
}
////////////////////////////////////////////////////////
list($msec,$sec)=explode(chr(32),microtime());
$gtime=$sec+$msec;
////////////////////////////////Арена////////////////////////////////////
$us1 = mysql_query("SELECT * FROM `arena` WHERE `login`='$log' LIMIT 1 ");
$user1=mysql_num_rows($us1);
if($user1==1){ echo"Вы находитесь на арене, вы неможете выйти! <a href="arena.php?">Вернуться</a>."; include 'files/down.php'; exit;}
////////////////////////////////////////////////////////
include_once "files/buff.php";
/////////////////////////////////////////////////////////
$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=round($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=round($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=round($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=round($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=round($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=round($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=round($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()."' ");
}
/////////////////////////////////////////////////
$g=mysql_query("select * from `ufus` WHERE `log`='$log' LIMIT 1 ");
$event=mysql_num_rows($g);
$g1=mysql_query("select * from `ufus` LIMIT 1 ");
$event1=mysql_num_rows($g1);
if($event==0 and $event1==1){
include_once "files/event.php";}
mysql_query("DELETE FROM `stanmob` WHERE `time`<'".time()."' ");
mysql_query("DELETE FROM `stan` WHERE `time`<'".time()."' ");
mysql_query("DELETE FROM `yadusers` WHERE `time`<'".time()."' ");
?>