Удаление цветочного магазина. #54

This commit is contained in:
2023-07-19 16:06:13 +03:00
parent 5df55f8623
commit 89a8c47471
3 changed files with 6 additions and 447 deletions
+6 -45
View File
@@ -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'],
@@ -575,7 +536,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]];
@@ -793,7 +754,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 +1015,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]];