#include <infodrom.style>
#include <db.style>

<page title="Infodrom Oldenburg - Todo">

<h1 align=center>Infodrom Oldenburg</h1>
<h3 align=center>&mdash; Todo &mdash;</h3>

<p>I've begun collecting outstanding jobs with regards to Free Software
that would help improve a particular package or an entire system, make
it useful for more people or make it policy complient.</p>

<p>Since our time is short and Joey keeps being too busy, you're invited
to pick up a particular job and send in patches.  For some of the
packages below you can use the <a
href="http://bugs.debian.org/">Debian Bug Tracking System</a> since
Debian contains all most free software.  The maintainer will forward
it upstream.</p>

<h3 class=bar>Outstanding jobs</h3>

<center>
<table width=50% class=blueborder cellpadding=0 cellspacing=0>

<tr bgcolor="<colh>">
<th width="70%" align="left"><b>&nbsp;Package</b></th>
<th width="30%" align="right"><b>Count&nbsp;</b></th>
</tr>

<?
  $trow = "<tr bgcolor=\"%s\">"
         ."<td width=\"70%%\" align=\"left\"><font face=\"<infodrom-font />\">&nbsp;"
	    ."<a href=\"package.php?pkg=%s&done=0\">%s</a></font></td>"
	 ."<td width=\"30%%\" align=\"right\"><font face=\"<infodrom-font />\">%d&nbsp;</font></td>"
	 ."</tr>";

  $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
	       or die("Unable to connect to SQL server");

  $sth = pg_exec ($dbh, "SELECT package,count(*) FROM todo WHERE done IS NULL GROUP BY package"); // or die("Datenbank-Abfrage!");

  $color = "<cold>";
  for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
    $row = pg_fetch_array ($sth, $nr);
    $pkg = str_replace(" ", "%20", $row[0]);

    $color = $color == "<cold>"?"<coln>":"<cold>";
    printf ($trow, $color, $pkg, $row[0], $row[1]);
  }
?>

</table>
</center>


<h3 class=bar>Done jobs</h3>

<center>
<table width=50% class=blueborder cellpadding=0 cellspacing=0>

<tr bgcolor="<colh>">
<th width="70%" align="left"><b>&nbsp;Package</b></th>
<th width="30%" align="right"><b>Count&nbsp;</b></th>
</tr>

<?
  $trow = "<tr bgcolor=\"%s\">"
         ."<td width=\"70%%\" align=\"left\"><font face=\"<infodrom-font />\">&nbsp;"
	    ."<a href=\"package.php?pkg=%s&done=1\">%s</a></font></td>"
	 ."<td width=\"30%%\" align=\"right\"><font face=\"<infodrom-font />\">%d</font></td>"
	 ."</tr>";

  $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
	       or die("Unable to connect to SQL server");

  $sth = pg_exec ($dbh, "SELECT package,count(*) FROM todo WHERE done IS NOT NULL GROUP BY package"); // or die("Datenbank-Abfrage!");

  $color = "<cold>";
  for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
    $row = pg_fetch_array ($sth, $nr);
    $pkg = str_replace(" ", "%20", $row[0]);

    $color = $color == "<cold>"?"<coln>":"<cold>";
    printf ($trow, $color, $pkg, $row[0], $row[1]);
  }
?>

</table>
</center>
<p>

</page>

# Local variables:
# mode: indented-text
# mode: auto-fill
# mode-: iso-accents
# end:
