<?php
/**
* @package J4.Module
* @subpackage mod_kalkulator
*
* @copyright Copyright (C) 2022 ROD Lubocza Wszystkie prawa zastrzeżone.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Factory;
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id', 'nazwa', 'powierzchnia', 'status')))
->from($db->quoteName('#__kalk_dzialki'))
->where($db->quoteName('status') . ' = ' . $db->quote(1))
->order($db->quoteName('id') . ' ASC');
$db->setQuery($query);
//echo $db->replacePrefix((string) $query);
//$results = $db->loadAssocList();
$results = $db->loadObjectList();
?>
<div class="kalkulator">
<div id="kalk" class="mb-3">
<form action="" method="post">
<select id="select" class="form-select" aria-label="Default select" autocomplete="off">
<option value="" hidden selected="selected">Wybierz działkę</option>
<?php foreach ($results as $row){ ?>
<option value="<?php echo $row->id; ?>"><?php echo $row->nazwa; ?></option>
<?php }?>
</select>
</form>
</div>
<table class="table">
<tbody>
<tr class="table-success"><td class="col-6 fw-bold">Numer działki</td><td class="col-3"></td><td class="col-3 text-center fw-bold"><div id="kalnazwa"></div></td></tr>
<tr><td>Powierzchnia:</td><td class="col-3 text-center">m2</td><td class="col-3 text-end"><div id="kalpowierzchnia"></div></td></tr>
<tr><td class="col-6">Stawka opłaty ogrodowej</td><td class="col-3 text-center">0.69 za m2</td><td class="col-3 text-end"><?php echo $stawka;end"><div ?><id="kalstawka"></div></td></tr>
<tr><td class="col-6">Partycypacja</td><td class="col-3 text-center">0.09 za m2</td><td class="col-3 text-end"><div id="kalpartycypacja"></div></td></tr>
<tr><td class="col-6">Składka członkowska</td><td class="col-3 text-center">od działki</td><td class="col-3 text-end"><div id="kalskladka"></div></td></tr>
<tr><td class="col-6">Opłata za wodę</td><td class="col-3 text-center">od działki</td><td class="col-3 text-end"><div id="kalwoda"></div></td></tr>
<tr><td class="col-6">Opłata za śmieci</td><td class="col-3 text-center">od działki</td><td class="col-3 text-end"><div id="kalsmieci"></div></td></tr>
<tr><td class="col-6">Opłata energetyczna</td><td class="col-3 text-center">od działki</td><td class="col-3 text-end"><div id="kalenergia"></div></td></tr>
<tr><td class="col-6">Opłata inwestycyjna</td><td class="col-3 text-center">od działki</td><td class="col-3 text-end"><div id="kalinwestycyjna"></div></td></tr>
<tr class="table-success"><td class="col-6 fw-bold">Do zapłaty</td><td class="col-3 text-center"></td><td class="col-3 text-end fw-bold"><div id="kaldozaplaty"></div></td></tr>
</tbody>
</table>
</div>
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user