ok

Mini Shell

Direktori : /home2/selectio/www/thecomponents.in/
Upload File :
Current File : /home2/selectio/www/thecomponents.in/header.php

<?php include "config/config.php";


session_start();

$category_id = "";

?>


<html lang="en">
  
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
    <title>Caliber eCommerce </title>
    <link rel="icon" type="image/png" href="images/icons/favicon.png">
    <link rel="preload" href="fonts/riode115b.ttf?5gap68" as="font" type="font/woff2" crossorigin="anonymous">
    <link rel="preload" href="vendor/fontawesome-free/webfonts/fa-solid-900.woff2" as="font" type="font/woff2" crossorigin="anonymous">
    <link rel="preload" href="vendor/fontawesome-free/webfonts/fa-brands-400.woff2" as="font" type="font/woff2" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
    
    <script>
      WebFontConfig = {
        google: {
          families: ['Poppins:400,500,600,700,800']
        }
      };
      (function(d) {
        var wf = d.createElement('script'),
          s = d.scripts[0];
        wf.src = 'js/webfont.js';
        wf.async = true;
        s.parentNode.insertBefore(wf, s);
      })(document);
    </script>
    <link rel="stylesheet" type="text/css" href="vendor/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/magnific-popup/magnific-popup.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/owl-carousel/owl.carousel.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/sticky-icon/stickyicon.css">
    <link rel="stylesheet" type="text/css" href="css/demo22.min.css">
    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
    
  </head>
  <body class="home">
  
    <style>
        .minipopup-area{
            display: none;
        }
    </style>

   <style>
       .header-search.hs-simple input.form-control {
           border-color: #bdbdbd;
       }
       
       .product-media img:first-child {
            position: relative;
            opacity: 1;
            height: 56% !important;
        }
   </style>
        
    <?php
        $user_id = "";
        $price_result="";
        $price_sql = "";
        if(isset($_SESSION['caliber'])){
            $user_id = $_SESSION['caliber']['id'];
       
        $price_sql=$pdo->prepare("SELECT cart.id,cart.user_id,cart.product_id,products.name  as product_name,
        users.name,SUM(product_variant.price) AS total_price,products.image,product_variant.stock,product_variant.price
        FROM cart INNER JOIN products ON cart.product_id=products.id INNER JOIN users ON users.id=cart.user_id INNER JOIN product_variant ON 
        product_variant.product_id = products.id WHERE cart.user_id=?");
        
        $price_sql->execute(array($user_id));
        $price_result = $price_sql->fetchAll(PDO::FETCH_ASSOC);
        $total_card_resut =$price_sql->rowCount();
        }
    ?>
  
     

    <div class="page-wrapper">
      <h1 class="d-none">Caliber eCommerce</h1>
      <header class="header">
        <div class="header-top">
          <div class="container">
            <div class="header-left">
              <p class="welcome-msg pb-2">Welcome to Caliber eCommerce store</p>
            </div>
            <div class="header-right">
              <div class="dropdown dropdown-expanded">
                <a href="#dropdown">Links</a>
                <ul class="dropdown-box">
                    <?php if($_SESSION['caliber']){ ?>
                    <li>
                        <a  href="logout.php">logout</a>
                    </li>
                    <?php } else { ?>
                    <li>
                        <a  href="login.php">login</a>
                    </li>
                    <?php } ?>
                    <li>
                      <a href="register.php">Register</a>
                    </li>
                 </ul>
              </div>
            </div>
          </div>
        </div>
        <div class="header-middle sticky-header fix-top sticky-content">
            <?php include 'header4.php' ?>
        </div>
        

<?php 
    $query = $pdo->prepare("SELECT * FROM category WHERE status = 1");
    $query->execute();
    $res_category = $query->fetchAll(PDO::FETCH_ASSOC);

    
?>
        <div class="header-bottom has-dropdown pb-0">
          <div class="container d-flex align-items-center">
            <div class="dropdown category-dropdown has-border fixed">
              <a href="#" class="text-white font-weight-semi-bold category-toggle">
                <i class="d-icon-bars2"></i>
                <span>Shop By Categories</span>
              </a>
              <div class="dropdown-box">
                <ul class="menu vertical-menu category-menu">
                  <li>
                    <a href="shop.php" class="menu-title">Browse Our Categories</a>
                  </li>
                  
                  <?php 
                    foreach ($res_category as $row_categories){
                  ?>
                  
                  <li class="submenu">
                    <a href="shop.php?category=<?= $row_categories['id'] ?>">
                      <i class="fas fa-robot"></i><?=$row_categories['name']?></a>
                   

                   
                   
                    <ul>
                        
                                           <?php 
    $sub_category = $pdo->prepare("SELECT * FROM subcategory WHERE category_id=". $row_categories['id']);
    $sub_category->execute();
    $sub_category_result = $sub_category->fetchAll(PDO::FETCH_ASSOC);
          $total_sub_category = $sub_category->rowCount();
          
            if($total_sub_category > 1){         
                    foreach ($sub_category_result as $sub_category_results){
?>
                      <li>
                        <a href="shop.php?category=<?= $row_categories['id'] ?>"><?=$sub_category_results['name']?></a>
                      </li>
                      <?php } } ?>
                      
                      
                    </ul>
                    
                    
                  </li>
                  
                  <?php }?>
                </ul>
              </div>
            </div>
            <nav class="main-nav ml-4">
              <ul class="menu">
                <li class="active">
                  <a href="index.php">Home</a>
                </li>
                <li>
                  <a href="shop.php">Categories</a>
                </li>
                <li>
                  <a href="shop.php">Products</a>
                </li>
                <!--<li>-->
                <!--  <a href="#">Pages</a>-->
                  
                <!--</li>-->
                <!--<li>-->
                <!--  <a href="#">Elements</a>-->
                  
                <!--</li>-->
              </ul>
            </nav>
          </div>
        </div>
      </header>
      

Zerion Mini Shell 1.0