Файл: game.php
Строк: 187
<?
define('PROTECTOR', 1);
$textl='Главная';
include('files/db.php');
include($path.'files/auth.php');
if ($user_id==0){
header('location: index.php');exit;
}
include($path.'files/core.php');
include($path.'tav1.php');
include($path.'tav_s_complete.php');
if(isset($_GET['vhod']))
{
$id=mysql_real_escape_string($_GET['vhod']);
$labir=mysql_query("SELECT * FROM `labir` WHERE `id`='".$id."'");
$num=mysql_num_rows($labir);
if($num!=0)
{
$lab=mysql_fetch_array($labir);
$nums=mysql_num_rows(mysql_query("SELECT * FROM `labir_usr_blok` WHERE `usr`='".$udata['id']."' and `labir`='".$lab['id']."'"));
if($nums==0)
{
if($udata['lvl']>=$lab['lvl'])
{
if($udata['jet']>=$lab['v_iss'] and $udata['token']>=$lab['v_lazyr'])
{
$iss=$udata['jet']-$lab['v_iss'];
$lazyr=$udata['token']-$lab['v_lazyr'];
mysql_query("UPDATE `users` SET `jet`='".$iss."', `token`='".$lazyr."' WHERE `id`='".$udata['id']."'");
mysql_query("INSERT INTO `labir_usr` SET
`id`='',
`usr`='".$udata['id']."',
`tip`='usr',
`hp`='".$st['hp']."',
`arm`='".$st['arm']."',
`sila`='".$st['sila']."',
`x`='1',
`y`='1',
`labir`='".$lab['id']."',
`boss`='1'
");
$tr=mysql_query("SELECT * FROM `pit` WHERE `usr`='".$udata['id']."' and `status`='1'");
$num=mysql_num_rows($tr);
if($num!=0)
{
$t=mysql_fetch_array($tr);
$kn=mysql_num_rows(mysql_query("SELECT * FROM `item` WHERE `tip`='knyt' and `usr`='".$udata['id']."' and `status`='on'"));
if($kn!=0)
{
$t['hp']=round($t['hp']+$t['hp']/100*15);
$t['sila']=round($t['sila']+$t['sila']/100*15);
$t['arm']=round($t['arm']+$t['arm']/100*15);
}
$kn2=mysql_num_rows(mysql_query("SELECT * FROM `item` WHERE `tip`='knyt2' and `usr`='".$udata['id']."' and `status`='on'"));
if($kn2!=0)
{
$t['hp']=round($t['hp']+$t['hp']/100*30);
$t['sila']=round($t['sila']+$t['sila']/100*30);
$t['arm']=round($t['arm']+$t['arm']/100*30);
}
mysql_query("INSERT INTO `labir_usr` SET
`id`='',
`usr`='".$udata['id']."',
`tip`='pit',
`pit`='".$t['id']."',
`hp`='".$t['hp']."',
`arm`='".$t['arm']."',
`sila`='".$t['sila']."'
");
}
$lok=mysql_query("SELECT * FROM `labir_loc` WHERE `labir`='".$lab['id']."'");
while($lk=mysql_fetch_array($lok))
{
mysql_query("INSERT INTO `labir_loc_usr` SET
`id`='',
`labir`='".$lab['id']."',
`usr`='".$udata['id']."',
`x`='".$lk['x']."',
`y`='".$lk['y']."',
`name`='".$lk['name']."',
`status`='1'
");
}
}
}
}
}
header('location: b_oh.php');exit;
}
include($path.'files/head.php');
include($path.'files/zag.php');
if($udata['lvl']<10)
{
echo '<a href=?novice><div class="m brs bls bbs bts p novic">
<font color=#ff2222>Помощь новичку</font></div></a>';
}
$chq=mysql_query("SELECT * FROM `forum_top` WHERE `cat`='1' ORDER BY `pri` DESC, `time` DESC LIMIT 1");
while($chatq=mysql_fetch_array($chq))
{
echo '<div class="m line p bbs brs bls bts"><img src=img/main/e30.png> Последняя новость:
<a href=forum_top.php?top='.$chatq['id'].'> <font color=#00ff99><b>'.$chatq['name'].'</b></font></a>
</div>';
}
echo '<div class="game_page m bts bbs brs bls">';
echo '<div class="line bts brs bbs bls p">';
if($udata['rasa']==1 and $udata['lvl']<16)
{echo 'Вульенс';$t=3;}
if($udata['rasa']==1 and $udata['lvl']>15 and $udata['lvl']<31)
{echo 'Инарс';$t=4;}
if($udata['rasa']==2 and $udata['lvl']<16)
{echo 'Ланитин';$t=1;}
if($udata['rasa']==2 and $udata['lvl']>15 and $udata['lvl']<31)
{echo 'Делойт';$t=2;}
if($udata['lvl']>30 and $udata['lvl']<39)
{echo 'Алкария';$t=5;}
if($udata['lvl']>38 and $udata['lvl']<=49)
{echo 'Сидония';$t=6;}
if($udata['lvl']>50 and $udata['lvl']<=60)
{echo 'Императорские Земли';$t=6;}
echo '</div><div class="p">';
if(isset($_GET['prikl']))
{
include('prikl.php');
}
elseif(isset($_GET['okrest']))
{
include('okr.php');
}
elseif(isset($_GET['labir']))
{
include('labir.php');
}
elseif(isset($_GET['torg']))
{
include('torg.php');
}
elseif(isset($_GET['novice']))
{
include('novice.php');
}
else
{
echo '<table width=100%>';
echo '<tr>';
echo '<td width=20% style="vertical-align: top">';
/*
echo '<a href=sob.php>
<div align=center style="margin: 3px">
<img src=style/menu/fond.png>
</div>
<div style="background: #222222; opacity: 0.9; margin-top:-10px" align=center>Прощай Лето</div>
</a>';
*/
echo '<a href=bonus.php>
<div align=center style="margin: 3px">
<img src=style/menu/loter.png>
</div>
<div style="background: #222222; opacity: 0.9; margin-top:-10px" align=center>Бонус</div>
</a>';
echo '<a href=vip.php>
<div align=center style="margin: 3px">
<img src=style/menu/vip.png>
</div>
<div style="background: #222222; opacity: 0.9; margin-top:-10px" align=center>VIP</div>
</a>';
echo '<a href=donat.php>
<div align=center style="margin: 3px">
<img src=style/menu/pay.png>
</div>
<div style="background: #222222; opacity: 0.9; margin-top:-10px" align=center>Купить Жемчуг</div>
</a>';
echo '<a href=zvezd.php>
<div align=center style="margin: 3px">
<img src=style/menu/kraft.png>
</div>
<div style="background: #222222; opacity: 0.9; margin-top:-10px" align=center>Камни Звезд</div>
</a>';
/*
*/
echo '</td>';
echo '<td width=40%>';
echo '</td>';
echo '<td width=40%>';
echo '<a href=?prikl>
<div class="brs bts bls bbs m page_input" style="padding: 10px 3px 10px 3px;" align=center>
<img src=style/menu/prikl.png><br>
Приключения
</div>
</a>';
$item_bazar=mysql_num_rows(mysql_query("SELECT * FROM `bazar`"));
$res_bazar = mysql_num_rows(mysql_query("SELECT * FROM bazar_res"));
echo '<a href=?torg>
<div class="brs bts bls bbs m page_input" style="padding: 10px 3px 10px 3px;" align=center>
<img src=style/menu/torg.png><br>
Торговля ';
if($item_bazar>0){echo '<font color=#f22>+'.$item_bazar.'</font>';}
if($res_bazar>0){echo '<font color=#f90>+'.$res_bazar.'</font>';}
echo'</div>
</a>';
echo '<a href=taverna.php>
<div class="brs bts bls bbs m page_input" style="padding: 10px 3px 10px 3px;" align=center>
<img src=style/menu/taverna.png><br>
Таверна
</div>
</a>';
if($udata['lvl']>=5)
{
echo '<a href=work.php>
<div class="brs bts bls bbs m page_input" style="padding: 10px 3px 10px 3px;" align=center>
<img src=style/menu/work.png><br>
Работа
</div>
</a>';
}
else
{
echo '<div class="brs bts bls bbs m page_input_close" style="padding: 10px 3px 10px 3px; opacity: 0.8" align=center>
<img src=style/menu/work.png><br>
С 5 уровня
</div>
';
}
if($udata['lvl']>=20)
{
echo '<a href=clan.php>
<div class="brs bts bls bbs m page_input" style="padding: 10px 3px 10px 3px;" align=center>
<img src=style/menu/clan.png><br>
Гильдия
</div>
</a>';
}
else
{
echo '<div class="brs bts bls bbs m page_input_close" style="padding: 10px 3px 10px 3px; opacity: 0.8" align=center>
<img src=style/menu/clan.png><br>
С 20 уровня
</div>
';
}
echo '<a href=talk.php>
<div class="brs bts bls bbs m page_input" style="padding: 10px 3px 10px 3px;" align=center>
<img src=style/menu/talk.png><br>
Общение
</div>
</a>';
echo '</td>';
echo '</tr>';
echo '</table>';
}
echo '</div></div>';
include('files/down.php');
?>