<?php
include('include/header.php');
?>    
    <div id="top_home">
      <!-- -------------------slider----------- -->
      <section id="ishislider" class="ishislider-container owl-carousel" style="margin-bottom:60px !important;">
        <?php
        $sql_flash = "SELECT * FROM `header_flash` ";
        $run_flash = mysqli_query($link,$sql_flash);
        while($result_flash = mysqli_fetch_assoc($run_flash))
        {
            ?>
        
        <div class="item">
          <a href="#">
            <img src="header-image/<?=$result_flash['header_image_name'];?>" alt="Slide-1" class="img-responsive">
          </a>
          <div class="carousel-caption slidesss">
    <h3><?=$result_flash['flash_title'];?></h3>
    <p><?=$result_flash['pro_name_one'];?></p>
  </div>

        </div>
        <?php
      }
      ?>
      </section>
      <!-- -------------------category----------- -->
      <section id="ishicategory" class="ishicategoryblock" style="padding-top:60px !important;">
        <h3 class="home-title"><span class="title-icon"><span></span></span>Shop By Category</h3>
        <div class="ishicategoryblock-carousel owl-carousel">
<?php 
$sql_cat = "SELECT * FROM  `tbl_category` where `home_status`='Home' ";
$run_cat = mysqli_query($link,$sql_cat);
while($result_cat = mysqli_fetch_assoc($run_cat))
    {
    ?>

          <div class="image-container"> 
            <div class="item">
              <a href="product.php?code=<?=$result_cat['cat_id']?>">
                <img src="category-image/<?=$result_cat['category_image'];?>" alt="<?=$result_cat['cate_name']?>" class="img-responsive" />
              </a>
              <div class="text-container">
               <a href="product.php?code=<?=$result_cat['cat_id']?>">
                <?=$result_cat['cate_name']?>
              </a>
              </div>
            </div>  
          </div> 
<?php
}
?>
<!--           <div class="image-container"> 
            <div class="item">
              <a href="#">
                <img src="assets/images/category/2.png" alt="category-2" class="img-responsive" />
              </a>
              <div class="text-container">
               <a href="#">Baby Swing</a>
              </div>
            </div>  
          </div>   
          <div class="image-container"> 
            <div class="item">
              <a href="#">
                <img src="assets/images/category/3.png" alt="category-3" class="img-responsive" />
              </a>
              <div class="text-container">
                <a href="#">Pink Baby Walker</a>
              </div>
            </div>  
          </div>   
          <div class="image-container"> 
            <div class="item">
              <a href="#">
                <img src="assets/images/category/4.png" alt="category-4" class="img-responsive" />
              </a>
              <div class="text-container">
                <a href="#">Mini Swing</a>
              </div>
            </div>  
          </div> 
          <div class="image-container"> 
            <div class="item">
              <a href="#">
                <img src="assets/images/category/5.png" alt="category-5" class="img-responsive" />
              </a>
              <div class="text-container">
                <a href="#">Toy Gun</a>
              </div>
            </div>  
          </div> 
          <div class="image-container"> 
            <div class="item">
              <a href="#">
                <img src="assets/images/category/6.png" alt="category-6" class="img-responsive" />
              </a>
              <div class="text-container">
                <a href="#">Kids Toys</a>
              </div>
            </div>  
          </div> -->

        </div>        
      </section>
      <!-- -------------------fourbanner---------- -->
      <section id="ishifourbanner" class="ishifourbannerblock">
        <div class="container"> 
          <div class="row">
<?php
    $sql_bb1 ="SELECT * FROM `tbl_banner` WHERE `banner_type`='4' LIMIT 0,1";
    $run_bb1 = mysqli_query($link,$sql_bb1);
    $result_bb1 = mysqli_fetch_assoc($run_bb1);
?>
            <div class="bannerleft col-md-4 col-sm-12">
              <div class="bannerblock">
                <a href="<?=$result_bb1['banner_link']?>" class="ishi-customhover-fadeinrotate3D">
                     <img src="header-image/<?=$result_bb1['banner_image_name']; ?>" class="img-responsive">
                </a>
              </div> 
            </div>
