Hanno Böck
Remove some unneeded whitespaces
Hanno Böck commited 3acbdf2 at 2023-11-26 08:28:15
<?php
/*
This file belongs to the Webinterface of schokokeks.org Hosting
Written by schokokeks.org Hosting, namely
Bernd Wurst <bernd@schokokeks.org>
Hanno Böck <hanno@schokokeks.org>
This code is published under a 0BSD license.
Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
*/
require_once('session/start.php');
require_once('inc/icons.php');
require_once('invoice.php');
require_role(ROLE_CUSTOMER);
title('Rechnungen');
$show_paid = (isset($_GET['paid']) && $_GET['paid'] == '1');
$invoices = my_invoices();
$first = true;
$invoices_to_show = [];
foreach ($invoices as $i) {
if ($first || $show_paid || $i['bezahlt'] == 0) {
$first = false;
array_push($invoices_to_show, $i);
}
}
if (count($invoices_to_show) == 0) {
$error = 'Keine aktuelle Rechnung gefunden.';
if (count($invoices) == 0) {
$error = 'Bisher keine Rechnungen vorhanden.';
}
if ($show_paid) {
}
output('<p><em>' . $error . '</em></p>');
} else {
if ($show_paid) {
output('<p>Hier können Sie Ihre bisherigen Rechnungen einsehen und herunterladen.</p>');
} else {
output('<p>Hier sehen Sie Ihre neueste Rechnung. Ältere, bereits bezahlte Rechnungen können sie über den untenstehenden Link einblenden.</p>');
}
output('<table class="nogrid"><tr><th>Nr.</th><th>Datum</th><th>Gesamtbetrag</th><th>bezahlt?</th><th>Herunterladen</th></tr>');
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX