Файл: html/action.php
Строк: 27
<?php
require_once 'system/header.php';
require_once 'system/func.php';
$actio = $mc->query("SELECT * FROM `action` ");
if($actio->num_rows >0){
$action = $actio->fetch_all(MYSQLI_ASSOC);
?>
<center>--специальные акции--</center><?php
for($i = 0; $i < count($action); $i++){
$shops = explode(",",$action[$i]['id_shop']);
?>
<table class="table_block2">
<tr>
<td class="block101" style="width: 2%"></td>
<td class="block102" style="width: 96%"></td>
<td class="block103" style="width: 2%"></td>
</tr>
<tr>
<td class="block104" style="width: 2%"></td>
<td class="block105" style="width: 96%;text-align: center;">
<center>
--<?= $action[$i]['name'];?>--<br><br><?php
for($j = 0; $j < count($shops); $j++){
$shop = $mc->query("SELECT * FROM `shop` WHERE `id` = '".$shops[$j]."'")->fetch_array(MYSQLI_ASSOC);
?>
<?=$shop['name']."<br>";?><?php
} ?><br><br></center>
<span style="text-align: left"> Цена: <?=$action[$i]['money']." рублей";?></span>
<td class="block106" style="width: 2%"></td>
</tr>
<tr>
<td class="block107"></td>
<td class="block108"></td>
<td class="block109"></td>
</tr>
</table>
<?php
}
}else{
echo "Акции пока недоступны";
}
$footval = "bank";
require_once ('system/foot/foot.php');
?>