';
print'';
print'
';
if($_GET['warning']=='1'){print" Вы получили 'Гайка' ";}
if($_GET['warning']=='3'){print" Вы получили 'Вентиль' ";}
if($_GET['warning']=='2'){print" Кто-то оказался быстрее! ";}
if($_GET['warning']=='4'){print" Вы подняли ключ №'".$_GET['key']."' ";}
if($_GET['warning']=='5'){print" У вас уже есть ключ №'".$_GET['key']."' ";}
if($_GET['warning']=='6'){print" Вы вытащили 'Гайку' ";}
if($_GET['warning']=='8'){print" Вы вытащили 'Болт' ";}
if($_GET['warning']=='7'){print" Сундук пуст ";}
if($_GET['warning']=='9'){print" Вы получили 'Ключиик' ";}
if($_GET['warning']=='10'){print" Вы получили 'Зелье жизни' ";}
if($_GET['warning']=='11'){print" Вы уже брали зелье! ";}
if($_GET['warning']=='12'){print" Невозможно! Вы далеко! ";}
print' |
';
$sided = mysql_query("select * from `labirint` where `glav_id`='$glav_id'");
while($didd = mysql_fetch_array($sided))
{
//nick($user);
$Loca=$Location;
if($Location<0){$Loca=0;}
if($Location==01){$Loca=1;}
if($Location==02){$Loca=2;}
if($Location==03){$Loca=3;}
if($Location==04){$Loca=4;}
if($Location==05){$Loca=5;}
if($Location==06){$Loca=6;}
if($Location==07){$Loca=7;}
if($Location==08){$Loca=8;}
if($Location==09){$Loca=9;}
if(in_array($_GET['sun'], array('se_gaika'))) {
$ferrr = mysql_query("SELECT n$Loca FROM `podzem3` WHERE glava='$glava'");
$retr = mysql_fetch_array($ferrr);
$stloc = $retr["n$Loca"];
if($stloc=='503' or $stloc=='502' or $stloc=='501'){
if($stloc=='503'){mysql_query("UPDATE `podzem3` SET n$Loca='502' WHERE glava='$glava'");}
if($stloc=='502'){mysql_query("UPDATE `podzem3` SET n$Loca='501' WHERE glava='$glava'");}
if($stloc=='501'){mysql_query("UPDATE `podzem3` SET n$Loca='' WHERE glava='$glava'");}
if($stloc==''){print "";exit;}
$f = mysql_query("SELECT `maxdur` FROM `inventory` WHERE `owner`='".$user['id']."' and `type`='200' and `name`='Гайка' and maxdur<'30'");
if($g = mysql_fetch_array($f)){
$koll = $g["maxdur"];
mysql_query("UPDATE `inventory` SET maxdur=maxdur+1,massa=massa+1,cost=cost+1 WHERE owner='".$user['id']."' and `type`='200' and `name`='Гайка' and maxdur<'30'");
}else{
$fo = mysql_query("INSERT INTO `inventory`(name,duration,maxdur,cost,img,owner,type,massa,isrep,podzem) VALUES('Гайка','0','1','1','g.gif','".$user['id']."','200','1','0','1')");
}
print "";exit;
}}
//////////////////////////////////////////
if(in_array($_GET['sun'], array('se_vintel'))) {
$ferrr = mysql_query("SELECT n$Loca FROM podzem3 WHERE glava='$glava'");
$retr = mysql_fetch_array($ferrr);
$stloc = $retr["n$Loca"];
if($stloc=='504'){
if($stloc=='504'){mysql_query("UPDATE podzem3 SET n$Loca='' WHERE glava='$glava'");}
if($stloc==''){print "";exit;}
$f = mysql_query("SELECT maxdur FROM `inventory` WHERE `owner`='".$user['id']."' and `type`='200' and `name`='Вентиль' and maxdur<'30'");
if($g = mysql_fetch_array($f)){
$koll = $g["maxdur"];
mysql_query("UPDATE `inventory` SET maxdur=maxdur+1,massa=massa+1,cost=cost+1 WHERE owner='".$user['id']."' and `type`='200' and `name`='Вентиль' and maxdur<'30'");
}else{
$fo = mysql_query("INSERT INTO `inventory`(name,duration,maxdur,cost,img,owner,type,massa,isrep,podzem) VALUES('Вентиль','0','1','1','v.gif','".$user['id']."','200','1','0','1')");
}
print "";exit;}}
if(in_array($_GET['sun'], array('se_kluchiik'))) {
$ferrr = mysql_query("SELECT n$Loca FROM podzem3 WHERE glava='$glava'");
$retr = mysql_fetch_array($ferrr);
$stloc = $retr["n$Loca"];
if($stloc=='505'){
if($stloc=='505'){mysql_query("UPDATE podzem3 SET n$Loca='' WHERE glava='$glava'");}
if($stloc==''){print "";exit;}
$fo = mysql_query("INSERT INTO `inventory`(name,duration,maxdur,cost,img,owner,type,massa,isrep,podzem) VALUES('Ключиик','0','1','1','kluchik.gif','".$user['id']."','200','3','0','1')");
print "";exit;}}
if(in_array($_GET['sun'], array('el'))) {
if($el!='1' and $Location==$el){
$fo = mysql_query("INSERT INTO `inventory`(name,duration,maxdur,cost,img,owner,type,massa,isrep,magic,podzem) VALUES('Зелье жизни','0','15','15','food_l8.gif','".$user['id']."','50','1','0','8','1')");
mysql_query("UPDATE `labirint` SET el='1' WHERE `glav_id`='$glav_id' and `login`='$login'");
print "";exit;
}else{
if($el=='1'){print "";exit;}
else{print "";exit;}}
}
if(in_array($_GET['sun'], array('sunduk'))) {
$ferrr = mysql_query("SELECT sunduk".$_GET['sn']." FROM `podzem3` WHERE `glava`='$glava'");
$retr = mysql_fetch_array($ferrr);
$stloc = $retr["sunduk".$_GET['sn'].""];
if($stloc!='' and $Location==$stloc){mysql_query("UPDATE `podzem3` SET sunduk".$_GET['sn']."='' WHERE `glava`='$glava'");}
else{
if($stloc==''){print "";exit;}
else{print "";exit;}}
$f = mysql_query("SELECT `maxdur` FROM `inventory` WHERE `owner`='".$user['id']."' and `type`='200' and `name`='Гайка' and maxdur<'30'");
if($g = mysql_fetch_array($f)){
$koll = $g["maxdur"];
mysql_query("UPDATE `inventory` SET maxdur=maxdur+1,massa=massa+1,cost=cost+1 WHERE owner='".$user['id']."' and `type`='200' and `name`='Гайка' and maxdur<'30'");
}else{
$fo = mysql_query("INSERT INTO `inventory`(name,duration,maxdur,cost,img,owner,type,massa,isrep,podzem) VALUES('Гайка','0','1','1','g.gif','".$user['id']."','200','1','0','1')");
}
print "";exit;}
if(in_array($_GET['sun'], array('key'))) {
$keys = "key".$_GET['sn']."";
$keyd = $r["key".$_GET['sn'].""];
if( $keyd!=1){
if( $keyd == $Location){
mysql_query("UPDATE labirint SET $keys='1' WHERE glav_id='$glav_id'");
print "";exit;}
else{print "";exit;}
}else{print "";exit;}}
if(in_array($_GET['sun'], array('sunduk_b'))) {
$ferrr = mysql_query("SELECT sunduk".$_GET['sn']." FROM podzem3 WHERE glava='$glava'");
$retr = mysql_fetch_array($ferrr);
$stloc = $retr["sunduk".$_GET['sn'].""];
if($stloc!='' and $Location==$stloc){mysql_query("UPDATE podzem3 SET sunduk".$_GET['sn']."='' WHERE glava='$glava'");}
else{
if($stloc==''){print "";exit;}
else{print "";exit;}}
$f = mysql_query("SELECT maxdur FROM `inventory` WHERE `owner`='".$user['id']."' and `type`='200' and `name`='Болт' and maxdur<'30'");
if($g = mysql_fetch_array($f)){
$koll = $g["maxdur"];
mysql_query("UPDATE `inventory` SET maxdur=maxdur+1,massa=massa+1,cost=cost+1 WHERE owner='".$user['id']."' and `type`='200' and `name`='Болт' and maxdur<'30'");
}else{
$fo = mysql_query("INSERT INTO `inventory`(name,duration,maxdur,cost,img,owner,type,massa,isrep,podzem) VALUES('Болт','0','1','1','bolt.gif','".$user['id']."','200','1','0','1')");
}
print "";exit;}
}
print" ";
print"
";
$gags = mysql_query("SELECT * FROM `labirint` WHERE `glav_id`='$glav_id'");
while($ghhg = mysql_fetch_array($gags))
{
$sax = mysql_query("SELECT login,level,hp,maxhp,id FROM `users` WHERE login='".$ghhg['login']."'");
$ber = mysql_fetch_array($sax);
print"
".$ber['login']."[".$ber["level"]."] |
";
echo showProgressBar($ber['hp'],$ber['maxhp']);
print" | ";
if($ber['id'] == $glav_id){
print"";
print"";
print" ";
}
print" |
";
}
print" |
";
print" ";
$gag = mysql_query("SELECT * FROM qwest WHERE login='".$user["login"]."' and status!='ok'");
while($qw = mysql_fetch_array($gag))
{
$name_qwest = $qw["name_items"];
$zadanie = $qw["zadanie"];
$qwesta = mysql_fetch_array(mysql_query("SELECT id FROM `inventory` WHERE `owner`='".$user['id']."' and `type`='200' and `name`='$name_qwest'"));
if($qwesta){$ok_qwest = "1";}else{$ok_qwest = "0";}
print" Задание: $zadanie ($ok_qwest/1)
";
}
if($kill>'0'){print" Кол-во смертей: $kill
";}
include "podzem_res.php";
print' | ';
print'';
print'
';
print"Этаж 1 - Канализация выйти";
print'';
echo" ";
$fer = mysql_query("select * from `labirint` where `glav_id`='$glav_id'");
$s=0;
while($ler = mysql_fetch_array($fer))
{
$s++;
$n_log = $ler["login"];
$n_locat = $ler["location"];
$n_left = $ler["l"];
$n_top = $ler["t"];
echo" ";
}
?> |
|