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

<page title="Infodrom Oldenburg - Patches">

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

<p>
In this area you'll find the collection of patches developed at
Infodrom Oldenburg.  Some of them were developed for customers, others
for free projects or for our own use.  Since they are additions to Free
Software, they are released in the public.<p>
</p>

<center>

<table width=60% class=blueborder cellpadding=0 cellspacing=0>
<tr bgcolor="<colh>">
<th width="70%" align="left"><b>&nbsp;Paket</b></th>
<th width="30%" align="right"><b>Count&nbsp;</b></th>
</tr>

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

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

  $sth = pg_exec ($dbh, "SELECT package,count(*) FROM patches ".
			"GROUP BY package ORDER BY lower(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>

</page>

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