| Server IP : 46.202.172.170 / Your IP : 216.73.216.59 Web Server : LiteSpeed System : Linux fr-int-web1904.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64 User : u627918583 ( 627918583) PHP Version : 8.2.28 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u627918583/domains/rokamaksa.com/public_html/ar/ |
Upload File : |
<?php
session_start();
include "connection.php";
global $connection;
include "function.php";
if (!isset($_SESSION["user"])) {
$_SESSION["user"] = rand();
}
$stmt = $connection->prepare("SELECT * FROM home WHERE id = 1");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
$categories = $data['categories'];
$des = $data['des'];
$des2 = $data['des2'];
$img = $data['img'];
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$user = $_SESSION["user"];
if (!empty($_POST['product_id']) and !empty($user)){
$product_id = $_POST["product_id"];
$stmt_size = $connection->prepare("SELECT MIN(id) FROM `size` WHERE `product_id` = $product_id");
$stmt_size->execute();
$result_size = $stmt_size->get_result();
if ($result_size->num_rows > 0) {
$row_size = $result_size->fetch_assoc();
$id_size = $row_size['MIN(id)'];
}
$query = "SELECT * FROM cart WHERE product_id = $product_id AND user = '$user'";
$result = mysqli_query($connection, $query);
if (mysqli_num_rows($result) > 0) {
$product = mysqli_fetch_assoc($result);
$query = "UPDATE cart SET quantity=(quantity+1) WHERE product_id = $product_id AND user = '$user' AND size_id = '$id_size'";
$result = mysqli_query($connection, $query);
if ($result) {
header("location:../ar");
}else{
echo "no";
}
}else {
$query = "INSERT INTO cart (product_id, quantity, user, size_id) VALUES ($product_id, 1, '$user', '$id_size')";
$result = mysqli_query($connection, $query);
if ($result) {
header("location:../ar");
}else{
echo "no";
}
}
}else{
header("location:../ar");
}
}
?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<?php include "head.php"; ?>
<title>الصفحة الرئيسية - <?= $webname; ?> </title>
<meta property="og:title" content="الصفحة الرئيسية" />
<meta property="og:url" content="<?= $webLink; ?>/ar/" />
<link rel="canonical" href="<?= $webLink; ?>/ar/" />
<link rel="alternate" hreflang="ar" href="<?= $webLink; ?>/ar/" />
<link rel="alternate" hreflang="en" href="<?= $webLink; ?>/ar/" />
<style>
.s-button-btn {
height: 50px;
}
</style>
</head>
<body id="app" class="index salla-814202285 color-mode-dark rtl font-dinnextltarabic-regular bg-white topnav-is-dark mainbar-is-dark mainmenu-is-dark footer-is-dark has-breadcrumbs">
<div class="app-inner flex flex-col min-h-screen relative">
<?php include "header.php"; ?>
<section id="slider-with-bg-0" class="s-block s-block--slider-with-bg s-block--full-bg">
<div class="slider-bg has-overlay--before" style="background-image: url('../form-builder/<?= $img ?>');">
<div class="container pt-8 sm:pt-24 relative">
<div>
<h3 class="text-2xl lg:text-4xl !leading-[1.15] text-primary font-bold mb-2" style="color: #fff">
<?= $des; ?>
</h3>
<p class="text-sm mb-8 line-clamp-1 sm:line-clamp-2 max-w-lg" style="color: #fff">
<?= $des2; ?>
</p>
</div>
</div>
</div>
<div class="container -mt-60 relative overflow-hidden">
<salla-slider type="carousel" block-title=" " display-all-url="../ar/categories.php?class=<?= $categories; ?>" id="slider-with-bg-0">
<div slot="items">
<?php
$stmt = $connection->prepare("SELECT * FROM products WHERE category = '$categories' or subclass = '$categories' ORDER BY id DESC LIMIT 10");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="slide--one-fourth swiper-slide swiper-slide-active">
<div id="product-1572689738" class="product-card product-entry product-entry--vertical product-entry--fit-type">
<div class="product-entry__image">
<a href="../ar/product.php?id='.$data['id'].'">
<img class="h-full w-full transition-opacity hover:opacity-90 object-contain lazy-load" src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/'. $data['main_image'] .'" alt="'. $data['name'] .'" />
</a>
<div class="promotion-badge-wrap">';
echo $data['decPrice'] > 0 ? '<div class="promotion-badge">وفر '. ($data['price']-$data['decPrice']) .' ر.س</div>' : '';
echo '</div>
<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated sm:hidden" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(1572689738)" data-id="1572689738" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
<div class="content-wrap donating-wrap">
<div class="product-entry__content">
<h3 class="product-entry__title mt-0">
<a href="../ar/product.php?id='.$data['id'].'">'. $data['name'] .'</a>
</h3>
<div class="product-entry__price flex flex-wrap items-center space-x-2 rtl:space-x-reverse whitespace-nowrap">';
echo $data['decPrice'] > 0 ? '<h4 class="text-red-500 font-bold text-lg">'.$data['decPrice'].' ر.س</h4>
<span class="text-gray-400 line-through">'.$data['price'].' ر.س</span>' :
'<h4 class="text-gray-800 font-bold text-lg">'.$data['price'].' ر.س</h4>';
echo '</div>
</div>
<div class="flex items-center pt-4 mt-auto min-h-[50px] text-gray-600">';
echo $data['In_Stock'] > 0 ?
'<form action="'.$_SERVER["PHP_SELF"].'" method="POST" style="width: 100%;">
<input type="hidden" name="qnt" value="1" id="">
<input type="hidden" name="product_id" value="'.$data['id'].'" id="">
<salla-add-product-button type="submit" name="addCart" class="btn--add-to-cart " fill="outline" width="wide" product-id="1572689738" product-status="sale" product-type="product">
إضافة للسلة
</salla-add-product-button>
</form>': '<salla-add-product-button class="btn--add-to-cart hydrated" fill="outline" width="wide" product-id="484385405" product-status="out" product-type="product">
نفدت الكمية
</salla-add-product-button>';
echo '<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated hidden sm:flex" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(1572689738)" data-id="1572689738" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
</div>
</div>
</div>';
}
?>
</div>
</salla-slider>
</div>
</section>
<section class="s-block s-block--photos-slider overflow-hidden ">
<salla-slider type="carousel" class="photos-slider" centered auto-play loop="true" pagination id="photos-1-slider">
<div slot="items">
<?php
$stmt = $connection->prepare("SELECT * FROM slider ORDER BY id DESC");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="swiper-slide">
<a href="../ar/categories.php?class='.$data['class'].'">
<img loading="eager" src="../themes/392563753/1.76.0/images/s-empty.png" alt="../form-builder/'.$data['img'].'" data-src="../form-builder/'.$data['img'].'" class="lazy w-full object-contain rounded-md"></img>
</a>
</div>';
}
?>
</div>
</salla-slider>
</section>
<section id="main-links-1" class="s-block s-block--categories ">
<div class="container">
<salla-slider type="carousel" controls-outer show-controls="true" id="main-links-1">
<div slot="items">
<?php
$stmt = $connection->prepare("SELECT * FROM `image-smoll`");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="swiper-slide slide--one-sixth">
<a href="../ar/categories.php?class='.$data['class'].'" class="slide--cat-entry" data-emergence="hidden">
<i class="bg-cover " style="background-image: url(../form-builder/'.$data['img'].')"></i>
<h4>'.$data['class'].'</h4>
<span></span>
</a>
</div>';
}
?>
</div>
</salla-slider>
</div>
</section>
<?php
$stmt_categories = $connection->prepare("SELECT * FROM `categories` WHERE `title` = 'افضل العروض' AND `home` = 1");
$stmt_categories->execute();
$row_categories = $stmt_categories->get_result();
while ($data_categories = $row_categories->fetch_assoc()){
if ($data_categories['home'] == 1) {
$title = $data_categories['title'];
$stmt_images = $connection->prepare("SELECT * FROM images WHERE category = '$title'");
$stmt_images->execute();
$row_images = $stmt_images->get_result();
while ($data_images = $row_images->fetch_assoc()){
$category = $data_images["category"];
echo '<section class="s-block s-block--fixed-banner wide-placeholder">
<div class="container">
<a href="../ar/categories.php?class='.$data_images["category"].'" class="banner banner--fixed" aria-label="Banner ">
<img class="lazy-load w-full object-cover" src="../392563753/1.67.0/images/s-empty.png" data-src="../form-builder/'.$data_images["image"].'" alt="'.$data_images["category"].'" />
</a>
</div>
</section>
<section id="best-offers-5-slider" class="s-block s-block--best-offers container overflow-hidden">
<salla-slider type="carousel" block-title="عروض '.$webname.'" block-subTitle display-all-url="../ar/categories.php?class='.$category.'" auto-play id="best-offers-5-slider">
<div slot="items">';
$stmt = $connection->prepare("SELECT * FROM products WHERE best_offers = '$category' ORDER BY id DESC LIMIT 10");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="slide--one-fourth">
<div id="product-745470043" class="product-card product-entry product-entry--vertical product-entry--fit-type">
<div class="product-entry__image">
<a href="../ar/product.php?id='.$data['id'].'">
<img class="h-full w-full transition-opacity hover:opacity-90 object-contain lazy-load" src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/'. $data['main_image'] .'" alt="'. $data['name'] .'" />
</a>
<div class="promotion-badge-wrap">';
echo $data['decPrice'] > 0 ? '<div class="promotion-badge">وفر '. ($data['price']-$data['decPrice']) .' ر.س</div>' : '';
echo '</div>
<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated sm:hidden" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(745470043)" data-id="745470043" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
<div class="content-wrap donating-wrap">
<div class="product-entry__content">
<h3 class="product-entry__title mt-0">
<a href="../ar/product.php?id='.$data['id'].'">'. $data['name'] .'</a>
</h3>
<div class="product-entry__price flex flex-wrap items-center space-x-2 rtl:space-x-reverse whitespace-nowrap">';
echo $data['decPrice'] > 0 ? '<h4 class="text-red-500 font-bold text-lg">'.$data['decPrice'].' ر.س</h4>
<span class="text-gray-400 line-through">'.$data['price'].' ر.س</span>' :
'<h4 class="text-gray-800 font-bold text-lg">'.$data['price'].' ر.س</h4>';
echo '</div>
</div>
<div class="flex items-center pt-4 mt-auto min-h-[50px] text-gray-600">';
echo $data['In_Stock'] > 0 ?
'<form action="'.$_SERVER["PHP_SELF"].'" method="POST" style="width: 100%;">
<input type="hidden" name="qnt" value="1" id="">
<input type="hidden" name="product_id" value="'.$data['id'].'" id="">
<salla-add-product-button type="submit" name="addCart" class="btn--add-to-cart " fill="outline" width="wide" product-id="1572689738" product-status="sale" product-type="product">
إضافة للسلة
</salla-add-product-button>
</form>': '<salla-add-product-button class="btn--add-to-cart hydrated" fill="outline" width="wide" product-id="484385405" product-status="out" product-type="product">
نفدت الكمية
</salla-add-product-button>';
echo '<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated hidden sm:flex" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(745470043)" data-id="745470043" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
</div>
</div>
</div>';
}
?>
</div>
</salla-slider>
</section>
<?php }
}
}
?>
<?php
$stmt_categories = $connection->prepare("SELECT * FROM categories WHERE title != 'افضل العروض'");
$stmt_categories->execute();
$row_categories = $stmt_categories->get_result();
while ($data_categories = $row_categories->fetch_assoc()){
if ($data_categories['home'] == 1) {
$title = $data_categories['title'];
$stmt_images = $connection->prepare("SELECT * FROM images WHERE category = '$title'");
$stmt_images->execute();
$row_images = $stmt_images->get_result();
while ($data_images = $row_images->fetch_assoc()){
$category = $data_images["category"];
echo '<section class="s-block s-block--fixed-banner wide-placeholder">
<div class="container">
<a href="../ar/categories.php?class='.$data_images["category"].'" class="banner banner--fixed" aria-label="Banner ">
<img class="lazy-load w-full object-cover" src="../392563753/1.67.0/images/s-empty.png" data-src="../form-builder/'.$data_images["image"].'" alt="'.$data_images["category"].'" />
</a>
</div>
</section>
<section id="best-offers-5-slider" class="s-block s-block--best-offers container overflow-hidden">
<salla-slider type="carousel" block-title="'.$category.'" block-subTitle display-all-url="../ar/categories.php?class='.$category.'" auto-play id="best-offers-5-slider">
<div slot="items">';
$stmt = $connection->prepare("SELECT * FROM products WHERE category = '$category' ORDER BY id DESC LIMIT 10");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="slide--one-fourth">
<div id="product-745470043" class="product-card product-entry product-entry--vertical product-entry--fit-type">
<div class="product-entry__image">
<a href="../ar/product.php?id='.$data['id'].'">
<img class="h-full w-full transition-opacity hover:opacity-90 object-contain lazy-load" src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/'. $data['main_image'] .'" alt="'. $data['name'] .'" />
</a>
<div class="promotion-badge-wrap">';
echo $data['decPrice'] > 0 ? '<div class="promotion-badge">وفر '. ($data['price']-$data['decPrice']) .' ر.س</div>' : '';
echo '</div>
<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated sm:hidden" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(745470043)" data-id="745470043" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
<div class="content-wrap donating-wrap">
<div class="product-entry__content">
<h3 class="product-entry__title mt-0">
<a href="../ar/product.php?id='.$data['id'].'">'. $data['name'] .'</a>
</h3>
<div class="product-entry__price flex flex-wrap items-center space-x-2 rtl:space-x-reverse whitespace-nowrap">';
echo $data['decPrice'] > 0 ? '<h4 class="text-red-500 font-bold text-lg">'.$data['decPrice'].' ر.س</h4>
<span class="text-gray-400 line-through">'.$data['price'].' ر.س</span>' :
'<h4 class="text-gray-800 font-bold text-lg">'.$data['price'].' ر.س</h4>';
echo '</div>
</div>
<div class="flex items-center pt-4 mt-auto min-h-[50px] text-gray-600">';
echo $data['In_Stock'] > 0 ?
'<form action="'.$_SERVER["PHP_SELF"].'" method="POST" style="width: 100%;">
<input type="hidden" name="qnt" value="1" id="">
<input type="hidden" name="product_id" value="'.$data['id'].'" id="">
<salla-add-product-button type="submit" name="addCart" class="btn--add-to-cart " fill="outline" width="wide" product-id="1572689738" product-status="sale" product-type="product">
إضافة للسلة
</salla-add-product-button>
</form>': '<salla-add-product-button class="btn--add-to-cart hydrated" fill="outline" width="wide" product-id="484385405" product-status="out" product-type="product">
نفدت الكمية
</salla-add-product-button>';
echo '<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated hidden sm:flex" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(745470043)" data-id="745470043" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
</div>
</div>
</div>';
}
?>
</div>
</salla-slider>
</section>
<?php }
}
}
?>
<?php
$stmt_categories = $connection->prepare("SELECT * FROM menu");
$stmt_categories->execute();
$row_categories = $stmt_categories->get_result();
while ($data_categories = $row_categories->fetch_assoc()){
if ($data_categories['home'] == 1) {
$title = $data_categories['menu_name'];
$stmt_images = $connection->prepare("SELECT * FROM images WHERE category = '$title'");
$stmt_images->execute();
$row_images = $stmt_images->get_result();
while ($data_images = $row_images->fetch_assoc()){
$category = $data_images["category"];
echo '<section class="s-block s-block--fixed-banner wide-placeholder">
<div class="container">
<a href="../ar/categories.php?class='.$data_images["category"].'" class="banner banner--fixed" aria-label="Banner ">
<img class="lazy-load w-full object-cover" src="../392563753/1.67.0/images/s-empty.png" data-src="../form-builder/'.$data_images["image"].'" alt="'.$data_images["category"].'" />
</a>
</div>
</section>
<section id="best-offers-5-slider" class="s-block s-block--best-offers container overflow-hidden">
<salla-slider type="carousel" block-title="'.$category.'" block-subTitle display-all-url="../ar/categories.php?class='.$category.'" auto-play id="best-offers-5-slider">
<div slot="items">';
$stmt = $connection->prepare("SELECT * FROM products WHERE subclass = '$category' ORDER BY id DESC LIMIT 10");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="slide--one-fourth">
<div id="product-745470043" class="product-card product-entry product-entry--vertical product-entry--fit-type">
<div class="product-entry__image">
<a href="../ar/product.php?id='.$data['id'].'">
<img class="h-full w-full transition-opacity hover:opacity-90 object-contain lazy-load" src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/'. $data['main_image'] .'" alt="'. $data['name'] .'" />
</a>
<div class="promotion-badge-wrap">';
echo $data['decPrice'] > 0 ? '<div class="promotion-badge">وفر '. ($data['price']-$data['decPrice']) .' ر.س</div>' : '';
echo '</div>
<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated sm:hidden" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(745470043)" data-id="745470043" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
<div class="content-wrap donating-wrap">
<div class="product-entry__content">
<h3 class="product-entry__title mt-0">
<a href="../ar/product.php?id='.$data['id'].'">'. $data['name'] .'</a>
</h3>
<div class="product-entry__price flex flex-wrap items-center space-x-2 rtl:space-x-reverse whitespace-nowrap">';
echo $data['decPrice'] > 0 ? '<h4 class="text-red-500 font-bold text-lg">'.$data['decPrice'].' ر.س</h4>
<span class="text-gray-400 line-through">'.$data['price'].' ر.س</span>' :
'<h4 class="text-gray-800 font-bold text-lg">'.$data['price'].' ر.س</h4>';
echo '</div>
</div>
<div class="flex items-center pt-4 mt-auto min-h-[50px] text-gray-600">';
echo $data['In_Stock'] > 0 ?
'<form action="'.$_SERVER["PHP_SELF"].'" method="POST" style="width: 100%;">
<input type="hidden" name="qnt" value="1" id="">
<input type="hidden" name="product_id" value="'.$data['id'].'" id="">
<salla-add-product-button type="submit" name="addCart" class="btn--add-to-cart " fill="outline" width="wide" product-id="1572689738" product-status="sale" product-type="product">
إضافة للسلة
</salla-add-product-button>
</form>': '<salla-add-product-button class="btn--add-to-cart hydrated" fill="outline" width="wide" product-id="484385405" product-status="out" product-type="product">
نفدت الكمية
</salla-add-product-button>';
echo '<salla-button shape="icon" fill="outline" color="light" aria-label="Add or remove to wishlist" class="btn--wishlist animated hidden sm:flex" onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(745470043)" data-id="745470043" data-cf-modified-f731341db8f6bc28305eb605->
<i class="sicon-heart"></i>
</salla-button>
</div>
</div>
</div>
</div>';
}
?>
</div>
</salla-slider>
</section>
<?php }
}
}
?>
<section class="s-block s-block--testimonials s-block--full-bg bg-gray-50 py-5 sm:py-12">
<div class="container">
<salla-slider type="carousel" class="testimonials-slider" auto-play display-all-url="" block-title="آراء العملاء" id="testimonials-29-slider">
<div slot="items">
<?php
$stmt = $connection->prepare("SELECT * FROM `coments`");
$stmt->execute();
$row = $stmt->get_result();
while ($data = $row->fetch_assoc()){
echo '<div class="swiper-slide slide--one-third pt-8">
<div class="border bg-white rounded relative p-5 pt-10 h-full flex flex-col items-start transition-all duration-300 hover:-translate-y-1">
<i class="sicon-quote-open w-12 h-12 inline-flex justify-center items-center text-3xl bg-primary text-primary-reverse rounded-full absolute rtl:right-4 ltr:left-4 top-0 -translate-y-1/2"></i>
<div class="mb-4 inline-block">
<salla-rating-stars value="'.$data['star'].'" size="small"></salla-rating-stars>
</div>
<p class="leading-6 mt-4 sm:mt-0 text-gray-600">'.$data['comment'].'</p>
<div class="mt-auto">
<header class="flex items-center space-x-2 rtl:space-x-reverse mt-6">';
if ($data["gnd"] == 1) {
echo '<img src="https://cdn.assets.salla.network/stores/themes/default/assets/images/avatar_male.png" alt="'.$data['name'].'" class="w-9 h-9 rounded-full object-cover">';
} else {
echo '<img src="https://cdn.assets.salla.network/stores/themes/default/assets/images/avatar_female.png" alt="'.$data['name'].'" class="w-9 h-9 rounded-full object-cover">';
}
echo '<h4 class="font-bold text-xs sm:text-sm">'.$data['name'].'</h4>
</header>
</div>
</div>
</div>';
}
?>
</div>
</salla-slider>
</div>
</section>
<?php include "footer.php"; ?>
<div class="hidden grid-cols-4 h-fit self-end grayscale sm:items-start sm:items-end"></div>
<div class="overlay-layer has-overlay--after"></div>
</div>
<?php include "script.php"; ?>
</body>
</html>