- 17, May 2024
- #1
Привет, ребята, наконец-то разобрались с множеством файлов, но этот — я его ненавижу!
У меня работало отображение всех пяти строк, но теперь отображается только первая.
Пожалуйста, что случилось? ------------------------------ код:
квартира арендатора арендная плата оплачена причитающаяся арендная плата причитающаяся арендная плата просрочена chg сек. tenant1 apt1 $540,00 $530,00 $0,00 $10,00 $0,00 $0,00 $0,00 $0,00 $0,00 $540,00 20.12.2020 L Всего выплачено: 540,00
Пожалуйста, что случилось? ------------------------------ код:
<?php error_reporting (E_ALL ^ E_NOTICE);
// Include config file
require_once "getprerentdb.php";
//MySqli Select Query
$results = $mysqli->query ("SELECT * FROM paytbl");
//Print version
//Set at what record to break at 25 records per page
$BreakAT=25;
$num=0;
$pagenum = 1;
$totpaid=0;
// ---------------------------------------
while($row = mysqli_fetch_array($results)) {
// ----------------------------------------
if($num % $BreakAT == 0)
{
if($num>0)
{ echo '</table class="print">';
echo '<div class="breakhere"></div>';
$pagenum++; }
echo date('m/d/y');
echo " Page " . $pagenum;
?>
<div class="title">Payment Report</div><br />
<table align="center" cellspacing=0 cellpadding=0 border=1>
<thead>
<tr>
<th>tenant</th>
<th>unit</th>
<th>rent paid</th>
<th>rent due</th>
<th>prev bal</th>
<th>late chg</th>
<th>sec dep</th>
<th>damage</th>
<th>court cost</th>
<th>nsf</th>
<th>hud pay</th>
<th>tenant pay</th>
<th>date paid</th>
<th>late</th>
<th align=left>comment</th>
</tr>
</thead>
<?php
$totpaid += $row['paidsum'];
echo '
<tr>
<td>' . $row['tenant'] . '</td>
<td>' . $row['unit'] . '</td>
<td align=right class="currency">$'.number_format($row['rentpaid'],2).'</td>
<td align=right class="currency">$'.number_format($row['rentdue'],2).'</td>
<td align=right class="currency">$'.number_format($row['prevbal'],2).'</td>
<td align=right class="currency">$'.number_format($row['latechg'],2).'</td>
<td align=right class="currency">$'.number_format($row['secdep'],2).'</td>
<td align=right class="currency">$'.number_format($row['damage'],2).'</td>
<td align=right class="currency">$'.number_format($row['courtcost'],2).'</td>
<td align=right class="currency">$'.number_format($row['nsf'],2).'</td>
<td align=right class="currency">$'.number_format($row['hudpay'],2).'</td>
<td align=right class="currency">$'.number_format($row['paidsum'],2).'</td>
<td>' . $row['datepaid'] . '</td>
<td>' . $row['late'] . '</td>
<td>' . $row['comments'] . '</td>
</tr>';
$num++;
}
}
echo '
<tr>
<th scope="row" colspan="11">Total Paid:</th>
<td bgcolor="#FFD4D4" class="currency">' . number_format($totpaid, 2, '.', '') . '</td>
</tr>
</table>';
?>
</center></div></body></html>
PHP: ------------------------------
результат:
11.04.21 Страница 1
Отчет о платежах
квартира арендатора арендная плата оплачена причитающаяся арендная плата причитающаяся арендная плата просрочена chg сек. tenant1 apt1 $540,00 $530,00 $0,00 $10,00 $0,00 $0,00 $0,00 $0,00 $0,00 $540,00 20.12.2020 L Всего выплачено: 540,00