Вход Регистрация
Файл: location.php
Строк: 502
<?php
include 'inc/mysql.php';
include 
'inc/check.php';
if(isset(
$_SESSION['auth']) && $_SESSION['auth']==1){
include 
'inc/shapka.php';

if(
$account[effekt_8]==1){
$mp2=2;
}else{
$mp2=1;
}

$mp=$account[lvl]*2/$mp2// Это расход активности за ход

if($account[patrul]=="on"){
echo
'<div class="text">';
echo
"<img src="pic/main/!.png"> Вы сейчас в патруле.</div>";
}else{
if(
$account[shakta]=="on"){
echo
'<div class="text">';
echo
"<img src="pic/main/!.png"> Вы сейчас в шахте.</div>";
}else{
if(
$account[ozero]=="on"){
echo
'<div class="text">';
echo
"<img src="pic/main/!.png"> Вы сейчас на озере.</div>";
}else{

if(
$account['patrul2']=="on"){
echo
'<div class="text">';
echo
"<img src="pic/main/!.png"> Вы сейчас на поле падших.</div>";
}else{

if ((
'chat_clear') && isset($_GET['act']) && $_GET['act']=='exit'){
if(
$account[les]=="1"){
mysql_query("UPDATE `account` SET `les`= '0' WHERE `id`='$account[id]'");
header ("Location: home.php"); exit;
}else{
header ("Location: home.php"); exit;
}}

if(
$account[les]=="0"){
mysql_query("UPDATE `account` SET `les`= '1' WHERE `id`='$account[id]'");
header ("Location: location.php"); exit;
}

$location=mysql_fetch_array(mysql_query("SELECT * FROM `location` WHERE `y`='".$account['y']."' AND `x`='".$account['x']."'"));

if (isset(
$_GET['x1']) && isset($_GET['y1']) && is_numeric($_GET['x1']) && is_numeric($_GET['y1'])){

if(
$account[mp]<$mp){
header ("Location: location.php?act=mp"); exit;
}


        
$x1=intval($_GET['x1']);
        
$y1=intval($_GET['y1']);


if (!isset(
$mob) && !isset($npc)){
            if (
$account['x1']+1==$x1 && $account['y1']==$y1){

if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){

    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");



    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}



                }


                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['x1']-1==$x1 && $account['y1']==$y1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");



    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}


                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['y1']+1==$y1 && $account['x1']==$x1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");




    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}
                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['y1']-1==$y1 && $account['x1']==$x1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");




    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}

                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['y1']+1==$y1 && $account['x1']+1==$x1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");





    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}

                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['y1']+1==$y1 && $account['x1']-1==$x1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");



    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}

                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['y1']-1==$y1 && $account['x1']-1==$x1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");




    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}


                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }elseif (
$account['y1']-1==$y1 && $account['x1']+1==$x1){
                if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$account['x']."' AND `y`='".$account['y']."' AND `x1`='".$x1."' AND `y1`='".$y1."' AND `notgo`='1'"),0)){
                    
mysql_query("UPDATE `account` SET `x1`='".$x1."',`y1`='".$y1."',`mp`=`mp` - '$mp' WHERE `id`='".$account['id']."'");



    
$sublocation=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$account[x1]."' AND `y1`='".$account[y1]."' AND `x`='".$location['x']."' AND `y`='".$location['y']."' "));
$rangkr=rand(1,100);
$rangkrs=rand(1,$sublocation[shans]);
if(
$rangkr<=$rangkrs){
mysql_query("UPDATE `account` SET `yabloko`= `yabloko`+'1',`yabl`='1' WHERE `id`='$account[id]'");
}


                }
                if (
mysql_result(mysql_query("SELECT `x_tp` FROM `sublocation` WHERE 
                    `x`='"
.$account['x']."' 
                    AND `y`='"
.$account['y']."' 
                    AND `x1`='"
.$x1."' 
                    AND `y1`='"
.$y1."'"),0)){
                
$loctp=mysql_fetch_assoc(mysql_query("SELECT * FROM `sublocation` WHERE 
                `x`='"
.$account['x']."' 
                AND `y`='"
.$account['y']."' 
                AND `x1`='"
.$x1."' 
                AND `y1`='"
.$y1."'"));
                
mysql_query("UPDATE `account` SET 
        `mp`=`mp` - '
$mp',
                `x`='"
.$loctp['x_tp']."',
                `y`='"
.$loctp['y_tp']."',
                `x1`='"
.$loctp['x1_tp']."',
                `y1`='"
.$loctp['y1_tp']."'
                WHERE 
                `id`='"
.$account['id']."'
                "
);
                }
                
