191 lines
11 KiB
PHP
191 lines
11 KiB
PHP
<?php
|
||
|
||
use Core\Config;
|
||
use Core\Db;
|
||
use Helper\Conversion;
|
||
|
||
if (!defined('GAME')) {
|
||
die();
|
||
}
|
||
|
||
if ($u->room['file'] != 'cp1') {
|
||
return;
|
||
}
|
||
if (date("H") >= 8 && date("H") <= 23) {
|
||
$now = 'day';
|
||
$tattack = '<a style="color:#D8D8D8; cursor:pointer" onclick="top.useMagic(\'Нападение на персонажа\',\'night_atack\',\'pal_button8.gif\',1,\'main.php?nightatack=1\');">Напасть на игрока</a> ';
|
||
} else {
|
||
$now = 'night';
|
||
$tattack = '';
|
||
}
|
||
|
||
function getBtc(int $id)
|
||
{
|
||
$res = Db::getValue('select res_x from stats where id = ?', [$id]);
|
||
if (!$res) {
|
||
$res = 0;
|
||
}
|
||
return $res;
|
||
}
|
||
|
||
?>
|
||
<?php if (date("H") < 23 || date("H") >= 6): ?>
|
||
<script>
|
||
function AtackNoWindow() {
|
||
var dt = document.getElementById('atackDiv');
|
||
if (dt.style.display == 'none') {
|
||
dt.style.display = '';
|
||
} else {
|
||
dt.style.display = 'none';
|
||
}
|
||
}
|
||
</script>
|
||
<?php endif; ?>
|
||
|
||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||
<tr>
|
||
<td style="width: 250px; vertical-align: top;">
|
||
<?php $usee = $u->getInfoPers($u->info['id'], 0);
|
||
if ($usee) {
|
||
echo $usee[0];
|
||
} else {
|
||
echo 'information is lost.';
|
||
} ?>
|
||
</td>
|
||
<td style="vertical-align: top; padding-top:19px;"><?php require_once('modules_data/stats_loc.php'); ?></td>
|
||
<td style="width: 500px; vertical-align: top; text-align: right;">
|
||
<div style="text-align: right">
|
||
<?php if (!empty($re)) {
|
||
echo '<b style="color: red;">' . $re . '</b>';
|
||
} ?>
|
||
<div style="position:relative; cursor: pointer;" id="ione">
|
||
<img src="<?= Config::img() ?>/city/capitalcity/<?= $now; ?>/city_capres1.jpg" alt="" width="580" height="312" id="img_ione" style="border: 1px solid black;">
|
||
<div id="buttons_on_image" style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
|
||
<?= $tattack; ?>
|
||
|
||
<span onclick="window.open('/forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Форум проекта</span>
|
||
</div>
|
||
<script>
|
||
if (document.getElementById('ione')) {
|
||
document.getElementById('ione').appendChild(document.getElementById('buttons_on_image'));
|
||
document.getElementById('buttons_on_image').style.position = 'absolute';
|
||
document.getElementById('buttons_on_image').style.bottom = '8px';
|
||
document.getElementById('buttons_on_image').style.right = '23px';
|
||
} else {
|
||
document.getElementById('buttons_on_image').style.display = 'none';
|
||
}
|
||
</script>
|
||
<div style="position:absolute; left:150px; top:40px; width:236px; height:157px; z-index:90;">
|
||
<img <?php thisInfRm('1.180.0.3'); ?> src="<?= Config::img() ?>/i/images/300x225/capital/2klub.gif" class="aFilter" alt="">
|
||
</div>
|
||
<div style="position: absolute; left: 459px; top: 155px; width: 79px; height: 88px; z-index: 91;">
|
||
<img <?php thisInfRm('1.180.0.371'); ?> src="<?= Config::img() ?>/city/capitalcity/day/loto.gif" class="aFilter" alt="">
|
||
</div>
|
||
<div style="position: absolute; left: 125px; top: 165px; width: 73px; height: 47px; z-index: 91;">
|
||
<img <?php thisInfRm('1.180.0.10'); ?> src="<?= Config::img() ?>/i/images/300x225/capital/2shop.gif" class="aFilter" alt="">
|
||
</div>
|
||
<div style="position: absolute; left: 270px; top: 158px; width: 71px; height: 45px; z-index: 91;">
|
||
<img <?php thisInfRm('1.180.0.210'); ?> src="<?= Config::img() ?>/i/images/300x225/capital/2remont.gif" class="aFilter" alt="">
|
||
</div>
|
||
<div style="position: absolute; left: 383px; top: 119px; z-index: 88;">
|
||
<img <?php thisInfRm('1.180.0.321'); ?> src="<?= Config::img() ?>/city/capitalcity/day/cp_portal.gif" class="aFilter" alt="">
|
||
</div>
|
||
<div style="position: absolute; left: 36px; top: 72px; width: 73px; height: 47px; z-index: 92;">
|
||
<img <?php thisInfRm('1.180.0.263'); ?> src="<?= Config::img() ?>/city/capitalcity/day/1ubkill.gif" class="aFilter" style="transform: scaleX(-1);" alt="">
|
||
</div>
|
||
|
||
|
||
<?php
|
||
if (Conversion::secondsToTimeout(getBtc(89489) - time()) == '0 сек.'): ?>
|
||
<div style="position:absolute; left:300px; top:168px; width:27px; height:55px; z-index:99;">
|
||
<img onclick="location.href='main.php?atak_user=89489'" src="<?= Config::img() ?>/i/images/300x225/capital/jora1.png"
|
||
width="120" height="135" title="Напасть на Слабого Трупожора" alt="">
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<?php
|
||
if (Conversion::secondsToTimeout(getBtc(903093) - time()) == '0 сек.'): ?>
|
||
<div style="position:absolute; left:100px; top:175px; width:27px; height:55px; z-index:99;">
|
||
<img onclick="location.href='main.php?atak_user=903093'" src="<?= Config::img() ?>/i/images/300x225/capital/jora2.png"
|
||
width="120" height="150" title="Напасть на Сильного Трупожора" alt="">
|
||
</div>
|
||
<?php endif; ?>
|
||
|
||
<?php if (date('d.m') == '31.10' || (date('m') == 11 && date('d') < 7)): /* Хэллоуин */ ?>
|
||
<div style="position: absolute; left: 219px; top: 171px; width: 32px; height: 43px; z-index: 91;">
|
||
<img onclick="location.href='main.php?talk=5'" title="Диалог с Тыквоголовым"
|
||
src="<?= Config::img() ?>/loca/cp11/sun_pmd.gif" width="32" height="43" class="aFilter" alt="">
|
||
</div>
|
||
<?php endif;
|
||
if (date('m') == 12 || date('m') == 1): /*Ёлка*/ ?>
|
||
<div style="position: absolute; left: 212px; top: 133px; width: 32px; height: 43px; z-index: 91;">
|
||
<img <?php thisInfRm('1.180.0.208'); ?>src="<?= Config::img() ?>/newyear2014.png" width="60"
|
||
height="90" title="" class="aFilter" alt="">
|
||
</div>
|
||
<?php endif; ?>
|
||
<div style="position:absolute; left:535px; top:225px; width:30px; height:54px; z-index:94;">
|
||
<img <?php thisInfRm('1.180.0.11'); ?>src="<?= Config::img() ?>/i/images/300x225/capital/2strelka.gif"
|
||
width="30" height="54" class="aFilter" alt="">
|
||
</div>
|
||
<div id="snow"></div>
|
||
<?= $goline; ?>
|
||
</div>
|
||
<?php
|
||
if (date("H") < 6 || date("H") >= 22): ?>
|
||
<div id="atackDiv" style="display:none; text-align: center;">
|
||
<div style="width:300px; padding:3px; margin:7px; background-color:#CCCCCC; border:1px solid #575757;">
|
||
<form method="post" action="/main.php"> Введите логин жертвы:<br/>
|
||
<input name="atack" type="text" id="atack" size="35" maxlength="30"/>
|
||
<input type="submit" name="button" id="button" class="btn" value="OK"/>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<?php endif; ?>
|
||
<!-- -->
|
||
<div style="width:580px; text-align:left; background-color:#D3D3D3;">
|
||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||
↣
|
||
<a href="#" class="menutop" id="greyText" onclick="location='main.php?loc=1.180.0.3&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.3', 1); ?>">
|
||
Бойцовский Клуб
|
||
</a>
|
||
</span>
|
||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||
↣
|
||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.10&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.10', 1); ?>">
|
||
Магазин
|
||
</a>
|
||
</span>
|
||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||
↣
|
||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.210&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.210', 1); ?>">
|
||
Ремонтная Мастерская
|
||
</a>
|
||
</span>
|
||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||
↣
|
||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.321&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.321', 1); ?>">
|
||
Магический Портал
|
||
</a>
|
||
</span>
|
||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||
↣
|
||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.11&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.11', 1); ?>">
|
||
Страшилкина Улица
|
||
</a>
|
||
</span>
|
||
<span style="white-space:nowrap; padding-left:3px; padding-right:3px; height:10px">
|
||
↣
|
||
<a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.263&rnd=<?= $code; ?>';" title="<?php thisInfRm('1.180.0.263', 1); ?>">
|
||
Башня Смерти
|
||
</a>
|
||
</span>
|
||
</div>
|
||
<!-- -->
|
||
<div style="display:none; height:0;" id="moveto"></div>
|
||
<HR>
|
||
<BR><?= $rowonmax; ?><BR>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</table>
|