<?php
    $sql_bb2 ="SELECT * FROM `tbl_banner` WHERE `banner_type`='4' LIMIT 1,1";
    $run_bb2 = mysqli_query($link,$sql_bb2);
    $result_bb2 = mysqli_fetch_assoc($run_bb2);
?>
            <div class="bannercenter col-md-4 col-sm-12">
              <div class="bannerblock">
                <a href="<?=$result_bb2['banner_link']?>" class="ishi-customhover-fadeinrotate3D ">
                  <img src="header-image/<?=$result_bb2['banner_image_name'];?>" alt="banner" class="img-responsive" />
                </a>  
              </div>
<?php
    $sql_bb3 ="SELECT * FROM `tbl_banner` WHERE `banner_type`='4' LIMIT 2,1";
    $run_bb3 = mysqli_query($link,$sql_bb3);
    $result_bb3 = mysqli_fetch_assoc($run_bb3);
?>
              <div class="bannerblock">
                  <a href="<?=$result_bb3['banner_link']?>" class="ishi-customhover-fadeinrotate3D ">
                  <img src="header-image/<?=$result_bb3['banner_image_name']; ?>" alt="banner" class="img-responsive" />
                </a>  
              </div>
            </div>
<?php
    $sql_bb4 ="SELECT * FROM `tbl_banner` WHERE `banner_type`='4' LIMIT 3,1";
    $run_bb4 = mysqli_query($link,$sql_bb4);
    $result_bb4 = mysqli_fetch_assoc($run_bb4);
?>
            <div class="bannerright col-md-4 col-sm-12">
              <div class="bannerblock"> 
                <a href="<?=$result_bb4['banner_link']?>" class="ishi-customhover-fadeinrotate3D ">
                  <img src="header-image/<?=$result_bb4['banner_image_name']; ?>" alt="banner" class="img-responsive" />
                </a>  
              </div>
            </div> 
          </div>
        </div>
      </section> 
      <!-- ------------------product block---------- -->
      
      <!-- ------------------gallery block---------- -->
      
      <!-- -------------------manufacture---------- -->
      
      <!-- -------------------testimonial---------- -->
     
      <!-- -------------------special product---------- -->
      <section id="ishispecialproducts" class="container">
        <h3 class="home-title"><span class="title-icon"><span></span></span>Special Products</h3>
        <div class="block_content row">
          <div id="ishispecialproducts-carousel" class="owl-carousel products">
<?php
$sql_pro = "SELECT * FROM `tbl_product` WHERE `status`='Home'";
$run_pro = mysqli_query($link,$sql_pro);
    while($result_pro = mysqli_fetch_assoc($run_pro))
    {
        $Category_id=$result_pro['pro_category'];
        $sql_cat_s = "SELECT * FROM `tbl_category` where `cat_id`=$Category_id";
        $run_cat_s = mysqli_query($link,$sql_cat_s);
        $result_cat_s = mysqli_fetch_assoc($run_cat_s);
        ?> 
            <div class="product-thumb specialprdct">
              <div class="item">             
                <div class="image">
                  <a href="#" class="thumbnail product-thumbnail">
                    <img src="product-image/<?=$result_pro['pro_image'];?>" alt="product-img">
                    <img class="product-img-extra change" alt="product-img" src="product-image/<?=$result_pro['pro_image2'];?>">
                  </a>                 
                </div>
                <div class="caption">    
                  <div class="btn-cart">
                    <a data-button-action="add-to-cart" class="button">
                      <i class="fa fa-shopping-cart"></i> 
                      <span class="lblcart"><?=$result_pro['pro_name']?></span>
                    </a>
                  </div> 
                  <p class="price">
                    <a href="product-detail.php?pro_code=<?=$result_pro['pro_id']?>">
                          <span class="price-discount">Read More</span>    
                    </a>
                   
                  </p>                        
                  <div class="button-group">  
                    <div class="btn-quickview"> 
                      <a class="quickbox enqui" href="#">
                        <i class="fa fa-envelope-o" aria-hidden="true"></i>
                      </a>
                    </div>                  
                  </div> 
                </div> 
              </div>
            </div>
 <?php
}
?>
            
          </div>
        </div>
      </section>
     <?php
   $sql_promotion = "SELECT * FROM `tbl_small_banner1` LIMIT 0,1 ";
   $data_promotion = mysqli_query($link,$sql_promotion);
   $result_promotion = mysqli_fetch_array($data_promotion)

