Use new object-oriented backend
[infodrom.org/service.infodrom.org] / src / InfoCon / account / admin.wml
1 #include <infocon.style>
2
3 <future>
4 <page func=InfoCon title="Kontoführung">
5
6 <blockquote>
7
8 <style type="text/css">
9 label {
10   display: block;
11   font-weight: bold;
12   font-size: 12px;
13   width: 160px;
14   text-align: left;
15   padding-left: 5px;
16   padding-top: 0px;
17   padding-bottom: 0px;
18   background-color: #1aa2fe;
19   color: white;
20 }
21 input.entry {
22   display: block;
23   width: 550px;
24   margin-bottom: 10px;
25   border: solid #1aa2fe;
26   border-width: 1px;
27 }
28 </style>
29
30 <p>Sichtbare Konten:</p>
31
32 <form action=update.php method=post>
33 <input type=hidden name=formtype value=admin>
34
35 <?
36   $query = "SELECT blz_kto,name,display,date_part('year',min(datum)) AS year_from,date_part('year', max(datum)) AS year_to " .
37            "FROM account_names JOIN account using(blz_kto) " .
38            "GROUP BY blz_kto,name,display ORDER BY name";
39   foreach ($db->fetchAssocList($query) as $row) {
40     $both = explode (":", $row['blz_kto']);
41     printf ("<br><input type=\"checkbox\" name=\"display_%s\" value=\"1\"%s>&nbsp;".
42             "<input type=\"text\" name=\"name_%s\" value=\"%s\" size=\"30\">&nbsp;".
43             "(%d - %d, Kto %s, BLZ %s)",
44            $row['blz_kto'],
45            $row['display'] == 1 ? " checked" : "",
46            $row['blz_kto'],
47            $row['name'],
48            $row['year_from'], $row['year_to'],
49            $both[1], $both[0]);
50   }
51 ?>
52 <p><center><input class=button type=submit value="Update"></center><p>
53 </form>
54
55 <p>&nbsp;</p>
56
57
58 <p>Neues Konte einrichten</p>
59
60 <form action=update.php method=post>
61 <input type=hidden name=formtype value=newaccount>
62
63 <br class="none">
64 <label for=blz>Bankleitzahl</label>
65 <input class=entry id=blz name=blz size=40 maxlength=20>
66
67 <br class="none">
68 <label for=kto>Kontonummer</label>
69 <input class=entry id=kto name=kto size=40 maxlength=40>
70
71 <br class="none">
72 <label for=name>Name</label>
73 <input class=entry id=name name=name size=40 maxlength=30>
74
75 <p><center><input class=button type=submit value="Create"> &nbsp; <input class=button type=reset value="Reset"></center><p>
76 </form>
77
78 </blockquote>
79
80 </page>
81
82 # Local variables:
83 # mode: text
84 # mode: auto-fill
85 # end: