1 #include <infocon.style>
4 <page title="InfoCon - Online-Shop">
6 <h1 align=center>Online-Shop</h1>
8 <table width=100% border=0 cellpadding=0 cellspacing=0>
11 # So werden 1 Pixel dicke Rahmen erzeugt
12 $la = "<tr><td width=\"2\" bgcolor=\"#000000\"></td><td bgcolor=\"#000000\"><table cellpadding=\"0\" cellspacing=\"1\" width=\"100%\" border=\"0\" summary=\"\"><tr><td bgcolor=\"#ffffff\">";
13 $le = "</td></tr></table></td></tr>";
19 # FIXME: kill ' from $article
20 $sth = dbquery ($dbh, "SELECT * FROM article WHERE article = '$article'");
22 if (pg_NumRows ($sth) == 0) {
24 echo ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">");
25 printf ("<tr><th align=\"left\" colspan=\"2\" bgcolor=\"%s\">"
26 ."<font face=\"Helvetica,Arial\">Kein Artikel gefunden.</font></th></tr>",
31 $row = pg_fetch_array ($sth, 0);
34 echo ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">");
35 printf ("<tr><th align=\"left\" colspan=\"2\" bgcolor=\"%s\">"
36 ."<font face=\"Helvetica,Arial\">%s</font></th></tr>",
39 if (strlen ($row['url_path']) > 0) {
40 $img = sprintf ("src=\"%s\" width=\"%d\" height=\"%d\" alt=\"[Artikel #%s]\"",
41 $row['url_path'], $row['url_width'], $row['url_height'], $row['article']);
43 $img = "src=\"<root_prefix>Pics/nopix.png\" width=\"158\" height=\"183\" alt=\"[Kein Bild vorhanden]\"";
47 $sthi = dbquery ($dbh, sprintf ("SELECT name,price,articleid FROM offer WHERE article = '%s'ORDER BY articleid",
49 if (pg_NumRows ($sthi) > 0) {
51 $table = "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"$cd\">";
53 for ($ii=0; $ii < pg_NumRows ($sthi); $ii++) {
54 $rowi = pg_fetch_array ($sthi, $ii);
55 $table .= sprintf ("<tr><td align=\"left\" width=\"70%%\"><font face=\"Helvetica,Arial\"> %s</font></td>",
57 $table .= sprintf ("<td align=\"right\" width=\"20%%\"><font face=\"Helvetica,Arial\">%6.2f DM </font></td></tr>",
67 printf ("<tr><td width=\60%%\" align=\"left\" valign=\"top\">"
68 ."<font face=\"Helvetica,Arial\"><p>%s</font></td>"
69 ."<td width=\40%%\" rowspan=\"2\" align=\"center\" valign=\"top\"><img %s> </td></tr>",
70 $row['description'], $img);
72 printf ("<tr><td width=\60%%\" align=\"left\" valign=\"bottom\">%s</td></tr>", $table);
74 # $sthi = dbquery ($dbh, sprintf ("SELECT name,price,articleid FROM offer WHERE article = '%s'ORDER BY articleid",
76 # for ($ii=0; $ii < pg_NumRows ($sthi); $ii++) {
77 # $rowi = pg_fetch_array ($sthi, $ii);
78 # printf ("<tr bgcolor=\"%s\"><td align=\"left\" width=\"70%%\"><font face=\"Helvetica,Arial\"> %s</font></td>", $cd, $rowi['name']);
79 # printf ("<td align=\"right\" width=\"20%%\"><font face=\"Helvetica,Arial\">%6.2f DM </font></td></tr>", $rowi['price']);
89 <p>Preise freibleibend. Alle Preise verstehen sich inklusive gesetzlich vorgeschriebener Mehrwertsteuer.