- fix possible error in usage-report if customer has no traffic (traffic = 0)
- fix another missing hidden-field in classic-theme template Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -207,7 +207,11 @@ while($row = $db->fetch_array($result))
|
||||
|
||||
while($customer = $db->fetch_array($customers))
|
||||
{
|
||||
$mail_body.= sprintf('%-15s', $customer['loginname']) . ' ' . sprintf('%-12d', $customer['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($customer['traffic_used_total'] * 100) / $customer['traffic'])) . ') ' . $customer['traffic'] . "\n";
|
||||
if ($customer['traffic'] >= 0) {
|
||||
$mail_body.= sprintf('%-15s', $customer['loginname']) . ' ' . sprintf('%-12d', $customer['traffic_used_total']) . ' (' . sprintf('%00.3f%%', (($customer['traffic_used_total'] * 100) / $customer['traffic'])) . ') ' . $customer['traffic'] . "\n";
|
||||
} else {
|
||||
$mail_body.= sprintf('%-15s', $customer['loginname']) . ' ' . sprintf('%-12d', $customer['traffic_used_total']) . ' (' . sprintf('%00.3f%%', $customer['traffic_used_total']) . ') ' . $customer['traffic'] . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$mail_body.= '---------------------------------------------' . "\n";
|
||||
|
||||
@@ -4,6 +4,7 @@ $header
|
||||
<input type="hidden" name="page" value="$page" />
|
||||
<input type="hidden" name="action" value="$action" />
|
||||
<input type="hidden" name="id" value="$id" />
|
||||
<input type="hidden" name="send" value="send" />
|
||||
<table cellpadding="5" cellspacing="4" border="0" align="center" class="maintable_60">
|
||||
<tr>
|
||||
<td class="maintitle" colspan="2"><b><img src="images/Classic/title.gif" alt="{$title}" /> {$title}</b></td>
|
||||
|
||||
Reference in New Issue
Block a user