PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/SEIP_ID_113266/LittleShop/LittleShop.php

https://gitlab.com/mustafa-mahmud/bitm-25
PHP | 122 lines | 109 code | 13 blank | 0 comment | 14 complexity | 9caa9c8bfeeb4de12dc4d76031041a83 MD5 | raw file
  1. <?php
  2. session_start();
  3. ob_start();
  4. require_once ('../classes/application.php');
  5. $obj_appication = new Application();
  6. $query_result = $obj_appication->select_published_category();
  7. if (isset($_GET['option'])) {
  8. $category_id = $_GET['category_id'];
  9. if ($_GET['option'] == 'category') {
  10. $product_result = $obj_appication->select_all_published_category_by_id($category_id);
  11. }
  12. } else {
  13. $product_result = $obj_appication->select_all_published_product();
  14. }
  15. if (isset($_GET['product'])) {
  16. $product_id = $_GET['product_id'];
  17. if ($_GET['product'] == 'product') {
  18. $product_result = $obj_appication->select_product_by_product_id($product_id);
  19. }
  20. $result = mysqli_fetch_assoc($product_result);
  21. }
  22. ?>
  23. <!DOCTYPE html>
  24. <html>
  25. <head>
  26. <title>Little Shop | Msoul</title>
  27. <meta charset="UTF-8">
  28. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  29. <meta name="description" content="Circle Hover Effects with CSS Transitions" />
  30. <meta name="keywords" content="circle, border-radius, hover, css3, transition" />
  31. <meta name="author" content="Codrops" />
  32. <link rel="icon" href="">
  33. <!-- CSS -->
  34. <link rel="stylesheet" type="text/css" href="../asset/front_end/css/font-awesome.min.css" /><!-- FONT AWESOME (UI) -->
  35. <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /><!-- BOOTSTRAP (CDN) -->
  36. <link rel="stylesheet" type="text/css" href="../asset/front_end/css/bootstrap.min.css" /><!-- BOOTSTRAP (UI) -->
  37. <link rel="stylesheet" type="text/css" href="../asset/front_end/css/normalize.css" /><!-- NORMALIZE -->
  38. <link rel="stylesheet" type="text/css" href="../asset/front_end/css/simple-sidebar.css" /><!-- SIMPLE SLIDER -->
  39. <link rel="stylesheet" type="text/css" href="../asset/front_end/css/lightbox.min.css" /><!-- LIGHT BOX -->
  40. <link rel="stylesheet" type="text/css" href="../asset/front_end/css/stl.css" /><!-- CUSTOM -->
  41. <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,700' rel='stylesheet' type='text/css' />
  42. <script type="text/javascript" src="../asset/front_end/js/modernizr.custom.79639.js"></script>
  43. <!--[if lte IE 8]><style>.main{display:none;} .support-note .note-ie{display:block;}</style><![endif]-->
  44. </head>
  45. <body class="LittleShop">
  46. <div id="wrapper">
  47. <!-- Sidebar -->
  48. <div id="sidebar-wrapper">
  49. <ul class="sidebar-nav">
  50. <li class="sidebar-brand"><a href="LittleShop.php">ManSoul Little Shop</a></li>
  51. <li><a href="index.php">ManSoul</a></li>
  52. <li><a href="cart.php">Your Cart</a></li>
  53. <br>
  54. <?php while ($row = mysqli_fetch_assoc($query_result)) { ?>
  55. <li><a href="LittleShop.php?option=category&category_id=<?php echo $row['category_id']; ?>"><?php echo $row['category_name']; ?></a></li>
  56. <?php } ?>
  57. </ul>
  58. </div><!-- /#sidebar-wrapper -->
  59. <!-- Page Content -->
  60. <div id="page-content-wrapper">
  61. <div class="container-fluid">
  62. <?php
  63. if (isset($pages))
  64. {
  65. if ($pages == 'product_view')
  66. {
  67. include ('pages/product_details_content.php');
  68. }
  69. elseif ($pages == 'cart')
  70. {
  71. include ('pages/cart_content.php');
  72. }
  73. elseif( $pages == 'ShipPage')
  74. {
  75. include_once ('pages/shiping_page_content.php');
  76. }
  77. }
  78. else
  79. {
  80. include ('page_content.php');
  81. }
  82. ?>
  83. </div><!-- end of container-fluid -->
  84. </div><!-- /#page-content-wrapper -->
  85. </div><!-- /#wrapper -->
  86. <footer id="footer">
  87. <p class="pull-right">Copyright &COPY; 2016 by <a href="#" title="http://www.jqurity.com">Mohin Jaki</a> &squf; All rights reserved</p>
  88. </footer>
  89. <!-- JAVASCRIPT -->
  90. <!-- JS jQUERY -->
  91. <script src="../asset/front_end/js/jquery.min.js"></script>
  92. <!-- BOOTSTRAP -->
  93. <script src="../asset/front_end/js/bootstrap.min.js"></script>
  94. <!-- LIGHT BOX -->
  95. <script src="../asset/front_end/js/lightbox-plus-jquery.min.js"></script>
  96. <!-- CUSTOM JS -->
  97. <script type="text/javascript" src="../asset/front_end/js/script.js"></script>
  98. <script>
  99. $(document).ready(function () {
  100. var docHeight = $(window).height();
  101. var footerHeight = $('#footer').height();
  102. var footerTop = $('#footer').position().top + footerHeight;
  103. if (footerTop < docHeight) {
  104. $('#footer').css('margin-top', 10 + (docHeight - footerTop) + 'px');
  105. }
  106. });
  107. </script>
  108. </body>
  109. </html>