forked from Strassenkehrer/akk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
einnahmen.php
43 lines (42 loc) · 1.08 KB
/
einnahmen.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
$id="einnahmen";
ini_set('include_path', 'inc');
include("db.php");
include("define.php");
include("head.php");
$db = new mydb();
$sql = "SELECT p.mitgliedsnummer, a.nachname, a.vorname, p.gezahlt, p.akkrediteur, p.geaendert, p.kommentar FROM tblpay p JOIN tblakk a ON p.akkID = a.akkID ORDER BY p.geaendert";
$q=$db->query($sql);
echo "<table class='table table-borderes'>\n";
echo "<thead><tr>";
th("Mnr");
th("Nachname");
th("Vorname");
th("gezahlt");
th("Akkrediteur");
th("Zeitpunkt");
th("Bemerkung");
echo "</tr></thead>\n";
echo "<tbody>";
while ($row=$q->fetch()) {
echo "<tr>\n";
td($row['mitgliedsnummer'],"r");
td($row['nachname']);
td($row['vorname']);
tdz($row['gezahlt']);
td($row['akkrediteur']);
td($row['geaendert']);
td($row['kommentar']);
echo "</tr>\n";
}
$sql = "SELECT sum(gezahlt) as gesamt FROM tblpay";
$q=$db->query($sql);
$row=$q->fetch();
echo "</tbody>";
echo "<tfoot>";
echo "<tr><td colspan='3'>Gesamt</td>";
tdz($row['gesamt']);
echo "<td colspan='4'> </td>";
echo "</tr></tfoot>\n";
echo "</table>\n";
include("footer.php");