--- /dev/null
+#include <lt2k.style>
+
+<page title="LinuxTag 2000 - Kostenverteilung">
+
+<headline "Kostenverteilung">
+
+<?
+ $dbh = pg_pconnect ("kuolema", "5432", "lt2k")
+ or die("Unable to connect to SQL server");
+
+ if ($oid) {
+ pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!");
+
+ $query = "SELECT * FROM costs where oid = $oid";
+ $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
+
+ if (pg_NumRows ($sth) > 0) {
+ $row = pg_fetch_array ($sth, 0);
+ $date = explode (" ", $row['datum']);
+ $date = explode ("-", $date[0]);
+ $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
+ }
+ }
+?>
+
+
+<font face="Helvetica,Arial">
+<form method=post action="update.php3">
+<?
+ if ($oid) {
+ echo ("<input type=\"hidden\" name=\"oid\" value=\"$oid\">");
+ }
+?>
+
+<b>Datum:</b> <input name=datum size=60 maxlength=120 value="<? echo $date; ?>"> (dd.mm.yyyy)<br>
+<b>Kategorie:</b> <select name=category>
+<?
+ $cat="exhibition"; printf ("<option value=\"%s\"%s>%s", $cat, $cat == $row['category']?" selected":"", "Ausstellung");
+ $cat="pr"; printf ("<option value=\"%s\"%s>%s", $cat, $cat == $row['category']?" selected":"", "Öffentlichkeitsarbeit");
+ $cat="talks"; printf ("<option value=\"%s\"%s>%s", $cat, $cat == $row['category']?" selected":"", "Vorträge");
+?> </select><br>
+<b>Verwendungszweck:</b> <input name=descr size=40 maxlength=80 value="<? echo $row['descr']; ?>"> <br>
+<b>Betrag:</b> <input name=value_dm size=40 maxlength=20 value="<? echo $row['value_dm']; ?>"> (nnn.mm)<br>
+<b>Status:</b> <select name=status>
+<?
+ $cat="open"; printf ("<option value=\"%s\"%s>%s", $cat, $cat == $row['status']?" selected":"", "offen");
+ $cat="done"; printf ("<option value=\"%s\"%s>%s", $cat, $cat == $row['status']?" selected":"", "getätigt");
+ $cat="plan"; printf ("<option value=\"%s\"%s>%s", $cat, $cat == $row['status']?" selected":"", "geplant");
+?> </select><br>
+
+<p><center><input type=submit value="<? echo $oid>0?"Update":"Insert"; ?>"></center><p>
+</form>
+
+<center><?
+ if ($oid) {
+ printf ("<a href=\"update.php3?oid=%d&delete=yes\">Löschen</a>", $oid);
+ }
+?></center>
+
+</font>
+
+</page>
+
+# Local variables:
+# mode: text
+# mode: auto-fill
+# mode: iso-accents
+# end:
--- /dev/null
+#include <lt2k.style>
+
+<page title="LinuxTag 2000 - Kostenverteilung">
+
+<headline "Kostenverteilung">
+
+<blockquote>
+
+Kosten sind wie folgt verteilt:<p>
+
+<?
+ function get_sum ($dbh, $cat, $status)
+ {
+ $query = "SELECT value_dm FROM costs WHERE status='$status'";
+ if (strlen ($cat)) {
+ $query .= " AND category='$cat'";
+ }
+ $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
+
+ $sum = 0.0;
+ for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
+ $row = pg_fetch_array ($sth, $nr);
+ $sum += $row['value_dm'];
+ }
+ return $sum;
+ }
+
+ function category ($dbh, $name, $cat, $start)
+ {
+ printf ("<h3><font face=\"Helvetica,Arial\">%s</font></h3>", $name);
+
+ echo ("<table width=\"100%\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\">");
+ $sum = $start;
+ echo ("<tr><td width=\"70%\" align=\"left\"><font face=\"Helvetica,Arial\">Zugewiesen</font></td>");
+ printf ("<td width=\"30%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></td></tr>", $start);
+
+ $val = get_sum ($dbh, $cat, "open"); $sum += $val;
+ echo ("<tr><td width=\"70%\" align=\"left\"><font face=\"Helvetica,Arial\">Offen</font></td>");
+ printf ("<td width=\"30%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></td></tr>", $val);
+
+ $val = get_sum ($dbh, $cat, "done"); $sum += $val;
+ echo ("<tr><td width=\"70%\" align=\"left\"><font face=\"Helvetica,Arial\">Getätigt</font></td>");
+ printf ("<td width=\"30%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></td></tr>", $val);
+
+ $val = get_sum ($dbh, $cat, "plan"); $sum += $val;
+ echo ("<tr><td width=\"70%\" align=\"left\"><font face=\"Helvetica,Arial\">Geplant</font></td>");
+ printf ("<td width=\"30%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></td></tr>", $val);
+
+ echo ("<tr><th width=\"70%\" align=\"left\"><font face=\"Helvetica,Arial\">Summe</font></th>");
+ printf ("<th width=\"30%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></th></tr>", $sum);
+
+ echo ("</table><p>");
+ }
+
+ $dbh = pg_pconnect ("kuolema", "5432", "lt2k")
+ or die("Unable to connect to SQL server");
+
+ category ($dbh, "Ausstellung", "exhibition", 500.00);
+ category ($dbh, "Öffentlichkeitsarbeit", "pr", 1000.00);
+ category ($dbh, "Vorträge", "talks", 1000.00);
+
+ category ($dbh, "Gesamt", "", 0.00);
+
+?>
+
+<li> <a href="edit.php3">Neue Position hinzufügen</a>
+<li> <a href="list.php3">Gesamtliste</a>
+<li> Detail: <a href="list.php3?category=exhibition">Ausstellung</a> -
+ <a href="list.php3?category=talks">Vorträge</a> -
+ <a href="list.php3?category=pr">Öffentlichkeitsarbeit</a>
+
+</blockquote>
+
+</page>
+
+# Local variables:
+# mode: text
+# mode: auto-fill
+# mode: iso-accents
+# end:
--- /dev/null
+#include <lt2k.style>
+
+<page title="LinuxTag 2000 - Kostenverteilung">
+
+<headline "Kostenverteilung">
+
+<table width=100% border=1 cellpadding=2 cellspacing=0>
+<tr>
+ <th width=15%>Datum</th>
+ <th width=20%>Kategorie</th>
+ <th width=50%>Verwendungszweck</th>
+ <th width=15%>Betrag</th>
+</tr>
+
+<?
+ $category['pr'] = "Öffentlichkeit";
+ $category['talks'] = "Vorträge";
+ $category['exhibition'] = "Ausstellung";
+
+ $dbh = pg_pconnect ("kuolema", "5432", "lt2k")
+ or die("Unable to connect to SQL server");
+
+ pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!");
+
+ $query = "SELECT datum,oid,category,descr,value_dm,status FROM costs ORDER BY datum,oid";
+ $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
+
+ $sum = 0.0;
+ for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
+ $row = pg_fetch_array ($sth, $nr);
+
+ $date = explode (" ", $row['datum']);
+ $date = explode ("-", $date[0]);
+ $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
+
+ if ($row['status'] == "done") {
+ $color = "ffffff";
+ } elseif ($row['status'] == "plan") {
+ $color = "ffff00";
+ } elseif ($row['status'] == "open") {
+ $color = "ff4500";
+ }
+
+ printf ("<tr bgcolor=\"#%s\">", $color);
+ printf ("<td width=\"15%%\">%s</td>", $date);
+ printf ("<td width=\"20%%\">%s</td>", $category[$row['category']]);
+ printf ("<td width=\"50%%\"><a href=\"edit.php3?oid=%d\">%s</a></td>", $row['oid'], $row['descr']);
+ printf ("<td width=\"15%%\" align=\"right\">%5.2f</td>", $row['value_dm']);
+ if (strstr ($HTTP_USER_AGENT, "Lynx")) {
+ printf ("<td> %s</td>", $row['status']);
+ }
+ $sum += $row['value_dm'];
+ echo ("</tr>");
+ }
+ echo ("<tr>");
+ echo ("<th width=\"85%\" colspan=\"3\">Summe</th>");
+ printf ("<th width=\"15%%\" align=\"right\">%5.2f</th>", $sum);
+ echo ("</tr>");
+
+?>
+</table><p>
+
+<?
+ if (!strstr ($HTTP_USER_AGENT, "Lynx")) {
+?>
+
+<table width=20% border=1 cellpadding=5 cellspacing=0>
+<tr align=center bgcolor=#ffffff><td><font face="Helvetica,Arial">bezahlt</font></td></tr>
+<tr align=center bgcolor=#ffff00><td><font face="Helvetica,Arial">geplant</font></td></tr>
+<tr align=center bgcolor=#ff4500><td><font face="Helvetica,Arial">ausstehend</font></td></tr>
+</table><p>
+
+<?
+ }
+?>
+
+<li> <a href="index.php3">Index</a>
+<li> <a href="list.php3">Gesamtliste</a>
+<li> Detail: <a href="list.php3?category=exhibition">Ausstellung</a> -
+ <a href="list.php3?category=talks">Vorträge</a> -
+ <a href="list.php3?category=pr">Öffentlichkeitsarbeit</a>
+
+</page>
+
+# Local variables:
+# mode: text
+# mode: auto-fill
+# mode: iso-accents
+# end:
--- /dev/null
+<a href="<root_prefix>LinuxTag/">LinuxTag 2000</a><br>
+
+<a href="<root_prefix>LinuxTag/news/">Newslist</a><br>
+
+<a href="<root_prefix>LinuxTag/telefon/">Telefon</a><br>
+
+<a href="<root_prefix>LinuxTag/treffen/">Treffen</a><br>
+
+<a href="<root_prefix>LinuxTag/calendar/">Kalender</a><br>
+
+<a href="<root_prefix>LinuxTag/exhibition/">Ausstellung</a><br>
+
+<ifneq <get-var WML_SRC_BASENAME> "index"
+ <a href="<root_prefix>LinuxTag/costs/">Kosten</a>
+ Kosten
+><br>
+
+<a href="<root_prefix>LinuxTag/dinner/">Abendessen</a><br>
+
+<a href="<root_prefix>LinuxTag/personal.html">Personal</a><br>
+
+<a href="<root_prefix>LinuxTag/download/">Download</a><br>
+
+<a href="http://oldenburger.linuxtage.de/">Homepage</a><br>
+
+# Local variables:
+# mode: indented-text
+# mode: auto-fill
+# mode: iso-accents
+# end:
--- /dev/null
+#include <lt2k.style>
+#include <phptools.inc>
+
+<page title="LinuxTag 2000 - Kostenverteilung">
+
+<headline "Kostenverteilung">
+
+<sql_prepare>
+<form_to_yyyymmdd>
+
+<?
+ $dbh = pg_pconnect ("kuolema", "5432", "lt2k")
+ or die("Unable to connect to SQL server");
+
+ $category = sql_prepare ($category);
+ $descr = sql_prepare ($descr);
+
+ $date = form_to_yyyymmdd ($datum);
+
+ if ($oid > 0) {
+ if (strlen ($delete)) {
+ $query = "DELETE FROM costs WHERE oid = $oid";
+ } else {
+ $query = "UPDATE costs SET "
+ . "datum='$date',"
+ . "descr='$descr',"
+ . "value_dm=$value_dm,"
+ . "category='$category',"
+ . "status='$status'"
+ . " WHERE oid = $oid";
+ }
+ } else {
+
+ $query = "INSERT INTO costs "
+ . "(datum,descr,value_dm,category,status) VALUES ("
+ . "'$date','$descr',$value_dm,'$category','$status')";
+
+ }
+ $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
+
+?>
+
+Aufgenommen/aktualisiert.<p>
+
+<li> <a href="index.php3">Index</a>
+<li> <a href="list.php3">Gesamtliste</a>
+<li> Detail: <a href="list.php3?category=exhibition">Ausstellung</a> -
+ <a href="list.php3?category=talks">Vorträge</a> -
+ <a href="list.php3?category=pr">Öffentlichkeitsarbeit</a>
+
+</page>
+
+# Local variables:
+# mode: text
+# mode: auto-fill
+# mode: iso-accents
+# end:
-#include "lt2k.style"
+#include <lt2k.style>
<PAGE title="LinuxTag 2000 - Abendessen">
-<headline head="Abendessen">
+<headline "Abendessen">
<define-tag daytable>
<set-var %attributes>
<h3><font face="Helvetica,Arial">Donnerstag, 12. Oktober 2000</font></h3>
<font face="Helvetica,Arial">
-Lokal: variabel<br>
+Lokal: Santorini<br>
Uhrzeit: 19:00-22:00 Uhr<p>
# printf (" <a href=\"update.php3?id=%d&delete=1\"><phpdel></a>", $id);
<h3><font face="Helvetica,Arial">Freitag, 13. Oktober 2000</font></h3>
<font face="Helvetica,Arial">
-Lokal: wahrscheinlich DaCapo<br>
+Lokal: DaCapo<br>
Uhrzeit: 19:00-22:00 Uhr<p>
<daytable day=Fr>
<h3><font face="Helvetica,Arial">Samstag, 14. Oktober 2000</font></h3>
<font face="Helvetica,Arial">
-Lokal: variabel<br>
+Lokal: Dubrovnik<br>
Uhrzeit: 19:00-22:00 Uhr<p>
<daytable day=Sa>
<a href="<root_prefix>LinuxTag/exhibition/">Ausstellung</a><br>
+<a href="<root_prefix>LinuxTag/costs/">Kosten</a><br>
+
<ifneq <get-var WML_SRC_BASENAME> "index"
<a href="index.php3">Abendessen</a>
Abendessen
-#include "lt2k.style"
+#include <lt2k.style>
+#include <phptools.inc>
<PAGE title="LinuxTag 2000 - Abendessen">
-<headline head="Abendessen">
+<headline "Abendessen">
+<sql_prepare>
<?
-
- function sql_prepare ($text)
- {
- # Der Himmel ist blau, das Wasser ist klar, die Vögel zwitschern
- # draußen, doch PHP weigert sich beharrlich, vernünftig zu
- # arbeiten.
- #
- # Problem: Im Form kommt " an, PHP macht daraus freundlicherweise \"
- # und schon sind unsere Daten in der SQL-DB kaputt. Danke
- # $mytext = ereg_replace ("\\\\", "\\\\", $text);
- $mytext = ereg_replace ("\\\"", "\"", $text);
- # $mytext = ereg_replace ("'", "\\'", $mytext);
- return ($mytext);
- }
-
$dbh = pg_pconnect ("kuolema", "5432", "lt2k")
or die("Unable to connect to SQL server");
Ausstellung
><br>
+<a href="<root_prefix>LinuxTag/costs/">Kosten</a><br>
+
<a href="<root_prefix>LinuxTag/dinner/">Abendessen</a><br>
<a href="<root_prefix>LinuxTag/personal.html">Personal</a><br>
<a href="exhibition/">Ausstellung</a><br>
+<a href="costs/">Kosten</a><br>
+
<a href="dinner/">Abendessen</a><br>
<ifneq <get-var WML_SRC_BASENAME> "personal"
<a href="<root_prefix>LinuxTag/exhibition/">Ausstellung</a><br>
+<a href="<root_prefix>LinuxTag/costs/">Kosten</a><br>
+
<a href="<root_prefix>LinuxTag/dinner/">Abendessen</a><br>
# <ifneq <get-var WML_SRC_BASENAME> "newslist"
<a href="<root_prefix>LinuxTag/exhibition/">Ausstellung</a><br>
+<a href="<root_prefix>LinuxTag/costs/">Kosten</a><br>
+
<a href="<root_prefix>LinuxTag/dinner/">Abendessen</a><br>
<a href="<root_prefix>LinuxTag/personal.html">Personal</a><br>