header("Location: ?");
                exit;
            }    
        }
    }

    
$account['x1']=mysql_result(mysql_query("SELECT `x1` FROM `account` WHERE `id`='".$account['id']."'"),0);
    
$account['y1']=mysql_result(mysql_query("SELECT `y1` FROM `account` WHERE `id`='".$account['id']."'"),0);

echo 
'<div class="menudiv">'.$location[name].'</div>';
echo 
'<div class="text">';
echo 
"У вас $account[yabloko] шт. <img width='20' height='20' src='/pic/main/food.png' alt='*'/> яблок<br />
 1 шаг = <img width='16' height='16' src='/pic/main/mp.png' alt='*'/> "
.number_format ($mp)." активности<br />";

if ((
'chat_clear') && isset($_GET['act']) && $_GET['act']=='mp')
{
echo
"<center><img src="pic/index/!.png"> <font color=00CC00>У тебя мало <img src="pic/main/mp.png"> активности для хождения по лесу.</font></center><div class='separ2'></div>";
}

if(
$account[yabl]==1){

if(
$accz[zadanie]==1){
if(
$accz[zadanue7]<10)
{
mysql_query("UPDATE `zadanuya` SET `zadanue7`=`zadanue7`+'1' WHERE `account`='$account[id]'");
}
}

$ops=rand(10,100);
echo 
"<center><img src='/pic/main/clas.png' alt='*'/> <font color=00CC00>Вы нашли 1 <img width='20' height='20' src='/pic/main/food.png' alt='*'/> яблоко, +$ops <img width='20' height='20' src='/pic/main/xp.png' alt='*'/>  опыта.</font></center><div class='separ2'></div>";
mysql_query("UPDATE `account` SET `yabl`= '0',`exp`= `exp` + '$ops' WHERE `id`='$account[id]'");
}


