Advertisement
Guest User

Untitled

a guest
May 20th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. <!DOCTYPE>
  2. <html>
  3. <head>
  4. <meta charset="UTF8">
  5. <title>商品表示</title>
  6. <link rel="stylesheet" type="text/css" href="/webshop/css/reset.css">
  7. <link rel="stylesheet" type="text/css" href="/webshop/css/page.css">
  8. </head>
  9. <body>
  10. <div id="wrapper">
  11. <header>
  12. <h1>Webshop</h1>
  13. </header>
  14.  
  15. <div id="content">
  16. <h1><?= $title1 ?></h1>
  17. <div id="search_block">
  18. <form action="/webshop/ProductList/search" method="get">
  19. 検索:
  20. <input type="text" name="search" size="50" placeholder="商品名をいれて" value="<?=$search ?>">
  21. <button type="submit" name="btn" value="searchBtn">検索</button>
  22.  
  23. </form>
  24. <?=$search ?>
  25.  
  26. </div><!-- #search_block -->
  27.  
  28.  
  29. <h2><?= $title2 ?></h2>
  30. <?php
  31. if(isset($dbdata)){
  32. ?>
  33. <table>
  34. <tr>
  35. <th>商品コード</th>
  36. <th>商品名</th>
  37. <th>価格</th>
  38. <th>販売単位</th>
  39. <th>商品詳細</th>
  40. </tr>
  41. <?php
  42. foreach ($dbdata as $val){
  43. $code=htmlspecialchars_decode($val["product_code"]);
  44. $name=htmlspecialchars_decode($val["product_name"]);
  45. $price=htmlspecialchars_decode($val["product_price"]);
  46. $unit=htmlspecialchars_decode($val["product_unit"]);
  47. $desc=htmlspecialchars_decode($val["product_desc"]);
  48. ?>
  49.  
  50.  
  51. <tr>
  52.  
  53. <td><?=$code?></td>
  54. <td><a href="/webshop/ProductList/item?pcode"><?=$name?></a></td>
  55. <td><?=$price?></td>
  56. <td><?=$unit?></td>
  57. <td><?=$desc?></td>
  58. </tr>
  59.  
  60.  
  61. <?php
  62. }//foreach
  63. ?>
  64. </table>
  65. <?php
  66. }//if
  67. ?>
  68. </div><!-- #content -->
  69. <footer>
  70. R4A305 2018-05-18
  71. </footer>
  72. </div><!-- #wrapper -->
  73. </body>
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement