Joywork/ajax/getCurrentEgrnTariffsTable.php

51 lines
1.9 KiB
PHP
Raw Permalink Normal View History

2026-05-22 20:21:54 +02:00
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");
if ($_SESSION['id']) {
$sql = "SELECT * from discharge_tariff";
$rez = mysql_query($sql);
$num = 1;
if (mysql_num_rows($rez) > 0) {
echo '<div style="padding-bottom: 15px; font-size: 16px;">
Здесь Вы можете выбрать подходящий пакет и заказать его. После заказа с Вами свяжется наш менеджер и расскажет дальнейшие действия.
</div>';
echo '<div class="jw__NB"><div class="jw__NB__flat-list"><table style="width: 100%"><thead><th>Кол-во выписок</th><th>Стоимость</th><th>&nbsp;</th></thead>';
while ($tariff = mysql_fetch_assoc($rez)) {
echo '<tr ';
if ($num % 2 > 0) {
echo 'style="background-color: #f9f9f9;"';
}
echo '>';
echo '<td style="width: 45%">';
echo $tariff['count'];
echo '</td>';
echo '<td style="width: 45%">';
echo $tariff['price'];
echo '<br/>';
echo '(' . ceil($tariff['price'] / $tariff['count']) . ' руб за выписку)';
echo '</td>';
echo '<td>';
?>
<div class="jw__object actionAdv">
<div class="jw__action-button with-check" style="width: 150px; text-align: center;">
<div id="pack_<?php echo $tariff['id']; ?>" style="padding-left: 8px;<?php echo $errStyle;?>" class="action-button actionJW actionAdvButton"
onclick="selectEgrnTariff(this);" data-tariff-id="<?php echo $tariff['id']; ?>">Заказать</div>
</div>
</div>
<?php
echo '</td>';
echo '</tr>';
$num++;
}
echo '</table></div></div>';
}
}