?>
      <section id="ishiparallaxbanner" class="clearfix">
        <div class="parallax" data-source-url="header-image/<?=$result_promotion['header_image_name'];?>" style="background-image: url('header-image/<?=$result_promotion['header_image_name'];?>');">    
          <div class="container">
            <div class="parallax-list">
              <div class="parallax-discount"><?=$result_promotion['title1'] ?></div>          
              <div class="parallax-title"><?=$result_promotion['title2'] ?></div>   
              <div class="parallax-subtitle"><?=$result_promotion['title4'] ?></div>
              <div class="parallax-btn"><a href="<?=$result_promotion['limking'] ?>" class="btn btn-primary theme-button">Enquiry Now</a></div>
            </div>
          </div>
        </div>
      </section>
      <!-- -------------------category featured product---------- -->
       <section id="ishiproductsblock" class="ishiproductsblock container">
        <h3 class="home-title"><span class="title-icon"><span></span></span>Our Categories</h3>
        <ul id="ishiproductstab" class="nav nav-tabs clearfix">
<?php
$snr=1;
$sql_cat = "SELECT * FROM `tbl_category`";
$run_cat = mysqli_query($link,$sql_cat);
while($result_cat = mysqli_fetch_assoc($run_cat))
{
?>
        <li class="nav-item <?php if($snr==1) { echo "first_item active"; } ?>">
           <a class="nav-link" href="#linkproductcategoryblock<?=$snr?>" data-toggle="tab">
             <?=$result_cat['cate_name']?>
           </a>
         </li>
<?php
$snr++;
}

?>


        </ul> 

        <div class="tab-content">
<?php
$snr=1;
$sql_cat = "SELECT * FROM `tbl_category`";
$run_cat = mysqli_query($link,$sql_cat);
while($result_cat = mysqli_fetch_assoc($run_cat))
{
  $cattt =$result_cat['cat_id'];
?>
          <div id="linkproductcategoryblock<?=$snr?>" class="tab-pane <?php if($snr==1) { echo "first_item active"; } ?>">
            <div class="row">
              <div class="banner_productblock col-lg-3 col-md-3 hidden-md-down">
            <?php
              $sql_best = "SELECT * FROM `tbl_category_img` WHERE `category_parent_id`=$cattt";
              $run_best = mysqli_query($link,$sql_best);
               $count_best = mysqli_num_rows($run_best);
               $result_best = mysqli_fetch_assoc($run_best);
               if($count_best>0)
                   {
                    ?>
                      <a class="ishi-customhover-fadeinrotate" href="<?=$result_best['category_image_linking']?>">
                        <img src="category-image/<?=$result_best['category_image_name']?>" alt="banner">
                      </a>
                    <?php
                   }
                   else
                   {
                    ?>
                      <a class="ishi-customhover-fadeinrotate" href="#">
                              <img src="assets/images/category_product-1.png" alt="banner">
                      </a>
                    <?php
                   }
                   ?>
                
              </div>
              <div class="block_content col-lg-9 col-md-12 col-sm-12 col-xs-12">
                <div id="ishi-products-category" class="owl-carousel">
<?php
 
 $sql_pro = "SELECT * FROM `tbl_product` where `pro_category`='$cattt'";
 $run_pro = mysqli_query($link,$sql_pro);
 $count_sub = mysqli_num_rows($run_pro);
 if($count_sub>0)
       {
         while($result_pro = mysqli_fetch_assoc($run_pro))
         {
    ?>
                  <div class="product-thumb specialprdct ">


                












                    <div class="item">
                      <div class="image">
                        <a href="product-detail.php?pro_code=<?=$result_pro['pro_id']?>" class="thumbnail product-thumbnail">
                          <img src="product-image/<?=$result_pro['pro_image'];?>" alt="product-img">
                        </a>
                      </div>
                      <div class="caption">    
                        <div class="btn-cart">
                          <a data-button-action="add-to-cart" class="button">
                            <i class="fa fa-shopping-cart"></i> 
                            <span class="lblcart">  <?php echo $result_pro['pro_name'];?> </span>
                          </a>
                        </div> 
                        <p class="price">
                          <a href="product-detail.php?pro_code=<?=$result_pro['pro_id']?>">
                          <span class="price-discount">Read More</span> 
                          </a>
                        </p>                        
                        <div class="button-group">  
                          <div class="btn-quickview"> 
                            <a class="quickbox enqui" href="enquiry.php">
                              <i class="fa fa-envelope-o" aria-hidden="true"></i>
                            </a>
                          </div>                  
                        </div> 
                      </div> 
                    </div>
                  </div>
                  <?php 
                           }
                           }
                           else
                           {
                           ?>      
                        <p style="text-align: center; margin: 0 auto; ">
                           <img src="comming.png" style="height: 300px;">
                        </p>
                        <?php
                           }
                           ?>



                </div>
              </div>
            </div>
          </div>

<?php
$snr++;
}

