654 lines
27 KiB
PHP
654 lines
27 KiB
PHP
<?php
|
||
session_start();
|
||
if ($_SESSION['uid'] == null) header("Location: index.php");
|
||
include "config.php";
|
||
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||
$digger = mysql_fetch_array(mysql_query("SELECT * FROM `digger` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
|
||
include "functions.php";
|
||
$tm=time();
|
||
if ($user['battle'] != 0) { header('location: fbattle.php'); die(); }
|
||
if ($user['in_tower'] == 1) { header('Location: towerin.php'); die(); }
|
||
if ($user['zayavka'] != 0) { die(); }
|
||
|
||
/**/
|
||
$ch_raw=mysql_fetch_array(mysql_query("SELECT * FROM `cit_haos_status` WHERE `id`='{$user['id']}' LIMIT 1;"));
|
||
if($ch_raw["status"]>0 && $ch_raw["status"]<5 ) { header('location: c_haos_in.php'); die(); }
|
||
|
||
$dig_raw=mysql_fetch_array(mysql_query("SELECT * FROM `digger` WHERE `id`='{$user['id']}' LIMIT 1;"));
|
||
if($dig_raw["finish_dig"]>$tm || $dig_raw["finish_guard"]>$tm) { header('location: wall_build.php'); die(); }
|
||
|
||
header("Cache-Control: no-cache");
|
||
|
||
$d = mysql_fetch_array(mysql_query("SELECT sum(`massa`) FROM `inventory` WHERE `owner` = '{$user['id']}' AND `dressed` = 0 AND `setsale` = 0 ; "));
|
||
if($d[0] > get_meshok() && $_GET['got']) {
|
||
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигатся...</b></font>";
|
||
$_GET['got'] =0;
|
||
}
|
||
$entangle = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` = 10;"));
|
||
if($entangle[0]>0 && $_GET['got']) {
|
||
echo "<font color=red><b>Вы парализованы и не можете передвигатся...</b></font>";
|
||
$_GET['got'] =0;
|
||
}
|
||
$eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13);"));
|
||
if($eff[0] && $_GET['got']) {
|
||
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
|
||
$_GET['got'] =0;
|
||
}
|
||
|
||
if($d[0] > get_meshok() && $_GET['strah']) {
|
||
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигатся...</b></font>";
|
||
$_GET['strah'] =0;
|
||
}
|
||
$entangle = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` = 10;"));
|
||
if($entangle[0]>0 && $_GET['strah']) {
|
||
echo "<font color=red><b>Вы парализованы и не можете передвигатся...</b></font>";
|
||
$_GET['strah'] =0;
|
||
}
|
||
$eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13);"));
|
||
if($eff && $_GET['strah']) {
|
||
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
|
||
$_GET['strah'] =0;
|
||
}
|
||
|
||
if ($_GET['strah']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '21',`online`.`room` = '21' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
?>
|
||
<HTML><HEAD><link rel=stylesheet type="text/css" href="css/main.css"><meta content="text/html; charset=utf-8" http-equiv=Content-type><META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store"><meta http-equiv=PRAGMA content=NO-CACHE><META Http-Equiv=Expires Content=0></HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
||
<?php
|
||
die("
|
||
<script>
|
||
function cityg(){
|
||
location.href='city.php';
|
||
}
|
||
setTimeout('cityg()', 5000);
|
||
</script>
|
||
<center><BR><BR><img src='i/ajax-loader.gif'><BR>
|
||
<i>Переход на Торговую улицу...</i>
|
||
</center>
|
||
");
|
||
}
|
||
|
||
if($d[0] > get_meshok() && $_GET['cp']) {
|
||
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигатся...</b></font>";
|
||
$_GET['cp'] =0;
|
||
}
|
||
$entangle = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` = 10;"));
|
||
if($entangle[0]>0 && $_GET['cp']) {
|
||
echo "<font color=red><b>Вы парализованы и не можете передвигатся...</b></font>";
|
||
$_GET['cp'] =0;
|
||
}
|
||
$eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13);"));
|
||
if($eff && $_GET['cp']) {
|
||
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
|
||
$_GET['cp'] =0;
|
||
}
|
||
|
||
|
||
if ($_GET['cp']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '20',`online`.`room` = '20' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
?>
|
||
<HTML><HEAD><link rel=stylesheet type="text/css" href="css/main.css"><meta content="text/html; charset=utf-8" http-equiv=Content-type><META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store"><meta http-equiv=PRAGMA content=NO-CACHE><META Http-Equiv=Expires Content=0></HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
||
<?php
|
||
die("
|
||
<script>
|
||
function cityg(){
|
||
location.href='city.php';
|
||
}
|
||
setTimeout('cityg()', 5000);
|
||
</script>
|
||
<center><BR><BR><img src='i/ajax-loader.gif'><BR>
|
||
<i>Переход на Главную площадь...</i>
|
||
</center>
|
||
");
|
||
}
|
||
|
||
if($d[0] > get_meshok() && $_GET['bps']) {
|
||
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигатся...</b></font>";
|
||
$_GET['bps'] =0;
|
||
}
|
||
$entangle = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` = 10;"));
|
||
if($entangle[0]>0 && $_GET['bps']) {
|
||
echo "<font color=red><b>Вы парализованы и не можете передвигатся...</b></font>";
|
||
$_GET['bps'] =0;
|
||
}
|
||
$eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13);"));
|
||
if($eff && $_GET['bps']) {
|
||
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
|
||
$_GET['bps'] =0;
|
||
}
|
||
|
||
|
||
|
||
if ($_GET['bps']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '26',`online`.`room` = '26' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
?>
|
||
<HTML><HEAD><link rel=stylesheet type="text/css" href="css/main.css"><meta content="text/html; charset=utf-8" http-equiv=Content-type><META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store"><meta http-equiv=PRAGMA content=NO-CACHE><META Http-Equiv=Expires Content=0></HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
||
<?php
|
||
die("
|
||
<script>
|
||
function cityg(){
|
||
location.href='city.php';
|
||
}
|
||
setTimeout('cityg()', 5000);
|
||
</script>
|
||
<center><BR><BR><img src='i/ajax-loader.gif'><BR>
|
||
<i>Переход на Замковую улицу...</i>
|
||
</center>
|
||
");
|
||
}
|
||
|
||
//Парковая Улица
|
||
if($d[0] > get_meshok() && $_GET['ps']) {
|
||
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигатся...</b></font>";
|
||
$_GET['ps'] =0;
|
||
}
|
||
$entangle = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` = 10;"));
|
||
if($entangle[0]>0 && $_GET['ps']) {
|
||
echo "<font color=red><b>Вы парализованы и не можете передвигатся...</b></font>";
|
||
$_GET['ps'] =0;
|
||
}
|
||
$eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13);"));
|
||
if($eff && $_GET['ps']) {
|
||
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
|
||
$_GET['ps'] =0;
|
||
}
|
||
|
||
|
||
|
||
if ($_GET['ps']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '51',`online`.`room` = '51' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
|
||
|
||
?>
|
||
<HTML><HEAD><link rel=stylesheet type="text/css" href="css/main.css"><meta content="text/html; charset=utf-8" http-equiv=Content-type><META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store"><meta http-equiv=PRAGMA content=NO-CACHE><META Http-Equiv=Expires Content=0></HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
||
<?php
|
||
die("
|
||
<script>
|
||
function cityg(){
|
||
location.href='city.php';
|
||
}
|
||
setTimeout('cityg()', 5000);
|
||
</script>
|
||
<center><BR><BR><img src='i/ajax-loader.gif'><BR>
|
||
<i>Переход на Парковую улицу...</i>
|
||
</center>
|
||
");
|
||
}
|
||
//Квартал Законников
|
||
if($d[0] > get_meshok() && $_GET['kz']) {
|
||
echo "<font color=red><b>У вас переполнен рюкзак, вы не можете передвигатся...</b></font>";
|
||
$_GET['kz'] =0;
|
||
}
|
||
$entangle = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND `type` = 10;"));
|
||
if($entangle[0]>0 && $_GET['kz']) {
|
||
echo "<font color=red><b>Вы парализованы и не можете передвигатся...</b></font>";
|
||
$_GET['kz'] =0;
|
||
}
|
||
$eff = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$user['id']."' AND (`type` = 14 OR `type` = 13);"));
|
||
if($eff && $_GET['kz']) {
|
||
echo "<font color=red><b>У вас тяжелая травма, вы не можете передвигатся...</b></font>";
|
||
$_GET['kz'] =0;
|
||
}
|
||
|
||
|
||
|
||
if ($_GET['kz']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '52',`online`.`room` = '52' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
?>
|
||
<HTML><HEAD><link rel=stylesheet type="text/css" href="css/main.css"><meta content="text/html; charset=utf-8" http-equiv=Content-type><META Http-Equiv=Cache-Control Content="no-cache, max-age=0, must-revalidate, no-store"><meta http-equiv=PRAGMA content=NO-CACHE><META Http-Equiv=Expires Content=0></HEAD><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#d4d4d4>
|
||
<?php
|
||
die("
|
||
<script>
|
||
function cityg(){
|
||
location.href='city.php';
|
||
}
|
||
setTimeout('cityg()', 5000);
|
||
</script>
|
||
<center><BR><BR><img src='i/ajax-loader.gif'><BR>
|
||
<i>Переход в Квартал Законников...</i>
|
||
</center>
|
||
");
|
||
}
|
||
// просчитываем на улицах
|
||
if ($user['room']==20) {
|
||
// CP
|
||
// BK
|
||
if ($_GET['got'] && $_GET['level1']) {
|
||
//if ($user['level'] > 0) { $room = 8; } else { $room = 1; }
|
||
//mysql_query("UPDATE `users`,`online` SET `users`.`room` = '{$room}',`online`.`room` = '{$room}' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: main.php?setch=1');
|
||
die();
|
||
}
|
||
// Центральная площадь
|
||
if ($_GET['got'] && $_GET['level7']) {
|
||
header('location: city.php?strah=1');
|
||
}
|
||
if ($_GET['got'] && $_GET['level8']) {
|
||
header('location: city.php?bps=1');
|
||
}
|
||
|
||
// shop
|
||
if ($_GET['got'] && $_GET['level2']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '22',`online`.`room` = '22' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: shop.php');
|
||
}
|
||
// repait
|
||
if ($_GET['got'] && $_GET['level4']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '23',`online`.`room` = '23' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: repair.php');
|
||
}
|
||
if ($_GET['got'] && $_GET['level11']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '42',`online`.`room` = '42' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: lotery.php');
|
||
}
|
||
|
||
if ($_GET['got'] && $_GET['level9']) {
|
||
if ($user['align'] == 4) {
|
||
print "<script>alert('Хаосникам вход к памятнику запрещен!')</script>";
|
||
}
|
||
elseif ($user['level'] < 2) {
|
||
print "<script>alert('Вход к памятнику со 2 уровня!')</script>";
|
||
}
|
||
else {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '24',`online`.`room` = '24' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: elka.php');
|
||
}
|
||
}
|
||
if ($_GET['got'] && $_GET['level6'])
|
||
{
|
||
if ($user['level'] < 1) { print "<script>alert('Вход на почту только с первого уровня!')</script>"; }
|
||
else
|
||
{
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '27',`online`.`room` = '27' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: post.php');
|
||
}
|
||
}
|
||
|
||
if ($_GET['got'] && $_GET['level3']) {
|
||
if ($user['align'] == 4) {
|
||
print "<script>alert('Хаосникам вход в комиссионный магазин запрещен!')</script>";
|
||
}
|
||
elseif ($user['level'] < 1) {
|
||
print "<script>alert('Вход в комиссионный магазин только с первого уровня!')</script>";
|
||
}
|
||
else {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '25',`online`.`room` = '25' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: comission.php');
|
||
}
|
||
}
|
||
|
||
}
|
||
elseif($user['room']==21) {
|
||
// Torgovaya
|
||
// strelka cp
|
||
if ($_GET['got'] && $_GET['level4']) {
|
||
header('location: city.php?cp=1');
|
||
}
|
||
if ($_GET['got'] && $_GET['level13']) {
|
||
if ($user['align'] == 4) {
|
||
print "<script>alert('Хаосникам вход к памятнику запрещен!')</script>";
|
||
}
|
||
else
|
||
{
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '34',`online`.`room` = '34' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: fshop.php');
|
||
}
|
||
}
|
||
if ($_GET['got'] && $_GET['level10']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '35',`online`.`room` = '35' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: eshop.php');
|
||
}
|
||
|
||
if ($_GET['got'] && $_GET['level17']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '50',`online`.`room` = '50' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: ashop.php');
|
||
}
|
||
if ($_GET['got'] && $_GET['level5']) {
|
||
if ($user['align'] == 4) {
|
||
print "<script>alert('Хаосникам вход в банк запрещен!')</script>";
|
||
}
|
||
else {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '29',`online`.`room` = '29' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: bank.php');
|
||
}
|
||
}
|
||
if ($_GET['got'] && $_GET['level16']) {
|
||
|
||
$effs=mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE (`owner`='{$user['id']}' AND `type`='21') LIMIT 1;"));
|
||
if($effs[0])
|
||
print "<script>alert('Вход в БС под действием Силы Нейтралитета запрещен!')</script>";
|
||
else
|
||
{
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '31',`online`.`room` = '31' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: tower.php');
|
||
}
|
||
}
|
||
if ($_GET['got'] && $_GET['level14']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '30',`online`.`room` = '30' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: klanedit.php');
|
||
}
|
||
if ($_GET['got'] && $_GET['level650']) {
|
||
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '650',`online`.`room` = '650' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: ul_clans.php');
|
||
}
|
||
|
||
|
||
|
||
}elseif($user['room']==26) {
|
||
// Strashilka
|
||
// strelka cp
|
||
if ($_GET['got'] && $_GET['level4']) {
|
||
header('location: city.php?cp=1');
|
||
}
|
||
if ($_GET['got'] && $_GET['level24']) {
|
||
header('location: city.php?kz=1');
|
||
}
|
||
|
||
|
||
|
||
//замок
|
||
if ($_GET['got'] && $_GET['level21']) {
|
||
if ($user['klan']<1 && !$user['align']==2.99) {
|
||
print "<script>alert('Вы не состоите в клане!')</script>";
|
||
}
|
||
else {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '45',`online`.`room` = '45' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: clan_castle.php');
|
||
}
|
||
}
|
||
//замок
|
||
|
||
//переход в парк
|
||
if ($_GET['got'] && $_GET['level23']) {
|
||
header('location: city.php?ps=1');
|
||
}
|
||
|
||
|
||
}
|
||
elseif($user['room']==48) {
|
||
// Haos
|
||
if ($_GET['got'] && $_GET['level19']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '600',`online`.`room` = '600' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: c_haos.php');
|
||
}
|
||
|
||
|
||
}
|
||
elseif($user['room']==51) {
|
||
//на Замковую улицу
|
||
if ($_GET['got'] && $_GET['level8']) {
|
||
header('location: city.php?bps=1');
|
||
}
|
||
if ($_GET['got'] && $_GET['level18']) {
|
||
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '49',`online`.`room` = '49' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: dig.php');
|
||
}
|
||
if ($_GET['got'] && $_GET['level22']) {
|
||
if ($user['level']<8) {
|
||
print "<script>alert('Вход в парк с 8 уровня!')</script>";
|
||
}
|
||
else {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '602',`online`.`room` = '602' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: c_park.php');
|
||
}
|
||
|
||
}
|
||
}
|
||
elseif($user['room']==52) {
|
||
//Квартал Законников
|
||
if ($_GET['got'] && $_GET['level8']) {
|
||
header('location: city.php?bps=1');
|
||
}
|
||
// строим замок
|
||
if ($_GET['got'] && $_GET['level20']) {
|
||
if ($user['level'] < 6) {
|
||
print "<script>alert('Поднаберитесь опыта, прежде чем лезть непонятно куда!')</script>";
|
||
}
|
||
else
|
||
{
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '47',`online`.`room` = '47' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: wall_build.php');
|
||
}
|
||
}
|
||
if ($_GET['got'] && $_GET['level25'])
|
||
{
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '53',`online`.`room` = '53' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: library.php');
|
||
}
|
||
}
|
||
elseif($user['room']==651) {
|
||
// Клан-замок
|
||
if ($_GET['got'] && $_GET['level652']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '652',`online`.`room` = '652' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
header('location: zamok.php');
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/*if ($_GET['level7'] OR $_GET['strah']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '21',`online`.`room` = '21' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
$user['room'] = 21;
|
||
}
|
||
if ($_GET['level8'] && $_GET['strah']) {
|
||
mysql_query("UPDATE `users`,`online` SET `users`.`room` = '20',`online`.`room` = '20' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;");
|
||
$user['room'] = 20;
|
||
}*/
|
||
$online = mysql_query("select * from `online` WHERE `real_time` >= ".(time()-60).";");
|
||
?>
|
||
<HTML><HEAD>
|
||
<link rel=stylesheet type="text/css" href="css/main.css">
|
||
<meta content="text/html; charset=utf-8" http-equiv=Content-type>
|
||
<META Http-Equiv=Cache-Control Content=no-cache>
|
||
<meta http-equiv=PRAGMA content=NO-CACHE>
|
||
<META Http-Equiv=Expires Content=0>
|
||
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
|
||
<style>
|
||
IMG.aFilter { filter:Glow(Color=d7d7d7,Strength=9,Enabled=0); cursor:pointer }
|
||
</style>
|
||
<SCRIPT LANGUAGE="JavaScript">
|
||
function solo(n)
|
||
{
|
||
//if (top.CtrlPress) {
|
||
// window.open('/ch.pl?online=1&n='+n,'onlines','width=400,height=500,toolbar=no,location=no,scrollbars=yes,resizable=yes');
|
||
//} else {
|
||
top.changeroom=n;
|
||
window.location.href='city.php?got=1&level'+n+'=1';
|
||
//}
|
||
}
|
||
|
||
function imover(im)
|
||
{
|
||
im.filters.Glow.Enabled=true;
|
||
// im.style.visibility="hidden";
|
||
}
|
||
|
||
function imout(im)
|
||
{
|
||
im.filters.Glow.Enabled=false;
|
||
// im.style.visibility="visible";
|
||
}
|
||
|
||
function Down() {top.CtrlPress = window.event.ctrlKey}
|
||
|
||
document.onmousedown = Down;
|
||
</SCRIPT>
|
||
</HEAD>
|
||
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor="#d7d7d7">
|
||
<TABLE width=100% height=100% border=0 cellspacing="0" cellpadding="0">
|
||
<TR>
|
||
<TD align=center></TD>
|
||
<TD align=right>Сейчас в игре <?=mysql_num_rows($online)?> чел. <INPUT TYPE="button" value="Подсказка" style="background-color:#A9AFC0" onClick="window.open('help/city1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')"></TD></TR>
|
||
<TR><TD align=center colspan=2><?
|
||
|
||
function buildset($id,$img,$top,$left,$des) {
|
||
$imga = ImageCreateFromPng("i/city/sub/".$img.".png");
|
||
#Get image width / height
|
||
$x = ImageSX($imga);
|
||
$y = ImageSY($imga);
|
||
unset($imga);
|
||
echo "<div style=\"position:absolute; left:{$left}px; top:{$top}px; width:{$x}; height:{$y}; z-index:90; filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=100, Style=0);\"
|
||
><img src=\"i/city/sub/{$img}.png\" width=\"{$x}\" height=\"{$y}\" alt=\"{$des}\" title=\"{$des}\" class=\"aFilter\" onmouseover=\"imover(this)\" onmouseout=\"imout(this);\"
|
||
id=\"{$id}\" onclick=\"solo({$id})\" /></div>";
|
||
}
|
||
function klan_sign($top,$left) {
|
||
$klan_own=mysql_fetch_array(mysql_query("SELECT * FROM `variables` WHERE `var`='castle_owner' LIMIT 1;"));
|
||
if($klan_own['value']>0)
|
||
{
|
||
$img_raw=mysql_fetch_array(mysql_query("SELECT `name` FROM `clans` WHERE `id`='{$klan_own['value']}'"));
|
||
$img=$img_raw['name'];
|
||
}
|
||
else
|
||
$img="align_4";
|
||
$imga = ImageCreateFromGif("i/klan/".$img.".gif");
|
||
#Get image width / height
|
||
$x = ImageSX($imga);
|
||
$y = ImageSY($imga);
|
||
unset($imga);
|
||
echo "<div style=\"position:absolute; left:{$left}px; top:{$top}px; width:{$x}; height:{$y}; z-index:90; filter:progid:DXImageTransform.Microsoft.Alpha( Opacity=100, Style=0);\"
|
||
><img src=\"i/klan/{$img}.gif\" width=\"24\" height=\"15\" alt=\"{$des}\" title=\"{$des}\" class=\"aFilter\" onmouseover=\"imover(this)\" onmouseout=\"imout(this);\"/></div>";
|
||
}
|
||
|
||
if ($user['room'] == 20) {
|
||
if((int)date("H") > 5 && (int)date("H") < 22) {
|
||
$fon = 'angelscenter';
|
||
} else {
|
||
$fon = 'angelscentern';
|
||
}
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
|
||
buildset(1,"angelsclub",17,160,"Бойцовский Клуб");
|
||
buildset(3,"angelscomission",120,380,"Комиссионный магазин");
|
||
buildset(2,"angelsshop",195,210,"Магазин");
|
||
buildset(4,"angelsremont",95,275,"Ремонтная мастерская");
|
||
buildset(6,"angelspochta",55,370,"Почта");
|
||
buildset(11,"angelsloto",114,46,"Лотерея");
|
||
|
||
|
||
|
||
//buildset(12,"nytree"/*newfir*/,145,165,"Новогодняя елка"/*Памятник Меру Города*/); //чтобы открыть доступ к памятнику, нужно указать 9 вместо 12
|
||
buildset(12,"angelsfir",75,155,"Памятник Меру Города"); //чтобы открыть доступ к памятнику, нужно указать 9 вместо 12
|
||
buildset(7,"newstrelka1",183,315,"Торговая улица");
|
||
buildset(8,"newstrelka2",183,156,"Замковая улица");
|
||
|
||
|
||
|
||
|
||
// buildset(12,"newpm",175,335,"Дед Мороз");
|
||
|
||
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
|
||
elseif ($user['room'] == 21)
|
||
{
|
||
if((int)date("H") > 5 && (int)date("H") < 22) {
|
||
$fon = 'angelscenter_torg';
|
||
} else {
|
||
$fon = 'angelscentern_torg';
|
||
}
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
buildset(10,"angelseuroshop",110,45,"Сувенирный магазинчик");
|
||
buildset(14,"angelsureg",45,275,"Регистратура кланов");
|
||
buildset(5,"angelsbank",122,392,"Банк");
|
||
buildset(16,"angelsubkil",110,230,"Башня смерти");
|
||
buildset(13,"angelsflowershop",96,155,"Цветочный магазин");
|
||
buildset(4,"newstrelka3",180,120,"Центральная площадь");
|
||
buildset(17,"angelstree",105,323,"Куст с артефактами");
|
||
buildset(1,"angelstree2",55,102,"дерево");
|
||
buildset(650,"newstrelka1",183,315,"Клановая улица");
|
||
//buildset(3,"newstop",180,346,"Проход закрыт");
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
elseif ($user['room'] == 26)
|
||
{
|
||
if((int)date("H") > 5 && (int)date("H") < 22) {
|
||
$fon = 'angelscenter_zam';
|
||
} else {
|
||
$fon = 'angelscentern_zam';
|
||
}
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
|
||
|
||
|
||
buildset(21,"angelscastle",35,244,"Замок Мэра Города");
|
||
klan_sign(74,317);
|
||
buildset(24,"newstrelka4",180,220,"Квартал Законников");
|
||
buildset(23,"newstrelka3",175,120,"Парковая улица");
|
||
buildset(4,"newstrelka4",185,345,"Центральная площадь");
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
elseif ($user['room'] == 51)
|
||
{
|
||
if((int)date("H") > 5 && (int)date("H") < 22) {
|
||
$fon = 'angelscenter_park';
|
||
} else {
|
||
$fon = 'angelscentern_park';
|
||
}
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
|
||
buildset(3,"newstop",184,107,"Проход закрыт");
|
||
buildset(22,"angelspark",30,115,"Городской Парк");
|
||
buildset(18,"angelsrazlom",201,257,"Разлом Хаоса");
|
||
buildset(8,"newstrelka4",180,400,"Замковая улица");
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
elseif ($user['room'] == 52)
|
||
{
|
||
if((int)date("H") > 5 && (int)date("H") < 22) {
|
||
$fon = 'angelscenter_zak';
|
||
} else {
|
||
$fon = 'angelscentern_zak';
|
||
}
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
|
||
buildset(20,"angelszamok",54,120,"Замок (строится)");
|
||
buildset(25,"angelslibs",110,300,"Библиотека");
|
||
buildset(8,"newstrelka3",180,125,"Замковая улица");
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
elseif ($user['room'] == 48)
|
||
{
|
||
$fon = 'low';
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
|
||
|
||
|
||
buildset(19,"low_tower",71,177,"Цитадель Хаоса");
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
elseif ($user['room'] == 651)
|
||
{
|
||
if((int)date("H") > 5 && (int)date("H") < 22) {
|
||
$fon = 'angelscenter_zak';
|
||
} else {
|
||
$fon = 'angelscentern_zak';
|
||
}
|
||
echo "<table width=1><tr><td><div style=\"position:relative; cursor: pointer;\" id=\"ione\"><img src=\"i/city/",$fon,".jpg\" alt=\"\" border=\"0\"/>";
|
||
|
||
buildset(652,"angelszamok",54,120,"Замок (строится)");
|
||
|
||
|
||
echo "</td></tr></table>";
|
||
}
|
||
?>
|
||
|
||
|
||
</div>
|
||
</TD>
|
||
</TR>
|
||
</TABLE>
|
||
<script language="javascript" src="js/refreshonline.js"></script>
|
||
</BODY>
|
||
</HTML>
|