product_details.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. include("session_check.php");
  3. include("header.php");
  4. include("menu.php");
  5. require_once("util.php");
  6. ?>
  7. <a href="javascript: history.back();">Zur&uuml;ck</a>
  8. <div width="100%" align="center">
  9. <table border="0" width="80%" class="product_details">
  10. <?php
  11. require_once("DataBase/Product.php");
  12. require_once("DataBase/Customer.php");
  13. require_once("DataBase/Price.php");
  14. require_once("DataBase/Priceset.php");
  15. $product= new Product();
  16. $customer = new Customer();
  17. $price = new Price();
  18. $priceset = new Priceset();
  19. $customer_data = $customer->get($_SESSION['username']);
  20. $priceset_id = 0;
  21. if(count($customer_data) > 0)
  22. $priceset_id = $customer_data[0][11];
  23. $tmp_priceset = $priceset->get($priceset_id);
  24. $netto = 0;
  25. if(count($tmp_priceset) > 0)
  26. $netto = $tmp_priceset[0][2];
  27. // prepare search/filter params
  28. $product_id = var_get_post("product_id", "");
  29. $list = $product->get($product_id);
  30. // $count = $product->getCountByFilter($search_product, $search_category);
  31. for($i = 0; $i < count($list); $i++)
  32. {
  33. $tmp_price = $price->getPrice($priceset_id, $list[$i][0]);
  34. ?>
  35. <tr>
  36. <td rowspan="3" width="200px"><img src="Bilder/<?php echo $list[$i][0]; ?>.jpg" width="200px"></td>
  37. <td align="center"><b><big><?php echo $list[$i][1]; ?></big></b><br><br></td>
  38. </tr>
  39. <tr>
  40. <td><font color="#8C8C8C">Produktnummer:</font> <?php echo $list[$i][0]; ?></td>
  41. </tr>
  42. <tr>
  43. <td><font color="#8C8C8C">Anmerkungen:</font> <?php echo $list[$i][8]; ?></td>
  44. </tr>
  45. <tr>
  46. <td align="right" colspan="2"><font color="#8C8C8C">Preis:</font> <big><?php echo number_format($price->getPriceTax($priceset_id, $list[$i][0], $netto, $list[$i][4]), 2); ?> EUR</big></td>
  47. </tr>
  48. <tr>
  49. <td align="right" colspan="2">&nbsp;</td>
  50. </tr>
  51. <tr>
  52. <td align="right" colspan="2">
  53. <form action="#" method="post" name="product_details_to_cart">
  54. <input type="hidden" name="action" value="add_product_to_cart">
  55. <input type="hidden" name="product_id" value="<?php echo $list[$i][0]; ?>">
  56. <input type="text" name="amount" value="1.0" size="7">
  57. <input type="submit" value="" class="invisible_submit">
  58. <a href="javascript: document.forms['product_details_to_cart'].submit();">In den Warenkorb</a>
  59. </form>
  60. </td>
  61. </tr>
  62. <?php
  63. }
  64. ?>
  65. </table>
  66. </div>
  67. <?php
  68. include("footer.php");
  69. ?>