refactor and custom user entities
This commit is contained in:
@@ -102,7 +102,7 @@ $lvl_exp = [
|
||||
|
||||
];
|
||||
|
||||
if ($res['exp'] >= $lvl_exp[$res['level'] + 1]) {
|
||||
if ($res && $res['exp'] >= $lvl_exp[$res['level'] + 1]) {
|
||||
$res['level']++;
|
||||
mysql_query('UPDATE `clan` SET `level` = "' . $res['level'] . '" WHERE `id` = "' . $res['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
@@ -481,7 +481,7 @@ if ($userclan->isAwaitingConfirmation()) {
|
||||
exit('<div>Заявка на регистрацию клана ' . $userclan->printClan() . ' в процессе рассмотрения.</div>');
|
||||
}
|
||||
|
||||
if (!isset($res['id'])) {
|
||||
if (!$res) {
|
||||
$clans = Db::getRows('select name, align, level from clan where status = 1 order by align, level desc, name');
|
||||
?>
|
||||
<script>document.getElementById('se-pre-con').parentNode.removeChild(document.getElementById('se-pre-con'));</script>
|
||||
|
||||
@@ -131,9 +131,9 @@ if (isset($_GET['loc'])) {
|
||||
|
||||
$tr_pl = Db::getValue('select v1 from eff_users where id_eff = 4 and uid = ? order by v1 desc limit 1', [$u->info['id']]);
|
||||
//Проверяем костыли
|
||||
$hasKostyl = Db::getValue('select count(id) from items_users where inOdet in (3,14) and item_id in (630, 631) and uid = ?') > 0;
|
||||
$hasKostyl = Db::getValue('select count(id) from items_users where inOdet in (3,14) and item_id in (630, 631) and uid = ?', [$u->info['id']]) > 0;
|
||||
$zadej = 0;
|
||||
if (isset($tr_pl)) {
|
||||
if ($tr_pl) {
|
||||
if ($hasKostyl) {
|
||||
if ($tr_pl == 2) {
|
||||
$zadej = 20;
|
||||
@@ -147,14 +147,12 @@ if (isset($_GET['loc'])) {
|
||||
}
|
||||
|
||||
if ($u->room['extdlg'] > 0) {
|
||||
header('location: main.php?talk=' . $u->room['extdlg'] . '');
|
||||
} elseif (isset($zadej) && $zadej == -1) {
|
||||
header('location: main.php?talk=' . $u->room['extdlg']);
|
||||
} elseif ($zadej == -1) {
|
||||
if (!isset($re) || $re == '') {
|
||||
$re = 'У вас травма, нельзя перемещаться...';
|
||||
}
|
||||
//Травма...
|
||||
} elseif ($u->info['align'] == 2 && $go['nochaos'] == 1) {
|
||||
$re = 'Проход для хаосников закрыт!';
|
||||
} elseif ($u->info['inTurnir'] > 0) {
|
||||
$re = 'Вы не можете перемещаться, Вы приняли заявку на турнир ...';
|
||||
} elseif (
|
||||
@@ -241,6 +239,8 @@ if (isset($_GET['loc'])) {
|
||||
}
|
||||
$u->info['timeGo'] = time() + $go['timeGO'] + $plus_timeGo;
|
||||
$u->info['timeGoL'] = time();
|
||||
|
||||
|
||||
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']]);
|
||||
|
||||
@@ -442,6 +442,7 @@ if (date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) {
|
||||
var sp_rel = 1.4; //speed relevation
|
||||
var snowflake1 = "/i/itimeges/snow1.gif";
|
||||
var snowflake2 = "/i/itimeges/snow2.gif";
|
||||
const snowflake3 = '❄️';
|
||||
|
||||
var i, doc_width, doc_height;
|
||||
|
||||
@@ -478,10 +479,10 @@ if (date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) {
|
||||
doc_width = 580;
|
||||
doc_height = 312;
|
||||
|
||||
var div = '';
|
||||
let div = '';
|
||||
for (i = 0; i < no; ++i) {
|
||||
SetVariable(i);
|
||||
div += "<div id=\"dot" + i + "\" style=\"POSITION: absolute; Z-INDEX: 30" + i + "; VISIBILITY: visible; TOP: " + 0 + "px; LEFT: " + 0 + "px;\"><img id=\"im" + i + "\" src=\"" + (sty[i] < sp_rel ? snowflake2 : snowflake1) + "\" border=\"0\" alt=\"Снежинка\"></div>";
|
||||
div += "<div id=\"dot" + i + "\" style=\"POSITION: absolute; Z-INDEX: 30" + i + "; VISIBILITY: visible; TOP: " + 0 + "px; LEFT: " + 0 + "px;\"><img id=\"im" + i + "\" src=\"" + (sty[i] < sp_rel ? snowflake2 : snowflake1) + "\" alt=\"Снежинка\"></div>";
|
||||
}
|
||||
|
||||
document.getElementById('snow').innerHTML = div;
|
||||
@@ -494,7 +495,7 @@ if (date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) {
|
||||
yp[i] += sty[i] < sp_rel ? sty[i] / 2 : sty[i];
|
||||
if (yp[i] > doc_height - 40) {
|
||||
SetVariable(i);
|
||||
var im = document.getElementById('im' + i);
|
||||
const im = document.getElementById('im' + i);
|
||||
im.src = (sty[i] < sp_rel) ? snowflake2 : snowflake1;
|
||||
}
|
||||
dx[i] += stx[i];
|
||||
@@ -510,7 +511,9 @@ if (date('m') == 11 || date('m') == 12 || date('m') == 1 || date('m') == 2) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($u->room['id'])) {
|
||||
if (!isset($u->room['id'])) {
|
||||
echo 'Location is lost.';
|
||||
} else {
|
||||
$tmGo = $u->info['timeGo'] - time() + 1; //сколько секунд осталось
|
||||
$tmGol = $u->info['timeGo'] - $u->info['timeGoL'] + 1; //сколько секунд идти всего
|
||||
if ($tmGo < 0) {
|
||||
@@ -569,7 +572,5 @@ if (isset($u->room['id'])) {
|
||||
echo '<script>DrawWeather(31);WeatherBegin();</script>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo 'Location is lost.';
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,13 @@ $zv = new FightRequest();
|
||||
|
||||
// Турниры по умолчанию.
|
||||
// 4-group,5-chaos,6-current,7-ended,10-tournament
|
||||
$r = (int)$_GET['r'] ??= FightRequest::BATTLE_RAZDEL_TOURNAMENTS;
|
||||
|
||||
$r = match ($_GET['r']) {
|
||||
'4' => FightRequest::BATTLE_RAZDEL_GROUP,
|
||||
'5' => FightRequest::BATTLE_RAZDEL_CHAOTIC,
|
||||
'6' => FightRequest::BATTLE_RAZDEL_CURRENT,
|
||||
'7' => FightRequest::BATTLE_RAZDEL_ENDED,
|
||||
default => FightRequest::BATTLE_RAZDEL_TOURNAMENTS
|
||||
};
|
||||
|
||||
$js_5356 = sprintf(
|
||||
"top.lafstReg[%d] = 0; top.startHpRegen(\"main\",%d,%d,%d,%d,%d,%d,%d,%d,%d,1);",
|
||||
@@ -241,7 +246,8 @@ if ($r === FightRequest::BATTLE_RAZDEL_ENDED) {
|
||||
[$zg['id']]
|
||||
);
|
||||
foreach ($users as $user) {
|
||||
${'tm' . $user['team']} .= '<b>' . $user['login'] . '</b> [' . $user['level'] . ']<a href="info/' . $user['id'] . '" target="_blank"><img src="' . Config::img() . '/i/inf_capitalcity.gif" title="Инф. о ' . $user['login'] . '" alt="inf"></a><br>';
|
||||
${'tm' . $user['team']} .= '<b>' . $user['login'] . '</b> [' . $user['level'] . ']<a href="info/' . $user['id'] . '" target="_blank"><img src="' . Config::img(
|
||||
) . '/i/inf_capitalcity.gif" title="Инф. о ' . $user['login'] . '" alt="inf"></a><br>';
|
||||
}
|
||||
if (empty($tm1)) {
|
||||
$tm1 = 'группа пока не набрана';
|
||||
@@ -353,7 +359,10 @@ if ($r === FightRequest::BATTLE_RAZDEL_ENDED) {
|
||||
}
|
||||
}
|
||||
|
||||
$btl_go = (int)$_POST['btl_go'] ?? (int)$_GET['btl_go'] ?? 0;
|
||||
$btl_go = 0;
|
||||
if (isset($_POST['btl_go']) || isset($_GET['btl_go'])) {
|
||||
$btl_go = (int)$_POST['btl_go'] ?? (int)$_GET['btl_go'];
|
||||
}
|
||||
$zv->go($btl_go);
|
||||
|
||||
if ($zv->error) {
|
||||
|
||||
@@ -67,23 +67,23 @@ if ($u->info['dnow'] == 0) {
|
||||
//Удаляем обьекты и т.д. из старых пещер
|
||||
$rb = 321; // Магический портал
|
||||
|
||||
$sp = mysql_query('SELECT * FROM `dungeon_now` WHERE `time_finish` = "0" LIMIT 50');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$cn = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dnow` = "' . $pl['id'] . '" LIMIT 1'));
|
||||
if (!isset($cn['id'])) {
|
||||
mysql_query('DELETE FROM `dungeon_bots` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"');
|
||||
mysql_query('DELETE FROM `dungeon_obj` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"');
|
||||
mysql_query('DELETE FROM `dungeon_items` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"');
|
||||
mysql_query('DELETE FROM `dungeon_bots` WHERE `dn` = "' . $pl['id'] . '" AND `for_dn` = "0"');
|
||||
mysql_query('DELETE FROM `dungeon_actions` WHERE `dn` = "' . $pl['id'] . '"');
|
||||
mysql_query('UPDATE `dungeon_now` SET `time_finish` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
|
||||
}
|
||||
}
|
||||
$cn = mysql_fetch_array(mysql_query('SELECT `id` FROM `stats` WHERE `dnow` = "' . $d->info['id'] . '" AND `id` != "' . $u->info['id'] . '" ORDER BY `exp` DESC LIMIT 1'));
|
||||
if (isset($cn['id'])) {
|
||||
$dungeonIds = Db::getColumn('select id from dungeon_now where time_finish = 0');
|
||||
$dnowIds = Db::getColumn('select id from stats where dnow in (?)', [implode(',', $dungeonIds)]);
|
||||
$diff = implode(',', array_diff($dungeonIds, $dnowIds));
|
||||
|
||||
Db::sql('delete from dungeon_bots where dn in (?) and for_dn = 0', [$diff]);
|
||||
Db::sql('delete from dungeon_obj where dn in (?) and for_dn = 0', [$diff]);
|
||||
Db::sql('delete from dungeon_items where dn in (?) and for_dn = 0', [$diff]);
|
||||
Db::sql('delete from dungeon_actions where dn in (?)', [$diff]);
|
||||
|
||||
Db::sql('update dungeon_now set time_finish = unix_timestamp() where id in (?)', [$diff]);
|
||||
unset($dungeonIds, $dnowIds, $diff);
|
||||
|
||||
$cn1 = Db::getValue('select id from stats where dnow = ? and id != ? order by exp desc limit 1', [$d->info['id'], $u->info['id']]);
|
||||
if ($cn1) {
|
||||
if ($d->info['uid'] == $u->info['id']) {
|
||||
$cn = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`sex` FROM `users` WHERE `id` = "' . $cn['id'] . '" LIMIT 1'));
|
||||
mysql_query('UPDATE `dungeon_now` SET `uid` = "' . $cn['id'] . '" WHERE `id` = "' . $d->info['id'] . '" LIMIT 1');
|
||||
$cn = Db::getRow('select id, login, sex from users where id = ?', [$cn1]);
|
||||
Db::sql('update dungeon_now set uid = ? where id = ?', [$cn['id'], $d->info['id']]);
|
||||
if ($cn['sex'] == 0) {
|
||||
if ($u->info['sex'] == 0) {
|
||||
$d->sys_chat('<b>' . $u->info['login'] . '</b> покинул подземелье, новым лидером группы стал <b>' . $cn['login'] . '</b>');
|
||||
@@ -105,22 +105,17 @@ if ($u->info['dnow'] == 0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($cn, $cn1);
|
||||
|
||||
$city = mysql_fetch_assoc(mysql_query('SELECT `id`, `city` FROM `room` WHERE `id` = "' . $rb . '" LIMIT 1'));
|
||||
mysql_query('UPDATE `stats` SET `dnow` = "0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `room` = "' . $rb . '", `city`="' . $city['city'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
||||
Db::sql('update users left join stats on users.id = stats.id set dnow = 0, room = ? where users.id = ?', [$rb, $u->info['id']]);
|
||||
//удаляем все предметы которые пропадают после выхода из пещеры
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND `dn_delete` = "1" LIMIT 1000');
|
||||
Db::sql('delete from items_users where uid = ? and (dn_delete = 1 or item_id in (1174,1189,4447))', [$u->info['id']]);
|
||||
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "' . time() . '" WHERE `uid` = "' . $u->info['id'] . '" AND (`item_id` = "1189" OR `item_id` = "4447" OR `item_id` = "1174") LIMIT 1000');
|
||||
|
||||
//header("Location: main.php");
|
||||
echo '<script type="text/javascript">window.location.href="main.php";</script>';
|
||||
die();
|
||||
exit('<script>window.location.replace("/main.php")</script>');
|
||||
}
|
||||
}
|
||||
|
||||
if ($d->point['fileadd'] == 1 && $d->point['file'] != '0' && $d->point['file'] != '') {
|
||||
if (!empty($d->point['file']) && $d->point['fileadd'] == 1) {
|
||||
$file = explode('=', $d->point['file']);
|
||||
if (file_exists('modules_data/location/' . $file[0])) {
|
||||
$information = '';
|
||||
@@ -135,7 +130,7 @@ if ($d->point['fileadd'] == 1 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
}
|
||||
|
||||
if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] != '') {
|
||||
if (!empty($d->point['file']) && $d->point['fileadd'] == 0) {
|
||||
$file = explode('=', $d->point['file']);
|
||||
if (file_exists('modules_data/location/' . $file[0])) {
|
||||
require_once('modules_data/location/' . $file[0]);
|
||||
@@ -526,11 +521,14 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
}
|
||||
|
||||
zfloor0[rz] = '<img title="' + v[1] + '" onclick="' + actionNow + '" src="<?= Config::img() ?>/1x1.gif" style="cursor: pointer; position: absolute; top: ' + new_top + 'px; left: ' + new_left + 'px; width: ' + new_w + 'px; height: ' + new_h + 'px;" />' + zfloor0[rz];
|
||||
zfloor0[rz] = '<img title="' + v[1] + '" onclick="' + actionNow + '" src="<?= Config::img(
|
||||
) ?>/1x1.gif" style="cursor: pointer; position: absolute; top: ' + new_top + 'px; left: ' + new_left + 'px; width: ' + new_w + 'px; height: ' + new_h + 'px;" />' + zfloor0[rz];
|
||||
} else {
|
||||
zfloor0[rz] = '<img title="' + v[1] + '" src="<?= Config::img() ?>/1x1.gif" style="position: absolute; top: ' + new_top + 'px; left: ' + new_left + 'px; width: ' + new_w + 'px; height: ' + new_h + 'px;" />' + zfloor0[rz];
|
||||
zfloor0[rz] = '<img title="' + v[1] + '" src="<?= Config::img(
|
||||
) ?>/1x1.gif" style="position: absolute; top: ' + new_top + 'px; left: ' + new_left + 'px; width: ' + new_w + 'px; height: ' + new_h + 'px;" />' + zfloor0[rz];
|
||||
}
|
||||
r = '<img title="obj" src="<?= Config::img() ?>/i/sprites/' + v[4] + '" class="dObj" style="position: absolute; top: ' + new_top + 'px; left: ' + new_left + 'px; width: ' + new_w + 'px; height: ' + new_h + 'px;" />';
|
||||
r = '<img title="obj" src="<?= Config::img(
|
||||
) ?>/i/sprites/' + v[4] + '" class="dObj" style="position: absolute; top: ' + new_top + 'px; left: ' + new_left + 'px; width: ' + new_w + 'px; height: ' + new_h + 'px;" />';
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -590,11 +588,14 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
if (v[5] == 'bot' || <?=$d->info['bsid'];?> > 0) {
|
||||
action = 'dialogMenu(' + v[0] + ',' + v[8] + ',' + v[7] + ',0,0,event,' + v[9] + ');';
|
||||
}
|
||||
zfloor0[rz] += '<img title="' + v[1] + '" onClick="' + action + '" src="<?= Config::img() ?>/1x1.gif" style="cursor:pointer;position:absolute;top:' + new_top + 'px;left:' + new_left + 'px;width:' + new_w + 'px;height:' + new_h + 'px;" />';
|
||||
zfloor0[rz] += '<img title="' + v[1] + '" onClick="' + action + '" src="<?= Config::img(
|
||||
) ?>/1x1.gif" style="cursor:pointer;position:absolute;top:' + new_top + 'px;left:' + new_left + 'px;width:' + new_w + 'px;height:' + new_h + 'px;" />';
|
||||
} else {
|
||||
zfloor0[rz] += '<img title="' + v[1] + '" src="<?= Config::img() ?>/1x1.gif" style="position:absolute;top:' + new_top + 'px;left:' + new_left + 'px;width:' + new_w + 'px;height:' + new_h + 'px;" />';
|
||||
zfloor0[rz] += '<img title="' + v[1] + '" src="<?= Config::img(
|
||||
) ?>/1x1.gif" style="position:absolute;top:' + new_top + 'px;left:' + new_left + 'px;width:' + new_w + 'px;height:' + new_h + 'px;" />';
|
||||
}
|
||||
r = '<img title="user" src="<?= Config::img() ?>/chars/' + v[3] + '/' + v[4] + '.gif" class="dUser" style="position:absolute;top:' + new_top + 'px;left:' + new_left + 'px;width:' + new_w + 'px;height:' + new_h + 'px;" />';
|
||||
r = '<img title="user" src="<?= Config::img(
|
||||
) ?>/chars/' + v[3] + '/' + v[4] + '.gif" class="dUser" style="position:absolute;top:' + new_top + 'px;left:' + new_left + 'px;width:' + new_w + 'px;height:' + new_h + 'px;" />';
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -823,7 +824,7 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
left: -6px;
|
||||
/ / background-image: url("<?= Config::img() ?> /drgn/bg/r.gif");
|
||||
/ / background-image: url("<?= Config::img() ?> /drgn/bg/r.gif");
|
||||
}
|
||||
</style>
|
||||
</table>
|
||||
@@ -879,7 +880,8 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
|
||||
if(!empty($sb1) && $sb1['x'] == $pl['x'] && $sb1['y'] == $pl['y'] ) {
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Шайба!\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img() . '/i/move/shb.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Шайба!\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img(
|
||||
) . '/i/move/shb.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
}elseif ($u->info['x'] == $pl['x'] && $u->info['y'] == $pl['y']) {
|
||||
if ($d->info['id2'] == 15) {
|
||||
$tmbth = 4;
|
||||
@@ -889,9 +891,11 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
} elseif ($tm['team'] == 2) {
|
||||
$tmbth = 2;
|
||||
}
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Это Вы\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img() . '/i/move/p' . $tmbth . '/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Это Вы\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img(
|
||||
) . '/i/move/p' . $tmbth . '/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
} else {
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Это Вы\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img() . '/i/move/p1/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Это Вы\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img(
|
||||
) . '/i/move/p1/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
}
|
||||
} elseif ($d->info['id2'] == 15) {
|
||||
$tmbth = 4;
|
||||
@@ -907,12 +911,15 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
)
|
||||
);
|
||||
if (isset($tbshin['id'])) {
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Шайба!\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img() . '/i/move/shb.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
echo '$("#min_' . $pl['x'] . '_' . $pl['y'] . '").html("<img class=\"u_rot' . $u->info['s'] . '\" title=\"Шайба!\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img(
|
||||
) . '/i/move/shb.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
} else {
|
||||
echo '$("#min_' . $uxy[$pl['x'] . '_' . $pl['y']]['x'] . '_' . $uxy[$pl['x'] . '_' . $pl['y']]['y'] . '").html("<img class=\"u_rot' . $uxy[$pl['x'] . '_' . $pl['y']]['s'] . '\" title=\"' . $uxy[$pl['x'] . '_' . $pl['y']]['login'] . '\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img() . '/i/move/p' . $tmbth . '/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
echo '$("#min_' . $uxy[$pl['x'] . '_' . $pl['y']]['x'] . '_' . $uxy[$pl['x'] . '_' . $pl['y']]['y'] . '").html("<img class=\"u_rot' . $uxy[$pl['x'] . '_' . $pl['y']]['s'] . '\" title=\"' . $uxy[$pl['x'] . '_' . $pl['y']]['login'] . '\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img(
|
||||
) . '/i/move/p' . $tmbth . '/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
}
|
||||
}elseif (isset($uxy[$pl['x'] . '_' . $pl['y']])) {
|
||||
echo '$("#min_' . $uxy[$pl['x'] . '_' . $pl['y']]['x'] . '_' . $uxy[$pl['x'] . '_' . $pl['y']]['y'] . '").html("<img class=\"u_rot' . $uxy[$pl['x'] . '_' . $pl['y']]['s'] . '\" title=\"' . $uxy[$pl['x'] . '_' . $pl['y']]['login'] . '\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img() . '/i/move/p4/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
echo '$("#min_' . $uxy[$pl['x'] . '_' . $pl['y']]['x'] . '_' . $uxy[$pl['x'] . '_' . $pl['y']]['y'] . '").html("<img class=\"u_rot' . $uxy[$pl['x'] . '_' . $pl['y']]['s'] . '\" title=\"' . $uxy[$pl['x'] . '_' . $pl['y']]['login'] . '\" style=\"margin:2px 3px 3px 2px;background-image:url(' . Config::img(
|
||||
) . '/i/move/p4/d0.gif)\" src=\"' . Config::img() . '/1x1.gif\" width=\"7\" height=\"7\">");';
|
||||
} elseif( isset($bxy[$pl['x'] . '_' . $pl['y']]) ) {
|
||||
|
||||
$bobrz = $bxy[$pl['x'] . '_' . $pl['y']]['obraz'];
|
||||
@@ -924,7 +931,8 @@ if ($d->point['fileadd'] == 0 && $d->point['file'] != '0' && $d->point['file'] !
|
||||
}
|
||||
|
||||
?>
|
||||
$("#min_<?=$bxy[$pl['x'] . '_' . $pl['y']]['x']?>_<?=$bxy[$pl['x'] . '_' . $pl['y']]['y']?>").html("<div style='position:relative; display:inline-block; width:1px; height:1px;'><img class='dBot' title='<?=$bxy[$pl['x'] . '_' . $pl['y']]['login']?>' src='<?= Config::img() ?>/chars/<?=$bxy[$pl['x'] . '_' . $pl['y']]['sex']?>/<?=$bobrz?>'></div>");
|
||||
$("#min_<?=$bxy[$pl['x'] . '_' . $pl['y']]['x']?>_<?=$bxy[$pl['x'] . '_' . $pl['y']]['y']?>").html("<div style='position:relative; display:inline-block; width:1px; height:1px;'><img class='dBot' title='<?=$bxy[$pl['x'] . '_' . $pl['y']]['login']?>' src='<?= Config::img(
|
||||
) ?>/chars/<?=$bxy[$pl['x'] . '_' . $pl['y']]['sex']?>/<?=$bobrz?>'></div>");
|
||||
<?php
|
||||
}
|
||||
$css = rtrim($css, ',');
|
||||
|
||||
@@ -15,7 +15,7 @@ if ($u->room['file'] != 'dungeon_enter_all') {
|
||||
$error = ''; // Собираем ошибки.
|
||||
$dungeonGroupList = ''; // Сюда помещаем список Групп.
|
||||
$dungeonGo = 1; // По умолчанию, мы идем в пещеру.
|
||||
$dungeon = Db::getRow('select id as room, city, dungeon_room as d_room, shop, dungeon_id as id, dungeon_name as name from dungeon_room where id = ?', [$u->room['id']]);
|
||||
$dungeon = Db::getRow('select id as room, city, dungeon_room as d_room, shop, dungeon_id as id, dungeon_name as name from dungeon_room where id = ?', [$u->room['id']]) ?: [];
|
||||
$zv = [];
|
||||
|
||||
$dunname = [
|
||||
@@ -656,61 +656,61 @@ if ($roomSection == 1) {
|
||||
if (!isset($hgo1['id'])) { ?>
|
||||
<button class="btn btn-success" onclick="location.href='/main.php?rz=1&add_quest=1&city_quest=capitalcity'">Пещера Тысячи Проклятий</button>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo1['time'] - time()) ?> (Пещера Тысячи Проклятий)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo1['time'] - time()) ?> (Пещера Тысячи Проклятий)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=capitalcity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo2['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Бездна' onclick='location="main.php?rz=1&add_quest=1&city_quest=angelscity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo2['time'] - time()) ?> (Бездна)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo2['time'] - time()) ?> (Бездна)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=angelscity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo3['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Грибница' onclick='location="main.php?rz=1&add_quest=1&city_quest=suncity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo3['time'] - time()) ?> (Грибница)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo3['time'] - time()) ?> (Грибница)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=suncity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo4['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Катакомбы' onclick='location="main.php?rz=1&add_quest=1&city_quest=demonscity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo4['time'] - time()) ?> (Катакомбы)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo4['time'] - time()) ?> (Катакомбы)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=demonscity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo5['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Водосток' onclick='location="main.php?rz=1&add_quest=1&city_quest=dreamscity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo5['time'] - time()) ?> (Водосток)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo5['time'] - time()) ?> (Водосток)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=dreamscity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo6['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Гора Легиона' onclick='location="main.php?rz=1&add_quest=1&city_quest=abandonedplain"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo6['time'] - time()) ?> (Гора Легиона)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo6['time'] - time()) ?> (Гора Легиона)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=abandonedplain"'/>
|
||||
<?php }
|
||||
if (!isset($hgo7['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Излом Хаоса' onclick='location="main.php?rz=1&add_quest=1&city_quest=izlom16"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo7['time'] - time()) ?> (Излом Хаоса)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo7['time'] - time()) ?> (Излом Хаоса)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=izlom16"'/>
|
||||
<?php }
|
||||
if (!isset($hgo8['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Пещеры Мглы' onclick='location="main.php?rz=1&add_quest=1&city_quest=sandcity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo8['time'] - time()) ?> (Пещера Мглы)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo8['time'] - time()) ?> (Пещера Мглы)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=sandcity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo9['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Потерянный Вход' onclick='location="main.php?rz=1&add_quest=1&city_quest=emeraldscity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo9['time'] - time()) ?> (Потерянный Вход)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo9['time'] - time()) ?> (Потерянный Вход)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=emeraldscity"'/>
|
||||
<?php }
|
||||
if (!isset($hgo10['id'])) { ?>
|
||||
<input class="btn btn-success" type='button' value='Туманные Низины' onclick='location="main.php?rz=1&add_quest=1&city_quest=devilscity"'/>
|
||||
<?php } else { ?>
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= $u->timeOut(60 * 60 * 24 + $hgo10['time'] - time()) ?> (Туманные Низины)'
|
||||
<input disabled="disabled" class="btn btn-danger" type='button' value='Задание будет через <?= Conversion::secondsToTimeout(60 * 60 * 24 + $hgo10['time'] - time()) ?> (Туманные Низины)'
|
||||
onclick='location="main.php?rz=1&add_quest=1&city_quest=devilscity"'/>
|
||||
<?php }
|
||||
?>
|
||||
@@ -990,9 +990,9 @@ if ($roomSection == 1) {
|
||||
<table>
|
||||
<?php
|
||||
foreach ($dungeon['list'] as $key => $val) {
|
||||
if ($u->rep['rep' . $val] >= 0) {
|
||||
if ($u->rep['rep' . $val] > 0) {
|
||||
echo '<tr>
|
||||
<td width="200">Репутация в ' . ucfirst(str_replace('city', ' city', $val)) . ':</td>
|
||||
<td width="200">' . ucfirst(str_replace('city', ' city', $val)) . ':</td>
|
||||
<td>' . $u->rep['rep' . $val] . ' ед. </td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user