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
+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>