refactor and errors

This commit is contained in:
2023-11-05 04:46:07 +02:00
parent def933dca4
commit 3e753c8b93
125 changed files with 1353 additions and 1435 deletions
+124 -209
View File
@@ -1,11 +1,16 @@
<?php
use Core\Config;
use Core\Db;
use Model\ActionModel;
use User\Effects;
if (!defined('GAME')) {
die();
}
/** @var Magic $magic */
$re = '';
$rowonmaxc = '';
@@ -22,46 +27,26 @@ if (isset($_GET['nightatack'])) {
) {
if ($u->room['noatack'] == 0) {
$ua = mysql_fetch_array(
mysql_query(
'SELECT `s`.*,`u`.* FROM `stats` AS `s` LEFT JOIN `users` AS `u` ON `s`.`id` = `u`.`id` WHERE `u`.`login` = "' . mysql_real_escape_string(
$_GET['login']
) . '" LIMIT 1'
)
);
$battle = mysql_fetch_array(
mysql_query(
'SELECT `id` FROM `battle_last` WHERE `uid` = "' . $u->info['id'] . '" AND `battle_id` = "' . $ua['battle'] . '" LIMIT 1'
)
);
$ua = User::getInfo($_GET['login']);
$wasInThisBattle = !empty(Db::getValue('select id from battle_last where uid = ? and battle_id = ? limit 1', [$u->info['id'], $ua['battle']]));
if (isset($ua['id']) && $ua['online'] > time() - 520) {
$usta = $u->getStats($ua['id'], 0);
$minHp = $usta['hpAll'] / 100 * 33;
if ($ua['battle'] > 0) {
$uabt = mysql_fetch_array(
mysql_query(
'SELECT `id` FROM `battle` WHERE `id` = "' . $ua['battle'] . '" AND `team_win` = "-1" LIMIT 1'
)
);
if (!isset($uabt['id'])) {
$ua['battle'] = 0;
}
if ($ua['battle'] > 0 && empty(Db::getValue('select count(id) from battle where id = ? and team_win = -1', [$ua['battle']]))) {
$ua['battle'] = 0;
}
if ($ua['level'] < 8) {
$re = 'Новички находятся под защитой Мироздателя...';
} elseif ($ua['id'] == $u->info['id']) {
$re = 'На себя нападать нельзя...';
} elseif ($u->info['level'] > $ua['level'] + 1) {
$re = 'Вы слишком сильны';
} elseif ($ua['no_ip'] == 'trupojor') {
} elseif ($ua['align'] === 9) {
$re = 'Нельзя нападать на городского монста с помощью кнопки напасть!';
} elseif (isset($battle['id'])) {
} elseif ($wasInThisBattle) {
$re = 'Нельзя вмешаться, вы уже были в этом поединке.';
} elseif ($ua['admin'] == 1 && $u->info['admin'] == 0) {
$re = 'На кого прыгаешь, щенок?';
@@ -112,84 +97,55 @@ function thisInfRm($id, $tp = null, $json = false)
{
$rm = Db::getRow('select * from room where code = ? and city = ?', [$id, 'capitalcity']);
$inf = 'Здание было разрушено';
$rown = 0;
if (isset($rm['id'])) {
$rown = Db::getValue('select count(*) from users where online > unix_timestamp() - 120 and city = ? and room = ?', ['capitalcity', $rm['id']]);
if ($tp == null) {
$inf = '<b>' . $rm['name'] . '</b><br>Сейчас в комнате ' . ($rown) . ' чел.';
$inf = '<b>' . $rm['name'] . '</b><br>Сейчас в комнате ' . $rown . ' чел.';
} else {
$inf = $rm['name'] . "\nСейчас в комнате " . ($rown) . ' чел.';
$inf = $rm['name'] . "\nСейчас в комнате " . $rown . ' чел.';
}
if ($json) {
return [$rm['code'], $rm['name'], ($rown)];
return [$rm['code'], $rm['name'], $rown];
}
}
if ($json) {
return ['false', $inf, ($rown)];
return ['false', $inf, $rown];
}
if ($tp == null) {
echo 'onMouseOver="top.hi(this,\'<div align=right>' . $inf . '</div>\',event,0,1,1,1,\'max-height:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" onClick="goLocal(\'main.php?loc=' . $rm['code'] . '\',\'' . $rm['name'] . '\');"';
} else {
echo $inf;
}
return [];
}
if (isset($_GET['loc'])) {
// $training_manager = \DarksLight2\Training\TrainingManager::getInstance();
// $training_manager = \DarksLight2\Training\TrainingManager::getInstance();
$go = Db::getRow('select * from room where code = ?', [$_GET['loc']]);
// if (in_array(
// $go['file'], $training_manager->getRegistered()[$training_manager->getCurrentStepName()]->allowedToMove()
// ) || $u->info['admin'] > 0) {
$tr_pl = mysql_fetch_array(
mysql_query(
'SELECT `id`,`v1` FROM `eff_users` WHERE `id_eff` = 4 AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" ORDER BY `v1` DESC LIMIT 1'
)
);
// if (in_array(
// $go['file'], $training_manager->getRegistered()[$training_manager->getCurrentStepName()]->allowedToMove()
// ) || $u->info['admin'] > 0) {
$tr_pl = Db::getValue('select v1 from eff_users where id_eff = 4 and uid = ? order by v1 desc limit 1', [$u->info['id']]);
//Проверяем костыли
$kos1 = mysql_fetch_array(
mysql_query(
'SELECT `id`,`item_id` FROM `items_users` WHERE `inOdet` = 3 AND `uid` = "' . $u->info['id'] . '" AND `delete` = 0 LIMIT 1'
)
);
$kos2 = mysql_fetch_array(
mysql_query(
'SELECT `id`,`item_id` FROM `items_users` WHERE `inOdet` = 14 AND `uid` = "' . $u->info['id'] . '" AND `delete` = 0 LIMIT 1'
)
);
if ($kos1['item_id'] == 630 || $kos1['item_id'] == 631) {
$kos1['good'] = 1;
} else {
$kos1['good'] = 0;
}
if ($kos2['item_id'] == 630 || $kos2['item_id'] == 631) {
$kos2['good'] = 1;
} else {
$kos2['good'] = 0;
}
if (isset($tr_pl['id'])) {
$zadej = 0;
if ($tr_pl['v1'] == 2) {
if ($kos1['good'] == 0 && $kos2['good'] == 0) {
$re = 'Вы травмированы. Не возможно с такими увечиями передвигаться без костылей.';
$zadej = -1;
} else {
$hasKostyl = Db::getValue('select count(id) from items_users where inOdet in (3,14) and item_id in (630, 631) and uid = ?') > 0;
$zadej = 0;
if (isset($tr_pl)) {
if ($hasKostyl) {
if ($tr_pl == 2) {
$zadej = 20;
}
} elseif ($tr_pl['v1'] == 3 || $tr_pl['v1'] == 4) {
if ($kos1['good'] == 0 || $kos2['good'] == 0) {
$re = 'Вы травмированы. Не возможно с такими увечиями передвигаться без костылей.';
$zadej = -1;
} else {
} elseif ($tr_pl == 3 || $tr_pl == 4) {
$zadej = 30;
}
} else {
$zadej = -1;
$re = 'Вы травмированы. Не возможно с такими увечиями передвигаться без костылей.';
}
}
if ($u->room['extdlg'] > 0) {
header('location: main.php?talk=' . $u->room['extdlg'] . '');
} elseif (isset($zadej) && $zadej == -1) {
@@ -202,8 +158,9 @@ if (isset($_GET['loc'])) {
} elseif ($u->info['inTurnir'] > 0) {
$re = 'Вы не можете перемещаться, Вы приняли заявку на турнир ...';
} elseif (
($kos1['good'] == 0 && $kos2['good'] == 0) && (
(!isset($zadej) || $zadej == 0) &&
!$hasKostyl &&
(
empty($zadej) &&
$u->aves['now'] >= $u->aves['max'] &&
$u->room['name'] != 'Общежитие' &&
$u->room['name'] != 'Общ. Этаж 1' &&
@@ -239,18 +196,12 @@ if (isset($_GET['loc'])) {
} elseif (($alg[0] > $u->info['align'] || $alg[1] < $u->info['align']) && $go['align'] != 0) {
$re = 'Ты не ту склонность выбрал.. Дружок :)';
} elseif ($u->info['zv'] > 0) {
$test_zv = mysql_fetch_array(
mysql_query(
'SELECT * FROM `zayvki` WHERE `id` = "' . $u->info['zv'] . '" AND `cancel` = 0 AND `start` = 0 AND `time` > "' . (time() - 60 * 60 * 2) . '" LIMIT 1'
)
);
if (isset($test_zv['id'])) {
$testZv = Db::getValue('select count(id) from zayvki where id = ? and cancel = 0 and start = 0 and time > unix_timestamp() - 60*60*2') > 0;
if ($testZv) {
$re = 'Подали заявку и убегаем?.. Не хорошо!';
} else {
$re = 'Ваша заявка была удалена... Теперь вы можете перейти в другую локацию!';
mysql_query(
'UPDATE `stats` SET `zv` = 0 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
Db::sql('update stats set zv = 0 where id = ?', [$u->info['id']]);
}
} elseif (($go['clan'] > 0 && $u->info['clan'] != $go['clan']) || ($go['clan'] == -1 && $u->info['clan'] == 0)) {
$re = 'Вы не можете попасть в эту комнату';
@@ -261,20 +212,15 @@ if (isset($_GET['loc'])) {
} elseif ($mlvl[1] < $u->info['level']) {
$re = 'Вы не можете попасть в эту комнату, уровень высоковат ;)';
} elseif ($go['close'] == 0) {
$travms = mysql_fetch_array(
mysql_query(
'SELECT * FROM `eff_users` WHERE `uid` = "' . $u->info['id'] . '" and (`v1`="2" or `v1`="3") and `delete`=0 ORDER by v1 DESC'
)
);
//замедление перемешения при травмах
$plus_timeGo = 0 + $zadej; // добавочное время при травме
$plus_timeGo = $zadej; // добавочное время при травме
if ($plus_timeGo < 0) {
$plus_timeGo = 0;
}
if (
(!isset($zadej) || $zadej == 0) &&
empty($zadej) &&
$u->aves['now'] >= $u->aves['max'] &&
$u->room['name'] != 'Общежитие' &&
$u->room['name'] != 'Общ. Этаж 1' &&
@@ -282,7 +228,7 @@ if (isset($_GET['loc'])) {
$u->room['name'] != 'Общ. Этаж 3'
) {
$plus_timeGo += 2 * 60;
if ($kos1['good'] == 0) {
if (!$hasKostyl) {
$plus_timeGo += 1.5 * 60;
}
}
@@ -295,54 +241,35 @@ if (isset($_GET['loc'])) {
}
$u->info['timeGo'] = time() + $go['timeGO'] + $plus_timeGo;
$u->info['timeGoL'] = time();
$upd = mysql_query(
'UPDATE `stats` SET `timeGo` = "' . $u->info['timeGo'] . '",`timeGoL` = "' . $u->info['timeGoL'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
);
if ($upd) {
$upd2 = mysql_query(
'UPDATE `users` SET `room` = "' . $go['id'] . '",`online` = "' . time() . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
Db::sql('update stats set timeGo = ?, timeGoL = ? where id = ?', [$u->info['timeGo'], $u->info['timeGoL'], $u->info['id']]);
Db::sql('update users set room = ?, online = unix_timestamp() where id = ?', [$go['id'], $u->info['id']]);
if ($u->room['file'] == 'bsenter' && $go['file'] != 'bsenter') {
//Удаляем все ставки в БС
Db::sql(
'update bs_turnirs
set users = users - (select count(bsid) from bs_zv where inBot = 0 and finish = 0 and uid = ?)
where id = (select bsid from bs_zv where inBot = 0 and finish = 0 and uid = ? limit 1)', [$u->info['id'], $u->info['id']]
);
if ($upd2) {
if ($u->room['file'] == 'bsenter' && $go['file'] != 'bsenter') {
//Удаляем все ставки в БС
$sp_bs = mysql_query(
'SELECT `id`,`bsid`,`money` FROM `bs_zv` WHERE `uid` = "' . $u->info['id'] . '" AND `inBot` = "0" AND `finish` = "0"'
);
while ($pl_bs = mysql_fetch_array($sp_bs)) {
mysql_query(
'UPDATE `bs_turnirs` SET `users` = `users` - 1 WHERE `id` = "' . $pl_bs['bsid'] . '" LIMIT 1'
);
}
unset($sp_bs, $pl_bs);
mysql_query(
'UPDATE `bs_zv` SET `finish` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `inBot` = "0" AND `finish` = "0"'
);
}
$smt = $u->testAction(
'`uid` = "' . $u->info['id'] . '" AND `time`>=' . (time() - 600) . ' AND `vars` = "create_snowball_cp" LIMIT 1',
1
);
if (isset($smt['id'])) {
mysql_query(
'DELETE FROM `actions` WHERE `id` = "' . $smt['id'] . '" LIMIT 1'
);
}
mysql_query(
'UPDATE `eff_users` SET `delete` = "' . time() . '" WHERE `id_eff` = "24" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 24'
);
$u->info['room'] = $go['id'];
$u->room = $go;
if (!isset($_GET['mAjax'])) {
echo '<script>top.chat.reflesh();</script>';
}
} else {
$re = 'Вы не смогли перейти в локацию, возможно она была разрушена';
}
} else {
$re = 'Вы не смогли перейти в локацию';
Db::sql('update bs_zv set finish = unix_timestamp() where uid = ? and inBot = 0 and finish = 0', [$u->info['id']]);
}
$smt = $u->testAction(
'`uid` = "' . $u->info['id'] . '" AND `time`>=' . (time() - 600) . ' AND `vars` = "create_snowball_cp" LIMIT 1',
1
);
if (isset($smt['id'])) {
ActionModel::deleteById($smt['id']);
}
Effects::removeByEffectId($u->info['id'], 24);
$u->info['room'] = $go['id'];
$u->room = $go;
if (!isset($_GET['mAjax'])) {
echo '<script>top.chat.reflesh();</script>';
}
} elseif ($go['destroy'] == 1) {
$re = 'Здание было разрушено, в данный момент оно реставрируется';
} else {
@@ -354,9 +281,9 @@ if (isset($_GET['loc'])) {
} else {
$re = 'Проход не существует';
}
// } else {
// $re = 'Вам запрещено передвигаться до окончания обучения!!!';
// }
// } else {
// $re = 'Вам запрещено передвигаться до окончания обучения!!!';
// }
}
if ($u->info['room'] == 209) {
@@ -376,36 +303,36 @@ if (isset($_GET['mAjax'])) {
if ($tmGol < 1) {
$tmGol = 1;
}
$rowonmax = '';
$rowonmax2 = 0;
$rowonmax2 = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time() - 520) . ' AND `inUser` = "0" AND `city` = "' . $u->info['city'] . '" AND `no_ip` != "trupojor" AND `pass` != "saintlucia" AND `login` NOT LIKE "%(%" AND `banned` = 0 AND `bot_id` = 0 LIMIT 1'
)
$playersOnline = Db::getValue(
"select count(id) from users where
online > unix_timestamp() - 520 and
inUser = 0 and
no_ip != 'trupojor' and
pass != 'saintlucia' and
login not like '%(%' and
banned = 0 and
bot_id = 0"
);
$rowonmax = 'Сейчас в клубе:<b> ' . $rowonmax2[0] . '</b> чел.';
$rowonmax = '' . $rowonmax . '';
$rowonmax2c = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time() - 520) . ' AND `inUser` = "0" AND `no_ip` != "trupojor" AND `pass` != "saintlucia" AND `login` NOT LIKE "%(%" AND `banned` = 0 AND `bot_id` = 0 LIMIT 1'
)
$allPlayers = Db::getValue(
"select count(id) from users where
inUser = 0 and
no_ip != 'trupojor' and
pass != 'saintlucia' and
login not like '%(%' and
banned = 0 and
bot_id = 0"
);
$rowonmax3c = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time() - 520) . ' AND `inUser` = "0" AND `no_ip` != "trupojor" AND `pass` != "saintlucia" AND `login` NOT LIKE "%(%" AND `banned` = 0 AND `bot_id` = 0 LIMIT 1'
)
);
$rowonmaxc = 'Всего в Игре: ' . $rowonmax2c[0] . ' чел.';
unset($sil, $pil, $rowonmax2);
$rowonmax = "Сейчас в клубе: <b>$playersOnline</b> чел.";
$rowonmaxc = "Всего в Игре: $allPlayers чел.";
if ($u->room['file'] != '') {
include_once('modules_data/location/fight-club.database.php');
exit(LocationResponse::init($tmGo, $tmGol, $u->room['file'], $u->room['name']));
}
exit(json_encode($Response));
}
if (isset($_GET['ajaxHostel'])) { // Для общежития, проверка на лимит положенных предметов в сундук.
include_once('modules_data/location/room_hostel.php');
include_once 'modules_data/location/room_hostel.php';
}
@@ -424,19 +351,16 @@ if (isset($_GET['ajaxHostel'])) { // Для общежития, проверка
</svg>
<style>
.MoveLine {
background: url(//img.new-combats.tech/i/move/wait2.gif) 0px 0px repeat-y;
background: url(//img.new-combats.tech/i/move/wait2.gif) 0 0 repeat-y;
height: 6px;
}
.aFilter:hover {
-webkit-filter: drop-shadow(0px 0px 4px rgba(255, 255, 255, 1));
filter: url(#drop-shadow);
-ms-filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#FFF')";
filter: "progid:DXImageTransform.Microsoft.Dropshadow(OffX=0, OffY=0, Color='#FFF')";
}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script>
var speedLoc = 0;
var sLoc1 = 0;
@@ -508,18 +432,9 @@ if (isset($_GET['ajaxHostel'])) { // Для общежития, проверка
</script>
<?php
if (date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) {
$rsnow = [
234 => 1,
267 => 1,
9 => 1,
286 => 1,
11 => 1,
236 => 1,
213 => 1,
252 => 1,
323 => 1,
];
if ($rsnow[$u->room['id']] == 1) {
$rsnow = [9, 11, 213, 234, 236, 252, 267, 286, 323,];
if (in_array($u->room['id'], $rsnow)) {
?>
<script>
var no = 50; // snow number
@@ -621,36 +536,36 @@ if (isset($u->room['id'])) {
</table>
<div id="test"></div><script>var tgo = ' . ($tmGo * 10) . '; var tgol = ' . ($tmGol * 10) . ';locGoLine();</script>';
$goline = '<div style="position:absolute; top:0px; z-index:101; right:12px; width:80px;">
' . $goLis . '
</div>';
$rowonmax = '';
$rowonmax2 = 0;
$goline = '<div style="position:absolute; top:0; z-index:101; right:12px; width:80px;">' . $goLis . '</div>';
$playersOnline = Db::getValue(
"select count(id) from users where
online > unix_timestamp() - 520 and
inUser = 0 and
no_ip != 'trupojor' and
pass != 'saintlucia' and
login not like '%(%' and
banned = 0 and
bot_id = 0"
);
$allPlayers = Db::getValue(
"select count(id) from users where
inUser = 0 and
no_ip != 'trupojor' and
pass != 'saintlucia' and
login not like '%(%' and
banned = 0 and
bot_id = 0"
);
$rowonmax2 = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time() - 777) . ' AND `inUser` = "0" AND `city` = "' . $u->info['city'] . '" AND `no_ip` != "trupojor" AND `pass` != "saintlucia" AND `login` NOT LIKE "%(%" AND `banned` = 0 AND `bot_id` = 0 LIMIT 1'
)
);
$rowonmax = '<br><span style="font-size:14px;">Сейчас в клубе<b> ' . ($rowonmax2[0]) . '</b> реальных чел.</font>';
$rowonmax2c = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time() - 770) . ' AND `inUser` = "0" AND `no_ip` != "trupojor" AND `login` NOT LIKE "%(%" AND `banned` = 0 AND `bot_id` = 0 LIMIT 1'
)
);
$rowonmax3c = mysql_fetch_array(
mysql_query(
'SELECT COUNT(`id`) FROM `users` WHERE `online` > ' . (time() - 770) . ' AND `inUser` = "0" AND `no_ip` != "trupojor" AND `login` NOT LIKE "%(%" AND `banned` = 0 AND `bot_id` = 0 LIMIT 1'
)
);
if ($rowonmax2c[0] - $rowonmax2[0] > 0) {
$rowonmaxc = '<small>(Общий онлайн с учетом ботов: ' . ($rowonmax2c[0] + 5) . ' чел.)</small>';
$rowonmax = '<br><span style="font-size:14px;">Сейчас в клубе<b> ' . $playersOnline . '</b> реальных чел.</span>';
if ($allPlayers > $playersOnline) {
$rowonmax .= '<br><small>(Общий онлайн: ' . $allPlayers . ' чел.)</small>';
}
$rowonmax = $rowonmax . '<br>' . $rowonmaxc;
unset($sil, $pil, $rowonmax2);
if ($u->room['file'] != '') {
include_once('modules_data/location/' . $u->room['file'] . '.php');
if ((date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) && $rsnow[$u->room['id']] == 1) {
if ((date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) && in_array($u->room['id'], $rsnow)) {
echo '<script>DrawWeather(31);WeatherBegin();</script>';
}
}
+4 -6
View File
@@ -40,12 +40,10 @@ if ($u->room['file'] != 'bk') {
<td id="ViewLocation"><?php
if ($u->info['login'] == 'mZer0ne') {
?>
<script><?php
require_once('modules/location/fight-club.database.php');
?>
var json = <?= json_encode($Response); ?>;
var tgo = <?= ($tmGo * 10); ?>;
var tgol = <?= ($tmGol * 10); ?>;
<script>
var json = <?= LocationResponse::init($tmGo, $tmGol, $u->room['file'], $u->room['name']) ?>;
var tgo = <?= $tmGo * 10 ?>;
var tgol = <?= $tmGol * 10 ?>;
ViewLocation(json);
</script><?php
}else{
@@ -1,203 +0,0 @@
<?php
if(!defined('GAME')){
die();
}
$StaticMSG = array(
'your-position'=>'Ваше местоположение',
'move-bk'=>'Проход через &quot;<b>Бойцовский клуб</b>&quot;',
'move-zalu4'=>'Проход через &quot;<b>Зал паладинов</b>&quot;',
'move-map_halls'=>'Проход через &quot;<b>Залы</b>&quot;',
'move-to-sek4'=>'Проход через &quot;<b>Рыцарский</b>&quot; или &quot;<b>Торговый</b>&quot; зал',
'move-sek5'=>'Проход через &quot;<b>Торговый зал</b>&quot;',
'move-sek6'=>'Проход через &quot;<b>Рыцарский зал</b>&quot;',
);
$Response = array('status'=>'update');
switch($u->room['file']){
case'bk':// Бойцовский клуб
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig',
'left'=>'241',
'top'=>'128',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_bk','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_klub1','params'=>thisInfRm('1.180.0.15', NULL, true)),
array('id'=>'map_klub2','params'=>thisInfRm('1.180.0.225', NULL, true)),
array('id'=>'map_klub3','params'=>thisInfRm('1.180.0.2', NULL, true)),
array('id'=>'map_klub4','params'=>thisInfRm('1.180.0.4', NULL, true)),
array('id'=>'map_klub5','params'=>thisInfRm('1.180.0.5', NULL, true)),
array('id'=>'map_klub6','params'=>thisInfRm('1.180.0.16', NULL, true)),
array('id'=>'map_klub7','params'=>thisInfRm('1.180.0.9', NULL, true))
),
'buttons'=>array(
array('Возврат','main.php?homeworld=true'),
array('Карта клуба','main.php?clubmap=true'),
array('Форум',"window.open('" . $c['forum'] . "', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')"),
array('Подсказка',"window.open('/encicl/help/top1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')")
)
);
break;
case'zv1':// Зал Воинов 1
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig',
'left'=>'154',
'top'=>'148',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_bk','params'=>thisInfRm('1.180.0.3', NULL, true)),
array('id'=>'map_klub1','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub2','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub3','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub4','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_klub5','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub6','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub7','params'=>array(false, $StaticMSG['move-bk']))
)
);
break;
case'zv2':// Зал Воинов 2
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig',
'left'=>'395',
'top'=>'142',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_bk','params'=>thisInfRm('1.180.0.3', NULL, true)),
array('id'=>'map_klub1','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub2','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub3','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_klub4','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub5','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub6','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub7','params'=>array(false, $StaticMSG['move-bk']))
)
);
break;
case'zv3':// Зал Воинов 3
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig',
'left'=>'337',
'top'=>'79',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_bk','params'=>thisInfRm('1.180.0.3', NULL, true)),
array('id'=>'map_klub1','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub2','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub3','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub4','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub5','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_klub6','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub7','params'=>array(false, $StaticMSG['move-bk']))
)
);
break;
case'zv4':// Будуар
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig',
'left'=>'139',
'top'=>'79',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_bk','params'=>thisInfRm('1.180.0.3', NULL, true)),
array('id'=>'map_klub1','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub2','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub3','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub4','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub5','params'=>array(false, $StaticMSG['move-bk'])),
array('id'=>'map_klub6','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_klub7','params'=>array(false, $StaticMSG['move-bk']))
)
);
break;
case'zalu':// Залы
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig1',
'left'=>'337',
'top'=>'117',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_halls','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_zalu3','params'=>array(false, $StaticMSG['move-zalu4'])),
array('id'=>'map_zalu4','params'=>thisInfRm('1.180.0.16', NULL, true)),
array('id'=>'map_zalu6','params'=>array(false, $StaticMSG['move-zalu4'])),
array('id'=>'map_zalu7','params'=>thisInfRm('1.180.0.3', NULL, true))
)
);
break;
case'zalu_pal':// Залы
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig1',
'left'=>'163',
'top'=>'28',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_halls','params'=>thisInfRm('1.180.0.15', NULL, true)),
array('id'=>'map_zalu3','params'=>thisInfRm('1.180.0.xx', NULL, true)),
array('id'=>'map_zalu4','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_zalu6','params'=>thisInfRm('1.180.0.0', NULL, true)),
array('id'=>'map_zalu7','params'=>array(false, $StaticMSG['move-map_halls']))
)
);
break;
case'bk2':// Залы
$Response = array(
'status'=>'success',
'location'=>array(
'bg'=>'navig3',
'left'=>'162',
'top'=>'125',
'name'=>$u->room['name'],
'tgo'=>($tmGo*10),
'tgo1'=>($tmGol*10)
),
'goto'=>array(
array('id'=>'map_2stair','params'=>array(false, $StaticMSG['your-position'])),
array('id'=>'map_sec1','params'=>thisInfRm('1.180.0.3', NULL, true)),
array('id'=>'map_sec2','params'=>thisInfRm('1.180.0.xx', NULL, true)),
array('id'=>'map_sec3','params'=>array(false, $StaticMSG['move-sek5'])),
array('id'=>'map_sec4','params'=>array(false, $StaticMSG['move-to-sek4'])),
array('id'=>'map_sec5','params'=>thisInfRm('1.180.0.221', NULL, true)),
array('id'=>'map_sec6','params'=>thisInfRm('1.180.0.224', NULL, true)),
array('id'=>'map_sec7','params'=>array(false, $StaticMSG['move-sek6']))
)
);
break;
}
$Response;
+64 -54
View File
@@ -1,60 +1,70 @@
<?php
require_once('modules_data/location/fight-club.database.php');
if(!defined('GAME')){
die();
if (!defined('GAME')) {
die();
}
?><script type="text/javascript" src="/js/jquery.locations.js"></script>
?>
<script type="text/javascript" src="/js/jquery.locations.js"></script>
<link href="/css/fightclub.css" rel="stylesheet" type="text/css">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="250" valign="top"><?php
$usee = $u->getInfoPers($u->info['id'],0);
if($usee!=false){
echo $usee[0];
}else{
echo 'information is lost.';
}
?></td>
<td width="230" valign="top" style="padding-top:19px;"><?php require_once('modules/stats_loc.php'); ?></td>
<td valign="top"><div align="right"><?php
if($u->error!=''){
echo '<font color="red"><b>'.$u->error.'</b></font>';
}
?><table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td><?php
if($re!=''){
echo '<font color="red"><b>'.$re.'</b></font>';
}
?><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="ViewLocation"><script type="text/javascript">
var json = <?= json_encode($Response); ?>;
var tgo = <?= ($tmGo*10); ?>;
var tgol = <?= ($tmGol*10); ?>;
ViewLocation(json);
</script></td>
</tr>
</table>
<div style="display:none; height:0px " id="moveto"></div>
?></small></div></td>
</tr>
</table>
<small>
<HR><div id="ajaxButtons"<?php
$hgo = $u->testHome(); if(!isset($hgo['id'])){
echo'<INPUT onclick="location.href=\'main.php?homeworld=' . $code . '\';" class="btn" value="Возврат" type="button" name="combats2">';
}
unset($hgo);
?>
<INPUT onclick="location.href='main.php?clubmap=<?= $code; ?>';" class="btn" value="Карта клуба" type="button" name="combats2">
<INPUT id="forum" class="btn" onclick="window.open('<?= $c['forum']; ?>', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')" value="Форум" type="button" name="forum">
<INPUT class="btn" onclick="window.open('/encicl/help/top1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" type="button">
<INPUT class="btn" value="Объекты" type="button">
</div><br />
<strong>Внимание!Смените пароль на уникальный,который не использовался ранее в подобных проектах,это обезопасит вашего персонажа от взлома.<BR>
<tr>
<td width="250" valign="top"><?php
$usee = $u->getInfoPers($u->info['id'], 0);
if ($usee) {
echo $usee[0];
} else {
echo 'information is lost.';
}
?></td>
<td width="230" valign="top" style="padding-top:19px;"><?php require_once('modules/stats_loc.php'); ?></td>
<td valign="top">
<div align="right"><?php
if ($u->error != '') {
echo '<font color="red"><b>' . $u->error . '</b></font>';
}
?>
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td><?php
if ($re != '') {
echo '<font color="red"><b>' . $re . '</b></font>';
}
?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="ViewLocation">
<script type="text/javascript">
var json = <?= LocationResponse::init($tmGo, $tmGol, $u->room['file'], $u->room['name']) ?>;
var tgo = <?= $tmGo * 10 ?>;
var tgol = <?= $tmGol * 10 ?>;
ViewLocation(json);
</script>
</td>
</tr>
</table>
<div style="display:none; height:0px " id="moveto"></div>
?></small>
</div>
</td>
</tr>
</table>
<small>
<HR>
<div id="ajaxButtons"<?php
$hgo = $u->testHome();
if (!isset($hgo['id'])) {
echo '<INPUT onclick="location.href=\'main.php?homeworld=' . $code . '\';" class="btn" value="Возврат" type="button" name="combats2">';
}
unset($hgo);
?>
<INPUT onclick="location.href='main.php?clubmap=<?= $code; ?>';" class="btn" value="Карта клуба" type="button" name="combats2">
<INPUT id="forum" class="btn" onclick="window.open('<?= $c['forum']; ?>', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')" value="Форум" type="button" name="forum">
<INPUT class="btn" onclick="window.open('/encicl/help/top1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" type="button">
<INPUT class="btn" value="Объекты" type="button">
</div><br/>
<strong>Внимание!Смените пароль на уникальный,который не использовался ранее в подобных проектах,это обезопасит вашего персонажа от взлома.<BR>
<em>Администрация.</strong> </em></small> <BR>
<?= $rowonmax; ?><BR>
</div></td>
</tr>
<?= $rowonmax; ?><BR>
</div></td>
</tr>
</table>