Move done jobs onto a 2nd page so one doesn't get confused by them.
authorJoey Schulze <joey@infodrom.org>
Sun, 6 Jan 2002 20:50:40 +0000 (20:50 +0000)
committerJoey Schulze <joey@infodrom.org>
Sun, 6 Jan 2002 20:50:40 +0000 (20:50 +0000)
src/Infodrom/todo/done.wml [new file with mode: 0644]
src/Infodrom/todo/index.wml
src/Infodrom/todo/submenu.inc

diff --git a/src/Infodrom/todo/done.wml b/src/Infodrom/todo/done.wml
new file mode 100644 (file)
index 0000000..5c4764a
--- /dev/null
@@ -0,0 +1,44 @@
+#include <infodrom.style>
+
+<page func="Infodrom Oldenburg" title="Todo">
+
+<?
+  $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
+              or die("Unable to connect to SQL server");
+
+  pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!");
+
+  $query = "SELECT oid,package,subject,submitted FROM todo WHERE done <> '' ORDER BY package,submitted";
+  $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
+
+  if (pg_NumRows ($sth) > 0) {
+    echo ("<table width=\"100%\" border=\"0\" cellspacing=\"3\" bgcolor=\"#f7ba2e\" summary=\"\">");
+    echo ("<tr><th width=\"10%\"><font face=\"Helvetica,Arial\">Paket</font></th>");
+    echo ("<th width=\"10%\"><font face=\"Helvetica,Arial\">Datum</font></th>");
+    echo ("<th width=\"80%\"><font face=\"Helvetica,Arial\">Subject</font></th></tr>");
+  }
+
+  for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
+    $row = pg_fetch_array ($sth, $nr);
+    $date = explode (" ", $row['submitted']);
+    $date = explode ("-", $date[0]);
+    $date = sprintf ("%d.%d.%d", $date[2], $date[1], $date[0]);
+
+    printf ("<tr><td align=\"left\" width=\"10%%\"><font face=\"Helvetica,Arial\">%s</font></th>", $row['package']);
+    printf ("<td align=\"right\" width=\"10%%\"><font face=\"Helvetica,Arial\">%s</font></th>", $date);
+    printf ("<td align=\"left\" width=\"80%%\"><font face=\"Helvetica,Arial\"><a href=\"edit.php3?id=%d\">%s</a></font></th></tr>",
+      $row['oid'], $row['subject']);
+  }
+  if (pg_NumRows ($sth) > 0) {
+    echo ("</table>");
+  }
+?>
+
+</table>
+
+</page>
+
+# Local variables:
+# mode: text
+# mode: auto-fill
+# end:
index a1316ce..e69b76e 100644 (file)
@@ -8,7 +8,7 @@
 
   pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!");
 
-  $query = "SELECT oid,package,subject,submitted FROM todo ORDER BY package,submitted";
+  $query = "SELECT oid,package,subject,submitted FROM todo WHERE done = '' ORDER BY package,submitted";
   $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
 
   if (pg_NumRows ($sth) > 0) {
@@ -41,5 +41,4 @@
 # Local variables:
 # mode: text
 # mode: auto-fill
-# mode: iso-accents
 # end:
index e3eac4f..0efa7cb 100644 (file)
@@ -2,6 +2,7 @@
 
 &nbsp;<menu-item base=index text=Index href=index.php3><br>
 &nbsp;<menu-item base=edit text="Add Todo" href=edit.php3?id=0><br>
+&nbsp;<menu-item base=edit text="Done Jobs" href=done.php3><br>
 
 <p><line height=2>