Advertisement
vdp

Untitled

vdp
Jul 31st, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.22 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <?php
  4.         $uri_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
  5.         $uri_segments = explode('/', $uri_path);
  6.     ?>
  7. <head>
  8.     <meta charset="utf-8">
  9.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10.     <meta name="description" content="">
  11.     <meta name="author" content="">
  12.     <title>Volution Shop</title>
  13.     <link href="<?php if($uri_segments[1]=="customer"){echo"../";}?>css/bootstrap.min.css" rel="stylesheet">
  14.     <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  15.     <link href="<?php if($uri_segments[1]=="customer"){echo"../";}?>css/prettyPhoto.css" rel="stylesheet">
  16.     <link href="<?php if($uri_segments[1]=="customer"){echo"../";}?>css/price-range.css" rel="stylesheet">
  17.     <link href="<?php if($uri_segments[1]=="customer"){echo"../";}?>css/animate.css" rel="stylesheet">
  18.     <link href="<?php if($uri_segments[1]=="customer"){echo"../";}?>css/main.css" rel="stylesheet">
  19.     <link href="<?php if($uri_segments[1]=="customer"){echo"../";}?>css/responsive.css" rel="stylesheet">
  20.     <!--[if lt IE 9]>
  21.     <script src="js/html5shiv.js"></script>
  22.     <script src="js/respond.min.js"></script>
  23.     <![endif]-->
  24.  
  25. </head><!--/head-->
  26.  
  27. <body>
  28.     <header id="header"><!--header-->
  29.         <div class="header_top"><!--header_top-->
  30.             <div class="container">
  31.                 <div class="row">
  32.                     <div class="col-sm-6">
  33.                         <div class="contactinfo">
  34.                             <ul class="nav nav-pills">
  35.                                 <li><a href="#"><i class="fa fa-phone"></i> +62 8770 0896 356 </a></li>
  36.                                 <li><a href="#"><i class="fa fa-envelope"></i> valerian.dwi.p@gmail.com</a></li>
  37.                             </ul>
  38.                         </div>
  39.                     </div>
  40.                     <div class="col-sm-6">
  41.                         <div class="social-icons pull-right">
  42.                             <ul class="nav navbar-nav">
  43.                                 <li><a href="#"><i class="fa fa-facebook"></i></a></li>
  44.                                 <li><a href="#"><i class="fa fa-twitter"></i></a></li>
  45.                             </ul>
  46.                         </div>
  47.                     </div>
  48.                 </div>
  49.             </div>
  50.         </div><!--/header_top-->
  51.  
  52.         <div class="header-middle"><!--header-middle-->
  53.             <div class="container">
  54.                 <div class="row">
  55.                     <div class="col-sm-4">
  56.                         <div class="logo pull-left">
  57.                             <a href="index.php"><img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/logo.png" alt="logo"/></a>
  58.                         </div>
  59.  
  60.                     </div>
  61.                     <div class="col-sm-8">
  62.                         <div class="shop-menu pull-right">
  63.  
  64.                             <ul class="nav navbar-nav">
  65.  
  66.                                 <li><a href="<?php if($uri_segments[1]=="customer"){echo"../";}?>cart.php"><i class="fa fa-shopping-cart"></i> Cart&nbsp;<span class="badge"><?php itemsFromCart(); ?></span></a></li>
  67.  
  68.  
  69.  
  70.                                 <?php
  71.  
  72.                                 if(!isset($_SESSION['customer_email']))
  73.                                 {
  74.                                     //echo "<a href='checkout.php'> Login</a>";
  75.                                     if($uri_segments[1]=="customer"){
  76.                                         echo "<li><a href='checkout.php'><i class='fa fa-lock'></i> Login</a></li>";
  77.                                     }else{
  78.                                         echo "<li><a href='customer/checkout.php'><i class='fa fa-lock'></i> Login</a></li>";
  79.                                     }
  80.  
  81.                                 }
  82.                                 else
  83.                                 {
  84.  
  85.                                     echo "<li><a href='logout.php'><i class='fa fa-lock'></i> Logout</a></li>";
  86.                                 }
  87.                                 ?>
  88.  
  89.                             </ul>
  90.                         </div>
  91.                     </div>
  92.                     <?php
  93.                     cart();
  94.                     ?>
  95.                     <?php
  96.  
  97.                     if(!isset($_SESSION['customer_email']))
  98.                     {
  99.  
  100.                         echo "<b> Welcome Guest! </b>";
  101.  
  102.                     }
  103.                     else
  104.                     {
  105.                         $userName = $_SESSION['customer_email'];
  106.                         echo "<b style='color: #ea4335;'> Welcome:&nbsp;$userName! &nbsp;&nbsp;&nbsp;</b>";
  107.                         $get_order ="SELECT * FROM customer_orders JOIN customers ON customers.customer_id = customer_orders.customer_id WHERE customers.customer_email = '$userName'";
  108.                         $run_order=mysqli_query($con,$get_order);
  109.                         $get_order= mysqli_num_rows($run_order);
  110.                     }
  111.  
  112.                     ?>
  113.  
  114.  
  115.                     <b style=" color: #ea4335;">Shopping Cart:</b>
  116.                     <span>-Total Price: <?php echo rupiah(getTotalPrice()); ?></span>
  117.  
  118.  
  119.                 </div>
  120.             </div>
  121.         </div><!--/header-middle-->
  122.  
  123.         <div class="header-bottom"><!--header-bottom-->
  124.             <div class="container">
  125.                 <div class="row">
  126.                     <div class="col-sm-9">
  127.                         <div class="navbar-header">
  128.                             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  129.                                 <span class="sr-only">Toggle navigation</span>
  130.                                 <span class="icon-bar"></span>
  131.                                 <span class="icon-bar"></span>
  132.                                 <span class="icon-bar"></span>
  133.                             </button>
  134.                         </div>
  135.                         <div class="mainmenu pull-left">
  136.                             <ul class="nav navbar-nav collapse navbar-collapse">
  137.                                 <li><a href="<?php if($uri_segments[1]=="customer"){echo"../";}?>index.php" class="<?php if($uri_segments[1]=="index.php"){echo"active";}?>">Home</a></li>
  138.                                 <li><a href="<?php if($uri_segments[1]=="customer"){echo"../";}?>all_products.php" class="<?php if($uri_segments[1]=="all_products.php"){echo"active";}?>">All Products</a></li>
  139.                                 <li><a href="<?php if($uri_segments[1]!="customer"){echo"customer/";}?>my_account.php" class="<?php if($uri_segments[2]=="my_account.php"&&!isset($_GET['my_orders'])){echo"active";}?>">My Account</a></li>
  140.                                 <li><a href="<?php if($uri_segments[1]!="customer"){echo"customer/";}?>my_account.php?my_orders" class="<?php if($uri_segments[2]=="my_account.php"&&isset($_GET['my_orders'])){echo"active";}?>">My Order&nbsp;<span class="badge"><?php if(isset($get_order)){echo $get_order;} ?></span></a></li>
  141.                                 <li><a href="<?php if($uri_segments[1]=="customer"){echo"../";}?>contact.php" class="<?php if($uri_segments[1]=="contact.php"){echo"active";}?>">Contact Us</a></li>
  142.                                 <li><a href="<?php if($uri_segments[1]=="customer"){echo"../";}?>admin_area/login"><b>Admin Login</b></a></li>
  143.                             </ul>
  144.                         </div>
  145.                     </div>
  146.                     <!--Search Box starts-->
  147.                     <div>
  148.  
  149.                         <form class="form-group row" method="get" action="<?php if($uri_segments[1]=="customer"){echo"../";}?>results.php" enctype="multipart/form-data">
  150.                         <div class="col-xs-2">
  151.                         <div class="input-group">
  152.                                 <input class="form-control" type="text" name="user_query" placeholder="Search product"/>
  153.                                 <div class="input-group-btn">
  154.                                 <button class="btn" type="submit" name="search"><i class="fa fa-search"></i></button>
  155.                                 </div>
  156.                             </div>
  157.                         </div>
  158.                         </form>
  159.  
  160.                     </div>
  161.                     <!--Search Box ends-->
  162.                 </div>
  163.             </div>
  164.         </div><!--/header-bottom-->
  165.     </header><!--/header-->
  166.     <section id="slider"><!--slider-->
  167.         <div class="container">
  168.             <div class="row">
  169.                 <div class="col-sm-12">
  170.                     <div id="slider-carousel" class="carousel slide" data-ride="carousel">
  171.                         <ol class="carousel-indicators">
  172.                             <li data-target="#slider-carousel" data-slide-to="0" class="active"></li>
  173.                             <li data-target="#slider-carousel" data-slide-to="1"></li>
  174.                             <li data-target="#slider-carousel" data-slide-to="2"></li>
  175.                         </ol>
  176.  
  177.                         <div class="carousel-inner">
  178.                             <div class="item active">
  179.                                 <div class="col-sm-6">
  180.                                     <h1><img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/logo.png" class="girl img-responsive"/></h1>
  181.                                     <h2>Free Shipping
  182.                                         <br></h2>
  183.                                         <p>To All Orders & To Anywhere In Indonesia</p>
  184.                                         <a href="#products_box" type="button" class="btn btn-default get">Shop Now</a>
  185.  
  186.                                     </div>
  187.                                     <div class="col-sm-6">
  188.                                         <img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/free-delivery.jpg" class="girl img-responsive" alt="" width="500" height="500" />
  189.  
  190.                                     </div>
  191.                                 </div>
  192.                                 <div class="item">
  193.                                     <div class="col-sm-6">
  194.                                         <h1><img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/logo.png" class="girl img-responsive"/></h1>
  195.                                         <h2>100% Satisfaction</h2>
  196.                                         <p>Delivering the very best of consumer products. Every one of our products gives you 100% satisfaction. </p>
  197.                                         <a href="#products_box" type="button" class="btn btn-default get">Shop Now</a>
  198.  
  199.                                     </div>
  200.                                     <div class="col-sm-6">
  201.                                         <img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/satisfication.jpg" class="girl img-responsive" alt="" width="500" height="500" />
  202.                                     </div>
  203.                                 </div>
  204.  
  205.                                 <div class="item">
  206.                                     <div class="col-sm-6">
  207.                                         <h1><img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/logo.png" class="girl img-responsive"/></h1>
  208.                                         <h2>100% Original</h2>
  209.                                         <p>Delivering the very best of consumer products around the world. Every one of our products gives you 100% satisfaction.</p>
  210.                                         <a href="#products_box" type="button" class="btn btn-default get">Shop Now</a>
  211.                                     </div>
  212.                                     <div class="col-sm-6">
  213.                                         <img src="<?php if($uri_segments[1]=="customer"){echo"../";}?>images/home/ori.jpg" class="girl img-responsive" alt="" width="500" height="500" />
  214.  
  215.                                     </div>
  216.                                 </div>
  217.  
  218.                             </div>
  219.  
  220.                             <a href="#slider-carousel" class="left control-carousel hidden-xs" data-slide="prev">
  221.                                 <i class="fa fa-angle-left"></i>
  222.                             </a>
  223.                             <a href="#slider-carousel" class="right control-carousel hidden-xs" data-slide="next">
  224.                                 <i class="fa fa-angle-right"></i>
  225.                             </a>
  226.                         </div>
  227.  
  228.                     </div>
  229.                 </div>
  230.             </div>
  231.         </section><!--/slider-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement