1 #include <infocon.style>
3 <page func=InfoCon title="Kontoführung">
5 <h3 align=center><font face="Helvetica,Arial"> - <?
6 $both = explode (":", $blzkto);
7 printf ("BLZ %s, Konto %s", $both[0], $both[1]);
10 <table width=100% border=0 cellpadding=2 cellspacing=0>
12 <th width=10%><font face="Helvetica,Arial">Datum</font></th>
13 <th width=10%><font face="Helvetica,Arial">Kategorie</font></th>
14 <th width=70%><font face="Helvetica,Arial">Verwendungszweck</font></th>
15 <th width=10%><font face="Helvetica,Arial">Betrag</font></th>
18 $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
19 or die("Unable to connect to SQL server");
21 pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!");
26 if ((strlen ($currency) > 0) && ($currency == "dm")) {
27 $table = "account_dm";
32 $where[] = "blz_kto = '$blzkto'";
34 $where[] = "datum >= '$year-01-01'";
36 $where[] = "datum < '$year-01-01'";
38 if (strlen($category)) {
39 $where[] = "category = '$category'";
41 if (strlen($from_to)) {
42 $where[] = "from_to = '$from_to'";
44 if ($input && !$output) {
45 $where[] = "$value > 0.0";
46 } elseif ($output && !$input) {
47 $where[] = "$value < 0.0";
50 $query = "SELECT datum,oid,category,descr,$value FROM $table WHERE "
51 . implode ($where, " AND ")
52 . " ORDER BY datum,oid";
53 $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
57 for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
58 $row = pg_fetch_array ($sth, $nr);
59 $color = $color=="<cold>"?"<coln>":"<cold>";
63 $date = explode (" ", $row['datum']);
64 $date = explode ("-", $date[0]);
65 $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
67 printf ("<tr bgcolor=\"#%s\">", $color);
68 printf ("<td width=\"10%%\" align=\"right\"><font face=\"Helvetica,Arial\">%s</font></td>", $date);
69 printf ("<td width=\"10%%\" align=\"center\"><font face=\"Helvetica,Arial\">%s</font></td>", $row['category']);
70 printf ("<td width=\"70%%\"><font face=\"Helvetica,Arial\"><a href=\"edit.php3?oid=%d%s\">%s</a></font></td>",
71 $row['oid'], $add, $descr[0]);
72 printf ("<td width=\"10%%\" align=\"right\"><font face=\"Helvetica,Arial\">%5.2f</font></td>", $row[$value]);
77 echo ("<th width=\"90%\" colspan=\"3\"><font face=\"Helvetica,Arial\">Summe</font></th>");
78 printf ("<th width=\"10%%\" align=\"right\"><font face=\"Helvetica,Arial\">%5.2f</font></th>", $sum);
84 <? printf ("<a href=\"edit.php3?blzkto=%s\">Neuer Eintrag</a>", $blzkto); ?>