Guest User

Untitled

a guest
Jun 22nd, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.10 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <title>Restaurants in Kirkcaldy</title>
  5.     <link href="css/styles.css" rel="stylesheet" type="text/css">
  6.     <link href="css/cssreset.css" rel="stylesheet" type="text/css">
  7.     <script src="js/scripts.js"></script>
  8.     <meta name="viewport" content="width=device-width, initial-scale=1">
  9. </head>
  10. <body>
  11. <?php
  12.  
  13. require('classCalls.php');
  14. $id = $_GET['id'];
  15. $appetisers = 'Appetisers';
  16. $restaurant = new Restaurant($id);
  17. $menu = new Menu($id, $appetisers);
  18.  
  19. $something =  $restaurant->result;
  20. $items =  $restaurant->result;
  21.  
  22.  
  23. $getAppetisers =  $menu->result;
  24. $getMains =  $menu->result;
  25.  
  26.  
  27.  
  28. echo "<div class='flex-grid-menu'>";
  29. foreach($something as $rows){
  30. echo <<<EOF
  31.  
  32. <div class='header-restaurant'>
  33. <section>
  34. <h2>{$rows['restaurant']}</h2>
  35. <span class='para'>{$rows['content']}</span>
  36. <span class='para'>{$rows['name']}</span>
  37. <span class='para'>{$rows['postcode']}</span>
  38. <span class='para'>{$rows['phone']}</span>             
  39.            
  40. </section>
  41. </div>
  42.            
  43. <div class='rows'>
  44. <div class='categories'>
  45. <h2>Categories</h2>
  46. <ul>
  47. <li>Appetisers</li>
  48. <li>Mains</li>
  49. <li>Desserts</li>
  50. <li>Drinks</li>
  51. <li>Sides</li>
  52. </ul>
  53. </div> 
  54. <div class="wrapper">
  55. <div class="shop-description">
  56. <p>{$rows['rdescription']}</p>
  57. </div>
  58. EOF;
  59. }
  60.  
  61. echo '<div class="menu-listing">
  62. <h2>Menu</h2>
  63. <div class="menu-display">
  64. <section>
  65. <h3>Appetisers</h3>
  66. ';
  67. foreach($getAppetisers as $row){
  68. if($row['type'] == 'Appetisers'){
  69. echo <<<EOC
  70. <p class="food-name {$row['vegan']} {$row['serviceTime']}">
  71. {$row['iname']} </p>
  72. <p class="food-price"> £{$row['price']}</p>
  73.  
  74. <p class="food-description">
  75. {$row['description']}
  76. </p>
  77.  
  78. EOC;
  79. }
  80. }
  81. echo'</section>
  82. </div>';
  83. echo '
  84. <div class="menu-display">
  85. <section>
  86. <h3>Mains</h3>
  87. ';
  88. foreach($getMains as $row){
  89. if($row['type'] == 'Mains'){
  90. echo <<<EOC
  91. <p class="food-name {$row['vegan']} {$row['serviceTime']}">
  92. {$row['iname']} </p>
  93. <p class="food-price"> £{$row['price']}</p>
  94.  
  95. <p class="food-description">
  96. {$row['description']}
  97. </p>
  98.  
  99. EOC;
  100. }
  101. }
  102.  
  103. echo'</section>
  104. </div>';
  105.  
  106. echo '</div>';
  107.  
  108.  
  109.  
  110. ?>
  111.  
  112. </body>
  113. </html>
Add Comment
Please, Sign In to add comment