#include #include

Bestellung aufgeben

"; $cd = ""; $cn = ""; $tind = "Anzahl" ."Artikel" ."Einzel" ."Gesamt"; $dbh = dbconnect(); # WHERE spool > 0 $sth = dbquery ($dbh, "SELECT article.name,article.article,offer.subname,offer.price,offer.articleid,spool.count_spare " ."FROM article,offer,spool WHERE article.article = offer.article AND offer.articleid = spool.articleid " ."ORDER BY offer.articleid"); $sum = 0.0; $color = $cd; $maybe_split = 0; for ($i=0; $i < pg_NumRows ($sth); $i++) { $row = pg_fetch_array ($sth, $i); if (${$row['articleid']} > 0) { if (${$row['articleid']} > $row['count_spare']) { $maybe_split = 1; } if ($sum == 0.0) { echo ($tind); } $color = $color == $cd?$cn:$cd; printf ("", $color); printf ("" ."%d ", $row['articleid'], ${$row['articleid']}, ${$row['articleid']}); printf ("" ."%s, %s", $row['article'], $row['name'], $row['subname']); printf ("%6.2f", $row['price']); printf ("%6.2f", $row['price'] * ${$row['articleid']}); $sum += $row['price'] * ${$row['articleid']}; } } if ($sum == 0.0) { printf ("%s", $ch, "Sie haben vergessen, Waren auszuwählen"); } else { $color = $color == $cd?$cn:$cd; printf ("", $color); printf (""); printf ("" ."Porto und Verpackung"); printf ("%6.2f", $porto); printf ("%6.2f", $porto); $sum += $porto; printf ("Summe", $ch); printf ("%7.2f", $sum); } ?> 0.0) { if ($maybe_split) { echo ("

Nicht alle Artikel sind im Moment vorrrätig.
"); echo ("Sie haben die Möglichkeit, die Bestellung komplett zu erhalten, wenn die Ware vollständig ist oder " ."sie aufzuteilen. Dann erhalten Sie den ersten Teil sofort und den zweiten sobald die Ware da " ."ist. Achtung, bei zwei Bestellungen fällt auch zweimal Porto an.

"); echo (" Bestellung aufteilen"); } ?>

Bitte geben Sie Ihre Kundennummer oder Ihre Anschrift an. ?> Kundennr. Kennwort ?> size=50 maxlength=> ?> PLZ *  Stadt   * Land Deutschland

Die mit einem Stern (*) markierten Eingabefelder sind erforderlich. ?>

.

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