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

<page title="Infodrom Oldenburg - Patches">

<protect>
<? $pkg = strtr($_GET[pkg], "'<>", '   '); ?>
</protect>

<h1 align=center>Infodrom Oldenburg</h1>
<h3 align=center>&mdash; <? echo $pkg; ?> &mdash;</h3>

<?
  $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 = sprintf ("SELECT * FROM patches WHERE package = '%s' ORDER by submitted", $pkg);
  $sth = pg_exec ($dbh, $query); // or die("Datenbank-Abfrage!");

  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]);
?>

<table width=100% class=blueborder cellpadding=0 cellspacing=0>

<tr bgcolor=<colh>>
<th width=70% align=left><b><? echo $date . ": " . $row['subject']; ?></b></th>
<th width=20% align=left><b><? echo $row['package']; ?></b></th>
<th width=10% align=right><? echo $row['version']; ?></th>
</tr>

<tr>
<td colspan=3 width=100%><? echo $row['description']; ?></td>
</tr>

<tr bgcolor=<cold>>
<td colspan=3 width=100%>Download: <? echo $row['download']; ?></td>
</tr>

</table>

<?
  }
?>

</page>

# Local variables:
# mode: html
# mode: auto-fill
# mode: iso-accents
# end:
