shoppingcart_submit.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. include("session_check.php");
  3. include("header.php");
  4. include("menu.php");
  5. ?>
  6. <a href="javascript: history.back();">Zur&uuml;ck</a>
  7. <div width="100%" align="center">
  8. <big> fertiger Warenkorb </big>
  9. <br><br>
  10. <form name="shoppingcart_submit" action="shoppingcart_done.php" method="POST">
  11. <table border="0" width="80%">
  12. <tr class="table_header">
  13. <td width="80px" align="center">ProduktNr.</td>
  14. <td align="center">Bezeichnung</td>
  15. <td align="center">Anmerkung</td>
  16. <td width="30px" align="center">Menge</td>
  17. <td width="40px" align="center">Preis</td>
  18. </tr>
  19. <tr>
  20. <td colspan="5">&nbsp;</td>
  21. </tr>
  22. <?php
  23. /* load or initialize the ShoppingCart */
  24. if(!isset($shopping_cart))
  25. {
  26. if(isset($_SESSION["cart_product_id_array"]))
  27. $shopping_cart = new ShoppingCart($_SESSION["username"], $_SESSION["cart_product_id_array"], $_SESSION["cart_product_amount_array"]);
  28. else
  29. $shopping_cart = new ShoppingCart($_SESSION["username"]);
  30. }
  31. $list = $shopping_cart->getItems();
  32. for ($i = 0; $i < count($list); $i++) {
  33. if ($list[$i][2] > 0) {
  34. echo "\t<tr>\n";
  35. echo "\t\t<td>".$list[$i][0]."</td>\n";
  36. echo "\t\t<td>".$list[$i][1]."</td>\n";
  37. echo "\t\t<td>".$list[$i][4]."</td>\n";
  38. echo "\t\t<td width=\"30px\">".$list[$i][2]."</td>\n";
  39. echo "\t\t<td align=\"right\">".number_format($list[$i][3] * $list[$i][2], 2)." EUR</td>\n";
  40. echo "\t</tr></a>\n";
  41. }
  42. }
  43. ?>
  44. <tr>
  45. <td colspan="5">&nbsp;</td>
  46. </tr>
  47. <tr class="table_header">
  48. <td colspan="3" align="right"><big>Summe:</big></td>
  49. <td colspan="2" align="right"><big><font color="#000000"><b><?php echo number_format($shopping_cart->getPriceSum(), 2); ?> EUR</b></font></big></td>
  50. </tr>
  51. <tr>
  52. <td colspan="5">&nbsp;</td>
  53. </tr>
  54. <!--<tr>
  55. <td rowspan="2">Anmerkungen:</td>
  56. <td rowspan="2"><textarea cols="50" rows="2"></textarea></td>
  57. <td colspan="2">&nbsp;</td>
  58. </tr>-->
  59. <tr>
  60. <td colspan="3">&nbsp;</td>
  61. <td colspan="2" align="center" width="200px" class="table_header"><big><a href="javascript: document.forms['shoppingcart_submit'].submit();">Bestellung abschicken</a></big></td>
  62. </tr>
  63. </table>
  64. </div>
  65. <input type="hidden" value="create_bill" name="action">
  66. <input type="submit" value="" class="invisible_submit">
  67. </form>
  68. <?php
  69. include("footer.php");
  70. ?>