echo 
'<center><div style="background:url(pic/les/location/locs/'.$location['img'].'.png);width:200px;height:200px;">';
echo 
'<table width="100%" height="100%><tr height="16px"></center>';
$x1=1;
$y1=1;
for(
$i=0;$i<100;$i++){
    if (
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x1`='".$x1."' AND `y1`='".$y1."' AND `x`='".$location['x']."' AND `y`='".$location['y']."'"),0)){
        
$sublocation=mysql_fetch_array(mysql_query("SELECT * FROM `sublocation` WHERE `x1`='".$x1."' AND `y1`='".$y1."' AND `x`='".$location['x']."' AND `y`='".$location['y']."'"));
        
$title=$sublocation['name'];
        
$class=NULL;
        
$style=NULL;


        if (
$account['x1']==$x1 && $account['y1']==$y1){
            
$title='Вы';
            
$style="max-width:16px; max-height:16px; background:url(pic/main/$account[sex].png) no-repeat center;";
            
$class=$account['class'];
        }
        echo 
'<td width="16px" style="/*border:0px solid black;*/ padding:0px;margin:0px; '.$style.'" title="'.$title.'">';
        if (!isset(
$mob) && !isset($npc)){
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".($account['x1']+1)."' AND `y1`='".$account['y1']."' AND `notgo`='1'"),0)){//Перемещение вправо
                //влево
                
if ($account['x1']+1==$x1 && $account['y1']==$y1)echo '<a style="border:1px solid green;" href="?x1='.($account['x1']+1).'&y1='.$account['y1'].'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".($account['x1']-1)."' AND `y1`='".$account['y1']."' AND `notgo`='1'"),0)){//Перемещение влево
                //вправо
                
if ($account['x1']-1==$x1 && $account['y1']==$y1)echo '<a style="border:1px solid green;" href="?x1='.($account['x1']-1).'&y1='.$account['y1'].'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".$account['x1']."' AND `y1`='".($account['y1']+1)."' AND `notgo`='1'"),0)){//Перемещение вниз
                //вниз
                
if ($account['y1']+1==$y1 && $account['x1']==$x1)echo '<a style="border:1px solid green;" href="?x1='.$account['x1'].'&y1='.($account['y1']+1).'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".$account['x1']."' AND `y1`='".($account['y1']-1)."' AND `notgo`='1'"),0)){//Перемещение вверх
                //вверх
                
if ($account['y1']-1==$y1 && $account['x1']==$x1)echo '<a style="border:1px solid green;" href="?x1='.$account['x1'].'&y1='.($account['y1']-1).'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".($account['x1']+1)."' AND `y1`='".($account['y1']+1)."' AND `notgo`='1'"),0)){//Перемещение вверх
                //вниз вправо
                
if ($account['y1']+1==$y1 && $account['x1']+1==$x1)echo '<a style="border:1px solid green;" href="?x1='.($account['x1']+1).'&y1='.($account['y1']+1).'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".($account['x1']-1)."' AND `y1`='".($account['y1']+1)."' AND `notgo`='1'"),0)){//Перемещение вверх
                //вниз влево
                
if ($account['y1']+1==$y1 && $account['x1']-1==$x1)echo '<a style="border:1px solid green;" href="?x1='.($account['x1']-1).'&y1='.($account['y1']+1).'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".($account['x1']+1)."' AND `y1`='".($account['y1']-1)."' AND `notgo`='1'"),0)){//Перемещение вверх
                //вверх вправо
                
if ($account['y1']-1==$y1 && $account['x1']+1==$x1)echo '<a style="border:1px solid green;" href="?x1='.($account['x1']+1).'&y1='.($account['y1']-1).'"><img src="/pic/les/lochref.png"></a>';
            }
            if(
mysql_result(mysql_query("SELECT COUNT(*) FROM `sublocation` WHERE `x`='".$location['x']."' AND `y`='".$location['y']."' AND `x1`='".($account['x1']-1)."' AND `y1`='".($account['y1']-1)."' AND `notgo`='1'"),0)){//Перемещение вверх
                //вверх влево
                
if ($account['y1']-1==$y1 && $account['x1']-1==$x1)echo '<a style="border:1px solid green;" href="?x1='.($account['x1']-1).'&y1='.($account['y1']-1).'"><img src="/pic/les/lochref.png"></a>';
            }
        }
        echo 
'</td>';
        
$x1++;
    }else{
        
//echo '<td width="16px" height="20px" style="border:1px solid red;margin:0px;padding:0px; padding:0px;margin:0px;" title="'.$x1.'">'.$y1.'</td>';
        
echo '<td width="16px" style="/*border:1px solid red;*/ padding:0px;margin:0px;" title="'.$location['name'].'"></td>';
        
$x1++;
    }
    if (
$i==9){
        
$y1=$y1+1;
        
$x1=1;
        echo 
'</tr><tr height="18px">';
    }elseif(
$i==19){
        
$y1=$y1+1;
        
$x1=1;
        echo 
'</tr><tr height="18px">';
    }elseif(
$i==29){
        echo 
'</tr><tr height="18px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==39){
        echo 
'</tr><tr height="18px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==49){
        echo 
'</tr><tr height="18px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==59){
        echo 
'</tr><tr height="18px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==69){
        echo 
'</tr><tr height="18px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==79){
        echo 
'</tr><tr height="18px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==89){
        echo 
'</tr><tr height="17px">';
        
$y1=$y1+1;
        
$x1=1;
    }elseif(
$i==100){
        echo 
'</tr>';
        
$y1=$y1+1;
        
$x1=1;
    }


}
echo 
'</table>';
echo 
'</div>';
echo 
'</div><br />';
echo 
'<center>';
echo
'<a href="hajena.php?" class="menu_j"><img src="pic/main/hajena.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Хижина лесника</a>';
if(
$account[les]=="1"){
echo
'<a href="location.php?act=exit" class="menu_j"><img src="pic/main/les.png" alt="" style="border:1px solid #131313;border-radius:2px;height:16px;width:16px"/> Покинуть лес</a>';
}
}}}}
}else{
header ("Location: index.php"); exit;
}
include 
'inc/nogi.php';
?>
Онлайн: 0
Реклама