Файл: to_gorod.php
Строк: 15
<?
define('PROTECTOR', 1);
include('files/path.php');
include($path.'files/db.php');
include($path.'files/auth.php');
include($path.'files/func.php');
going();
zasad();
include($path.'files/core.php');
/////////место
$req = mysql_query("SELECT * FROM `mesto` WHERE `usr` = '$log' LIMIT 1");
////////////////////////////
$mestouser = mysql_fetch_array($req);
if($mestouser[city]==1){
/////////место
$req = mysql_query("SELECT incity FROM `world` WHERE `city` = '$udata[city]' and `x`='$mestouser[x]' and `y`='$mestouser[y]' LIMIT 1");
////////////////////////////
$world = mysql_fetch_array($req);
}
if(($mestouser[city]==1 and $world[incity]==1) or $mestouser[city]==2 or $mestouser[city]==3){
mysql_query("UPDATE `mesto` SET `city` = '0' WHERE `usr` = '$log'");
header("Location: gorod.php?");exit;
}else{
ryd();
place_city();
place_okr();
place_zamok();
place_tower();
}
?>