Merge
This commit is contained in:
+17
-54
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Core\Config;
|
||||
use Core\ConversionHelper;
|
||||
use Core\Database;
|
||||
use Core\Db;
|
||||
|
||||
@@ -105,47 +106,7 @@ if (empty($itm)) {
|
||||
|
||||
function timeOut($ttm)
|
||||
{
|
||||
$out = '';
|
||||
$time_still = $ttm;
|
||||
$tmp = floor($time_still / 2592000);
|
||||
$id = 0;
|
||||
if ($tmp > 0) {
|
||||
$id++;
|
||||
if ($id < 3) {
|
||||
$out .= $tmp . " мес. ";
|
||||
}
|
||||
$time_still = $time_still - $tmp * 2592000;
|
||||
}
|
||||
$tmp = floor($time_still / 86400);
|
||||
if ($tmp > 0) {
|
||||
$id++;
|
||||
if ($id < 3) {
|
||||
$out .= $tmp . " дн. ";
|
||||
}
|
||||
$time_still = $time_still - $tmp * 86400;
|
||||
}
|
||||
$tmp = floor($time_still / 3600);
|
||||
if ($tmp > 0) {
|
||||
$id++;
|
||||
if ($id < 3) {
|
||||
$out .= $tmp . " ч. ";
|
||||
}
|
||||
$time_still = $time_still - $tmp * 3600;
|
||||
}
|
||||
$tmp = floor($time_still / 60);
|
||||
if ($tmp > 0) {
|
||||
$id++;
|
||||
if ($id < 3) {
|
||||
$out .= $tmp . " мин. ";
|
||||
}
|
||||
}
|
||||
if ($out == '') {
|
||||
if ($time_still < 0) {
|
||||
$time_still = 0;
|
||||
}
|
||||
$out = $time_still . ' сек.';
|
||||
}
|
||||
return $out;
|
||||
ConversionHelper::secondsToTimeout($ttm);
|
||||
}
|
||||
|
||||
if (empty($itm['id']) && !empty($_GET['id'])) {
|
||||
@@ -153,7 +114,7 @@ if (empty($itm['id']) && !empty($_GET['id'])) {
|
||||
} else {
|
||||
$data = Db::getValue('select data from items_main_data where items_id = ?', [$itm['id']]);
|
||||
}
|
||||
$itd = !empty($data) ? \Core\ConversionHelper::dataStringToArray($data) : [];
|
||||
$itd = !empty($data) ? ConversionHelper::dataStringToArray($data) : [];
|
||||
|
||||
$items = [
|
||||
'tr' => ['lvl', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9', 's10', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'mg1', 'mg2', 'mg3', 'mg4', 'mg5', 'mg6', 'mg7', 'mall', 'm2all', 'aall'],
|
||||
@@ -176,7 +137,7 @@ $rz[$rt[$itm['type']]][1] ??= 'Прочие предметы';
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
|
||||
|
||||
<title>Бойцовский клуб |
|
||||
Библиотека <?php if (isset($itm['id'])) { ?> | <?= $rz[$rt[$itm['type']]][1] ?> | <?= $itm['name'] ?><?php } ?></title>
|
||||
<link href="/main1.css" rel="stylesheet" type="text/css">
|
||||
@@ -292,14 +253,16 @@ $rz[$rt[$itm['type']]][1] ??= 'Прочие предметы';
|
||||
<img style="display:block" src="<?php if (file_exists(
|
||||
Config::get('img') . '/i/big/3d' . str_replace(
|
||||
'.gif', '', str_replace(
|
||||
'.png', '', $itm['img']
|
||||
)
|
||||
'.png', '', $itm['img']
|
||||
)
|
||||
) . '.jpg'
|
||||
)) { Config::img() ?>/i/big/3d<?= str_replace(
|
||||
'.gif', '', str_replace(
|
||||
'.png', '', $itm['img']
|
||||
)
|
||||
) ?>.jpg<?php } else { Config::img() ?>/i/big/back.jpg<?php } ?>" alt=""
|
||||
)) {
|
||||
Config::img() ?>/i/big/3d<?= str_replace(
|
||||
'.gif', '', str_replace(
|
||||
'.png', '', $itm['img']
|
||||
)
|
||||
) ?>.jpg<?php } else {
|
||||
Config::img() ?>/i/big/back.jpg<?php } ?>" alt=""
|
||||
width="480" height="360" border=1 id="bigim">
|
||||
</td>
|
||||
<td width="12" background="<?= Config::img() ?>/i/encicl/line_right_13.gif">
|
||||
@@ -575,7 +538,7 @@ $rz[$rt[$itm['type']]][1] ??= 'Прочие предметы';
|
||||
//действие комплекта
|
||||
$i1c = 0;
|
||||
$i2c = 0;
|
||||
$i1e = \Core\ConversionHelper::dataStringToArray($itmc['data']);
|
||||
$i1e = ConversionHelper::dataStringToArray($itmc['data']);
|
||||
while ($i1c < count($items['add'])) {
|
||||
if (isset($i1e[$items['add'][$i1c]])) {
|
||||
$i3c = $i1e[$items['add'][$i1c]];
|
||||
@@ -648,7 +611,7 @@ $rz[$rt[$itm['type']]][1] ??= 'Прочие предметы';
|
||||
</table>
|
||||
<p>
|
||||
</td>
|
||||
<!-- End of text -->
|
||||
<!-- End of text -->
|
||||
<td style='padding-left: 3' align=right>
|
||||
<img id="imright" height=144
|
||||
src="//img.new-combats.tech/i/encicl/pict_<?= $rz[$rt[$itm['type']]][0] ?>.jpg" width=139
|
||||
@@ -793,7 +756,7 @@ $rz[$rt[$itm['type']]][1] ??= 'Прочие предметы';
|
||||
$itd = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `items_main_data` WHERE `items_id` = ' . $itm['id'])
|
||||
);
|
||||
$itd = \Core\ConversionHelper::dataStringToArray($itd['data']);
|
||||
$itd = ConversionHelper::dataStringToArray($itd['data']);
|
||||
?>
|
||||
<br>
|
||||
<table width="100%" border="0" align=center cellpadding="0" cellspacing="0">
|
||||
@@ -1054,7 +1017,7 @@ $rz[$rt[$itm['type']]][1] ??= 'Прочие предметы';
|
||||
//действие комплекта
|
||||
$i1c = 0;
|
||||
$i2c = 0;
|
||||
$i1e = \Core\ConversionHelper::dataStringToArray($itmc['data']);
|
||||
$i1e = ConversionHelper::dataStringToArray($itmc['data']);
|
||||
while ($i1c < count($items['add'])) {
|
||||
if (isset($i1e[$items['add'][$i1c]])) {
|
||||
$i3c = $i1e[$items['add'][$i1c]];
|
||||
|
||||
Reference in New Issue
Block a user