Happy happy joy joy, www.infodrom.ffis.de is up!
[infodrom.org/www.infodrom.org] / src / Infodrom / patches / index.wml
1 #include <infodrom.style>
2 #include <db.style>
3
4 <page title="Infodrom Oldenburg - Patches">
5
6 <h1 align=center><font face="Helvetica,Arial">Infodrom Oldenburg</font></h1>
7 <h3 align=center><font face="Helvetica,Arial">- Patches -</font></h3>
8
9 <font face="Helvetica,Arial">
10 In this area you'll find the collection of patches developed at
11 Infodrom Oldenburg.  Some of them were developed for customers, others
12 for free projects or for our own use.  Since they are additions to Free
13 Software, they are released in the public.<p>
14 </font>
15
16 <border color=<box-bdcolor>>
17
18 <center>
19 <table width=100% border=0 cellpadding=0 cellspacing=0>
20 <tr bgcolor="<colh>">
21 <td width="70%" align="left"><font face="Helvetica,Arial"><b>&nbsp;Paket</b></font></td>
22 <td width="30%" align="right"><font face="Helvetica,Arial"><b>Count&nbsp;</b></font></td>
23 </tr>
24
25 <?
26   $trow = "<tr bgcolor=\"%s\">"
27          ."<td width=\"70%%\" align=\"left\"><font face=\"Helvetica,Arial\">&nbsp;"
28             ."<a href="\"package.php3?pkg=%s\"">%s</a></font></td>"
29          ."<td width=\"30%%\" align=\"right\"><font face=\"Helvetica,Arial\">%d&nbsp;</font></td>"
30          ."</tr>";
31
32   $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
33                or die("Unable to connect to SQL server");
34
35   $sth = pg_exec ($dbh, "SELECT package,count(*) FROM patches GROUP BY package"); // or die("Datenbank-Abfrage!");
36
37   $color = "<cold>";
38   for ($nr=0; $nr < pg_NumRows ($sth); $nr++) {
39     $row = pg_fetch_array ($sth, $nr);
40     $pkg = ereg_replace(" ", "%20", $row[0]);
41
42     $color = $color == "<cold>"?"<coln>":"<cold>";
43     printf ($trow, $color, $pkg, $row[0], $row[1]);
44   }
45 ?>
46 </table>
47 </center>
48
49 </border>
50
51 </page>
52
53 # Local variables:
54 # mode: html
55 # mode: auto-fill
56 # mode: iso-accents
57 # end: