1 #include <infocon.style>
4 <page title="InfoCon - Online-Shop">
6 <h1 align=center>Bestellungskontrolle</h1>
8 <form method=post action=order.php3>
9 <table width=100% border=0 cellpadding=0 cellspacing=0>
12 # So werden 1 Pixel dicke Rahmen erzeugt
13 $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\">";
14 $le = "</td></tr></table></td></tr>";
22 $tind = "<tr bgcolor=\"$ch\"><th><font face=\"Helvetica,Arial\">Anzahl</font></th>"
23 ."<th align=\"left\"><font face=\"Helvetica,Arial\">Artikel</font></th>"
24 ."<th align=\"right\"><font face=\"Helvetica,Arial\">Einzel</font></th>"
25 ."<th align=\"right\"><font face=\"Helvetica,Arial\">Gesamt</font></th></tr>";
30 $sth = dbquery ($dbh, "SELECT article.name,article.article,offer.subname,offer.price,offer.articleid "
31 ."FROM article,offer WHERE article.article = offer.article ORDER BY offer.articleid");
35 echo ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">");
38 for ($i=0; $i < pg_NumRows ($sth); $i++) {
39 $row = pg_fetch_array ($sth, $i);
41 if (${$row['articleid']} > 0) {
45 $color = $color == $cd?"#ffffff":$cd;
46 printf ("<tr bgcolor=\"%s\">", $color);
47 printf ("<td width=\"10%%\" align=\"center\"><font face=\"Helvetica,Arial\">"
48 ."<input name=\"%s\" size=\"3\" maxlength=\"3\" value=\"%d\"></font></td>",
49 $row['articleid'], ${$row['articleid']});
51 printf ("<td width=\"70%%\" align=\"left\"><font face=\"Helvetica,Arial\">"
52 ."<a href=\"show.php3?article=%s\">%s, %s</a></font></td>",
53 $row['article'], $row['name'], $row['subname']);
55 printf ("<td width=\"10%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></td>",
58 printf ("<td width=\"10%%\" align=\"right\"><font face=\"Helvetica,Arial\">%6.2f</font></td></tr>",
59 $row['price'] * ${$row['articleid']});
60 $sum += $row['price'] * ${$row['articleid']};
64 printf ("<tr bgcolor=\"%s\"><th colspan=\"4\" align=\"left\"><font face=\"Helvetica,Arial\">%s</font></th>",
65 $ch, "Sie haben vergessen, Waren auszuwählen");
67 printf ("<tr bgcolor=\"%s\"><th colspan=\"3\" align=\"left\"><font face=\"Helvetica,Arial\">Summe</font></th>", $ch);
68 printf ("<th align=\"right\"><font face=\"Helvetica,Arial\">%7.2f</font></th></tr>", $sum);
75 <? if ($sum > 0.0) { ?>
76 <p><center><input type=submit value="Bestellen"> . <input type=reset value="Reset"></center>