?>


        </div>
      </section>
      <!-- -------------------smartblock---------- -->
      <section id="ishitesimonial" class="ishitestimonialsblock"> 
        <div class="container">
          <h3 class="home-title"><span class="title-icon"><span></span></span>Our Client Say’s</h3>
          <div id="ishitestimonials-carousel" class="owl-carousel"> 
            <?php
 $sql_test = "SELECT * FROM `tbl_testimonial`";
    $run_test = mysqli_query($link,$sql_test);
    while($result_test = mysqli_fetch_assoc($run_test))
        {
        ?>
            <div class="item ishitestimonials-container">    
              <div class="testimonial-info">
                <span class="quote">
                  <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 298.7 298.7" style="enable-background:new 0 0 298.7 298.7;" xml:space="preserve">
                    <g>
                      <g>
                        <g>
                          <polygon points="298.7,128 234.7,128 277.3,42.7 213.3,42.7 170.7,128 170.7,256 298.7,256      "/>
                          <polygon points="128,256 128,128 64,128 106.7,42.7 42.7,42.7 0,128 0,256      "/>
                        </g>
                      </g>
                    </g>
                  </svg>
                </span>
                <div class="user-description">
                  <?=$result_test['testi_desc'];?>
                </div>
                <h3 class="user-name">
                 <?=$result_test['testi_name'];?>
                </h3>
                <div class="user-designation">
                </div>
              </div>
            </div>

<?php
    }
?>  
          </div>
        </div>
      </section>
      <!-- -------------------newsletter---------- -->



      <section id="ishimanufacturerblock" class="clearfix container">
        <div id="manufacturer-carousel" class="owl-carousel">
<?php
$sqlImage="SELECT * FROM `client_logo` WHERE `type`=1";
$data= mysqli_query($link,$sqlImage);
while($resultImg=mysqli_fetch_array($data))
{
?>
            <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="logo-images/<?=$resultImg['logo_image_name'];?>" title="Fashion Manufacturer 1" alt="Fashion Manufacturer 1">
                    </a>
                </div>
            </div>
<?php
  }
?>
            <!-- <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="assets/images/brand/logo1.png" title="Fashion Manufacturer 1" alt="Fashion Manufacturer 1">
                    </a>
                </div>
            </div>
            <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="assets/images/brand/logo2.png" title="Fashion Manufacturer 2" alt="Fashion Manufacturer 2">
                    </a>
                </div>
            </div>
            <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="assets/images/brand/logo3.png" title="Fashion Manufacturer 3" alt="Fashion Manufacturer 3">
                    </a>
                </div>
            </div>
            <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="assets/images/brand/logo4.png" title="Fashion Manufacturer 4" alt="Fashion Manufacturer 4">
                    </a>
                </div>
            </div>
            <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="assets/images/brand/logo5.png" title="Fashion Manufacturer 5" alt="Fashion Manufacturer 5">
                    </a>
                </div>
            </div>
            <div class="item">
                <div class="image-container">
                    <a href="#">
                        <img src="assets/images/brand/logo6.png" title="Fashion Manufacturer 6" alt="Fashion Manufacturer 6">
                    </a>
                </div>
            </div> -->
        </div>
      </section>
    </div>
    <!-- -----------------footer-------------------- -->
<?php
    include('include/footer.php');
?>