Файл: vk.com_vhllam/games_xhata/sims/city_in.php
Строк: 58
<?php
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/adm_check.php';
include_once '../../sys/inc/user.php';
$set['title']='The Sims';
include_once '../../sys/inc/thead.php';
title();
err();
aut();
if(!isset($user)){
echo 'Вы неавторизованы';
include_once '../../sys/inc/tfoot.php';
exit;
}
include_once 'inc/start.php';
include_once 'inc/Sims.class.php';
if(mysql_result(mysql_query("SELECT `city_id` FROM `sims_user` WHERE `id_u`='".$user_id."'"),0)==0)
{
$id = abs(intval($_GET['id']));
$c = mysql_result(mysql_query("SELECT COUNT(*) FROM `sims_city` WHERE `id`='".$id."'"),0);
if($c == 0)
echo 'Ошибка! Такого города нет';
else
{
$city = mysql_query("SELECT * FROM `sims_city` WHERE `id`='".$id."'");
$arr = mysql_fetch_array($city);
if(isset($_GET['in']))
{
mysql_query("UPDATE `sims_user` SET `city_id`='".$arr['id']."' WHERE `id_u`='".$user_id."'");
mysql_query("UPDATE `sims_city` SET `ex_house`=`ex_house`+1 WHERE `id`='".$id."'");
header("Location:house.php");
exit;
}
echo "<div class='".$diz['post_1']."'><img src='i/".$arr['image']."' /><br/><b>".$arr['name']."</b><br/>
Занято домов : ".$arr['ex_house']."
<br/>
".$arr['description']."
<br/>
» <a href='city_in.php?id=".$id."&in'>Поселиться</a>
</div>";
}
}
else
echo "Ошибка!";
sims_ret($diz['ret'],'Назад','index.php');
include_once '../../sys/inc/tfoot.php';
?>