403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u627918583/domains/rokamaksa.com/public_html/ar/product.php
<?php
session_start();
include "connection.php";
global $connection;
include "function.php";
$id = $_GET['id'];

$stmt = $connection->prepare("SELECT * FROM products WHERE id = $id");
$stmt->execute();
$row = $stmt->get_result();
$price1 = 0;
$decPrice1 = 0;
while ($data = $row->fetch_assoc()) {
  $isID = $data['id'];
  $name = $data['name'];
  $main_image = $data['main_image'];
  $gallery1 = $data['gallery1'];
  $gallery2 = $data['gallery2'];
  $gallery3 = $data['gallery3'];
  $gallery4 = $data['gallery4'];
  $description = $data['description'];
  $price = $data['price'];
  $decPrice = $data['decPrice'];
  $price1 = $data['price'];
  $decPrice1 = $data['decPrice'];
  $category = $data['category'];
  $subclass = $data['subclass'];
  $In_Stock = $data['In_Stock'];
  $size = $data['size'];
}

if ($_SERVER["REQUEST_METHOD"] == "POST") {
  if (isset($_SESSION["user"])) {
    $user = $_SESSION["user"];
    if (!empty($_POST['product_id']) and !empty($user)) {
      $product_id = $_POST["product_id"];
      $qnt = $_POST["qnt"];

      $query = "SELECT * FROM cart WHERE product_id = ? AND user = ?";

      if ($size == 1) {
        $size_post = $_POST["size"];

        $stmt = $connection->prepare($query);
        $stmt->bind_param("is", $product_id, $user);
        $stmt->execute();
        $result = $stmt->get_result();

        $found = false;

        while ($data = $result->fetch_assoc()) {
          if ($data["size_id"] == $size_post) {
            $stmt_update = $connection->prepare("UPDATE cart SET quantity = (quantity + ?) WHERE product_id = ? AND user = ? AND size_id = ?");
            $stmt_update->bind_param("iisi", $qnt, $product_id, $user, $size_post);
            $stmt_update->execute();
            $found = true;
            break;
          }
        }

        if (!$found) {
          $stmt_insert = $connection->prepare("INSERT INTO cart (product_id, quantity, user, size_id) VALUES (?, ?, ?, ?)");
          $stmt_insert->bind_param("iisi", $product_id, $qnt, $user, $size_post);
          $stmt_insert->execute();
        }

      } else {
        if (mysqli_num_rows($result) > 0) {
          $query = "UPDATE cart SET quantity=(quantity+$qnt) WHERE product_id = $product_id AND user = '$user'";
          $result = mysqli_query($connection, $query);
        } else {
          $query = "INSERT INTO cart (product_id, quantity, user) VALUES ($product_id, $qnt, '$user')";
          $result = mysqli_query($connection, $query);
        }
      }
    }
  }
}

$stmt_size = $connection->prepare("SELECT MIN(id) FROM `size` WHERE `product_id` = $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)'];
}
?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">

<head>
  <?php include "head.php"; ?>
  <title><?php echo $name; ?> - <?= $webname; ?> </title>
  <meta property="og:title" content="<?php echo $name; ?> " />
  <meta property="og:url" content="<?= $webLink ?>/ar/product.php" />
  <link rel="canonical" href="<?= $webLink ?>/ar/product.php" />
  <link rel="alternate" hreflang="ar" href="<?= $webLink ?>/ar/product.php" />
  <link rel="alternate" hreflang="en" href="<?= $webLink ?>/ar/product.php" />
</head>

<body id="app"
  class="product-single 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"; ?>
    <div class="container page-container product-has-options">
      <div class="space-y-10">
        <div class="flex flex-col items-start md:flex-row" id="product-2036710849">
          <div
            class="sidebar md:sticky top-14 w-full md:!w-1/2 shrink-0 has-many-images img-is-contain has-promotion-title">
            <div class="details-slider-wrapper">
              <salla-slider id="details-slider-2036710849" class="details-slider" type="thumbs"
                listen-to-thumbnails-option loop="false" arrows-centered show-thumbs-controls="false" vertical-thumbs>
                <span class="promotion-badge-wrap">
                  <?php echo $decPrice1 > 0 ? '<span class="promotion-badge">وفر ' . ($price1 - $decPrice1) . ' ر.س</span>' : '' ?>
                </span>
                <div slot="items">
                  <div class="swiper-slide">
                    <a data-fslightbox="product_2036710849" data-img-id="103828427" data-slid-index="0"
                      data-caption="<?php echo $name; ?>" data-infinite="false" data-type="image"
                      href="../BEqq<?php echo $main_image; ?>" aria-label="<?php echo $name; ?>">
                      <img fetchpriority="high" loading="eager" src="../BEqq<?php echo $main_image; ?>"
                        alt="<?php echo $name; ?>" class="h-full object-contain w-full ">
                      <span class="sicon-arrow-expand image-expand-icon"></span>
                    </a>
                  </div>
                  <?php
                  echo $gallery1 == '' ? '' : '<div class="swiper-slide">
                        <a data-fslightbox="product_2036710849" data-img-id="54396642" data-slid-index="4" data-caption="<?php echo $name; ?>" data-infinite="false" data-type="image" href="../BEqq/' . $gallery1 . '" aria-label="' . $name . '">
                          <img src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/' . $gallery1 . '" alt="' . $name . '" class="lazy h-full object-contain w-full ">
                          <span class="sicon-arrow-expand image-expand-icon"></span>
                        </a>
                      </div>';
                  ?>
                  <?php
                  echo $gallery2 == '' ? '' : '<div class="swiper-slide">
                        <a data-fslightbox="product_2036710849" data-img-id="54396642" data-slid-index="4" data-caption="<?php echo $name; ?>" data-infinite="false" data-type="image" href="../BEqq/' . $gallery2 . '" aria-label="' . $name . '">
                          <img src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/' . $gallery2 . '" alt="' . $name . '" class="lazy h-full object-contain w-full ">
                          <span class="sicon-arrow-expand image-expand-icon"></span>
                        </a>
                      </div>';
                  ?>
                  <?php
                  echo $gallery3 == '' ? '' : '<div class="swiper-slide">
                        <a data-fslightbox="product_2036710849" data-img-id="54396642" data-slid-index="4" data-caption="<?php echo $name; ?>" data-infinite="false" data-type="image" href="../BEqq/' . $gallery3 . '" aria-label="' . $name . '">
                          <img src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/' . $gallery3 . '" alt="' . $name . '" class="lazy h-full object-contain w-full ">
                          <span class="sicon-arrow-expand image-expand-icon"></span>
                        </a>
                      </div>';
                  ?>
                  <?php
                  echo $gallery4 == '' ? '' : '<div class="swiper-slide">
                        <a data-fslightbox="product_2036710849" data-img-id="54396642" data-slid-index="4" data-caption="<?php echo $name; ?>" data-infinite="false" data-type="image" href="../BEqq/' . $gallery4 . '" aria-label="' . $name . '">
                          <img src="../themes/392563753/1.67.0/images/s-empty.png" data-src="../BEqq/' . $gallery4 . '" alt="' . $name . '" class="lazy h-full object-contain w-full ">
                          <span class="sicon-arrow-expand image-expand-icon"></span>
                        </a>
                      </div>';
                  ?>
                </div>
                <div slot="thumbs">
                  <div class="swiper-slide  ">
                    <img src="../BEqq<?php echo $main_image; ?>" loading="eager" fetchpriority="high"
                      class="object-cover w-full h-full" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" />
                  </div>
                  <?php
                  echo $gallery1 == '' ? '' : '<div class="swiper-slide  ">
                      <img data-src="../BEqq/' . $gallery1 . '" src="https://cdn.assets.salla.network/themes/392563753/1.67.0/images/s-empty.png" class="object-cover w-full h-full lazy-load" title="' . $name . '" alt="' . $name . '" />
                    </div>';
                  ?>
                  <?php
                  echo $gallery2 == '' ? '' : '<div class="swiper-slide  ">
                      <img data-src="../BEqq/' . $gallery2 . '" src="https://cdn.assets.salla.network/themes/392563753/1.67.0/images/s-empty.png" class="object-cover w-full h-full lazy-load" title="' . $name . '" alt="' . $name . '" />
                    </div>';
                  ?>
                  <?php
                  echo $gallery3 == '' ? '' : '<div class="swiper-slide  ">
                      <img data-src="../BEqq/' . $gallery3 . '" src="https://cdn.assets.salla.network/themes/392563753/1.67.0/images/s-empty.png" class="object-cover w-full h-full lazy-load" title="' . $name . '" alt="' . $name . '" />
                    </div>';
                  ?>
                  <?php
                  echo $gallery4 == '' ? '' : '<div class="swiper-slide  ">
                      <img data-src="../BEqq/' . $gallery4 . '" src="https://cdn.assets.salla.network/themes/392563753/1.67.0/images/s-empty.png" class="object-cover w-full h-full lazy-load" title="' . $name . '" alt="' . $name . '" />
                    </div>';
                  ?>
                </div>
              </salla-slider>
            </div>
          </div>
          <div class="main-content md:sticky top-24 w-full md:w-1/2 rtl:md:pr-8 ltr:md:pl-8 space-y-2.5 sm:space-y-5">
            <nav class="breadcrumbs w-full py-3 sm:py-5">
              <ol class="flex items-center flex-wrap text-sm">
                <li class="whitespace-nowrap"><a href="../ar/" class="fix-align text-primary">الرئيسية</a></li>
                <li><i class="sicon-keyboard_arrow_left ltr:-scale-x-100 inline-block arrow mx-2"></i></li>
                <?php
                echo $category != '' ? '<li class="whitespace-nowrap"><a href="../ar/categories.php?class=' . $category . '" class="fix-align text-primary">' . $category . '</a></li>
                                            <li><i class="sicon-keyboard_arrow_left ltr:-scale-x-100 inline-block arrow mx-2"></i></li>' : '';
                echo $subclass != '' ? '<li class="whitespace-nowrap"><a href="../ar/categories.php?class=' . $subclass . '" class="fix-align text-primary">' . $subclass . '</a></li>
                                            <li><i class="sicon-keyboard_arrow_left ltr:-scale-x-100 inline-block arrow mx-2"></i></li>' : '';
                ?>
                <li><span class="fix-align opacity-70"> <?php echo $name; ?> </span></li>
              </ol>
            </nav>
            <div>
              <h1 class="text-2xl sm:text-3xl font-bold text-gray-800"><?php echo $name; ?></h1>
              <h3 class="product-entry__sub-title">الحالة: <span
                  style="color: #3b8117;"><?php echo $In_Stock > 0 ? "متوفر في المخزون $In_Stock منتجات" : 'غير متوفر في المخزون'; ?></span>
              </h3>
            </div>
            <div class="share-rate-area flex justify-between items-center">
              <div class="flex items-center">
                <salla-button class="btn--wishlist" data-id="2036710849"
                  onclick="if (!window.__cfRLUnblockHandlers) return false; salla.wishlist.toggle(2036710849)"
                  shape="link" loader-position="center" color="gray" data-cf-modified-0ff8f3eb07d75df63503795e->
                  <i class="sicon-heart mx-2"></i>
                  <span>إضافة لقائمة الأمنيات</span>
                </salla-button>
              </div>
              <div class="hidden md:flex">
                <salla-social-share url="" url-name="" platforms="facebook,twitter,whatsapp,email,copy_link"
                  class="hydrated"><!---->
                  <div class="s-social-share-wrapper">
                    <slot-fb name="widget">
                      <salla-button aria-label="Share" class="s-social-share-btn s-button-wrap hydrated" shape="icon"
                        color="light" fill="outline" size="medium" width="normal"><!---->
                        <button aria-label="Share"
                          class="s-social-share-btn s-button-element s-button-icon s-button-outline s-button-light-outline s-button-loader-center"
                          type="button">
                          <span class="s-button-text"><span><!-- Generated by IcoMoon.io -->
                              <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                                viewBox="0 0 32 32">
                                <title>cancel</title>
                                <path
                                  d="M17.885 16l7.057-7.057c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-7.057 7.057-7.057-7.057c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l7.057 7.057-7.057 7.057c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l7.057-7.057 7.057 7.057c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z">
                                </path>
                              </svg>
                            </span>
                          </span>
                        </button>
                      </salla-button>
                    </slot-fb>
                    <ul class="s-social-share-list a2a_kit share opened"
                      data-a2a-url="<?= $webLink; ?>/ar/product.php?id=<?= $id; ?>"
                      data-a2a-title="<?= $name; ?> - <?= $webname; ?> "
                      style="transform: translateY(0px); opacity: 1;">
                      <li style="transform: translateZ(0px) translateY(0px) scaleY(1); opacity: 1;">
                        <a class="a2a_button_facebook" aria-label="Share Via facebook">
                          <span class="s-social-share-icon"><!-- Generated by IcoMoon.io -->
                            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                              viewBox="0 0 32 32">
                              <title>facebook</title>
                              <path
                                d="M19 32h-6c-0.552 0-1-0.448-1-1v0-13h-3c-0.552 0-1-0.448-1-1v0-5c0-0.552 0.448-1 1-1v0h3v-4c0-3.866 3.134-7 7-7v0h4c0.552 0 1 0.448 1 1v0 5c0 0.552-0.448 1-1 1v0h-2c-0.552 0-1 0.448-1 1v0 3h5c0.552 0 1 0.448 1 1 0 0.134-0.026 0.262-0.074 0.379l0.002-0.007-2 5c-0.152 0.371-0.51 0.628-0.928 0.628h-3v13c0 0.552-0.448 1-1 1v0zM14 30h4v-13c0-0.552 0.448-1 1-1v0h3.324l1.2-3h-4.524c-0.552 0-1-0.448-1-1v0-4c0-1.657 1.343-3 3-3v0h1v-3h-3c-2.761 0-5 2.239-5 5v0 5c0 0.552-0.448 1-1 1v0h-3v3h3c0.552 0 1 0.448 1 1v0z">
                              </path>
                            </svg>
                          </span>
                        </a>
                      </li>
                      <li style="transform: translateZ(0px) translateY(0px) scaleY(1); opacity: 1;">
                        <a class="a2a_button_twitter" aria-label="Share Via twitter">
                          <span class="s-social-share-icon"><!-- Generated by IcoMoon.io -->
                            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                              viewBox="0 0 32 32">
                              <title>twitter</title>
                              <path
                                d="M10.436 30c-0.012 0-0.026 0-0.041 0-3.691 0-7.129-1.088-10.009-2.961l0.071 0.043c-0.279-0.181-0.46-0.49-0.46-0.842 0-0.123 0.022-0.24 0.063-0.349l-0.002 0.007c0.148-0.387 0.516-0.657 0.948-0.657 0.042 0 0.083 0.003 0.123 0.007l-0.005-0c0.399 0.049 0.86 0.077 1.328 0.077 1.836 0 3.57-0.432 5.108-1.199l-0.066 0.030c-1.941-0.823-3.42-2.412-4.079-4.377l-0.015-0.051c-0.033-0.095-0.053-0.205-0.053-0.32 0-0.255 0.096-0.488 0.253-0.665l-0.001 0.001 0.062-0.062c-1.511-1.323-2.46-3.254-2.462-5.408v-0c0-0 0-0.001 0-0.001 0-0.374 0.194-0.703 0.488-0.89l0.004-0.003c0.115-0.070 0.25-0.121 0.393-0.145l0.007-0.001c-0.534-0.978-0.848-2.141-0.848-3.379 0-1.329 0.362-2.574 0.994-3.641l-0.018 0.033c0.176-0.301 0.498-0.501 0.866-0.501 0.312 0 0.591 0.143 0.774 0.367l0.001 0.002c2.627 3.213 6.397 5.405 10.682 5.953l0.082 0.009c0-0.098 0-0.2 0-0.302 0-0.001 0-0.002 0-0.002 0-3.949 3.201-7.15 7.15-7.15 1.852 0 3.54 0.704 4.81 1.86l-0.006-0.005c1.165-0.288 2.19-0.719 3.127-1.282l-0.051 0.028c0.146-0.088 0.323-0.141 0.512-0.141 0.552 0 1 0.448 1 1 0 0.109-0.017 0.214-0.050 0.312l0.002-0.007c-0.151 0.464-0.324 0.861-0.531 1.237l0.019-0.037c0.117-0.052 0.253-0.082 0.396-0.082 0.552 0 1 0.448 1 1 0 0.208-0.064 0.401-0.172 0.561l0.002-0.004c-0.812 1.212-1.772 2.247-2.87 3.114l-0.028 0.022c0 0.1 0 0.2 0 0.306 0 0.051 0.001 0.111 0.001 0.171 0 10.12-8.204 18.324-18.324 18.324-0.062 0-0.124-0-0.186-0.001l0.009 0zM5 27.084c1.616 0.58 3.481 0.916 5.424 0.916 0.004 0 0.008 0 0.013 0h-0.001c0.048 0 0.104 0.001 0.161 0.001 9.027 0 16.344-7.317 16.344-16.344 0-0.055-0-0.11-0.001-0.165l0 0.008c0-0.256 0-0.502-0.022-0.746-0.001-0.014-0.001-0.031-0.001-0.049 0-0.335 0.165-0.632 0.418-0.813l0.003-0.002q0.312-0.222 0.6-0.466l-0.364 0.052c-0.038 0.005-0.082 0.008-0.126 0.008-0.552 0-1-0.448-1-1 0-0.363 0.193-0.68 0.482-0.856l0.004-0.003q0.222-0.134 0.428-0.286c-0.3 0.082-0.6 0.154-0.912 0.214-0.059 0.012-0.127 0.020-0.197 0.020-0.286 0-0.544-0.12-0.727-0.313l-0-0c-0.943-1.007-2.28-1.634-3.764-1.634-2.845 0-5.152 2.307-5.152 5.152 0 0.001 0 0.002 0 0.002v-0c-0 0.020-0 0.043-0 0.066 0 0.395 0.043 0.781 0.125 1.151l-0.007-0.035c0.017 0.069 0.027 0.148 0.027 0.23 0 0.242-0.086 0.463-0.228 0.636l0.001-0.002c-0.177 0.219-0.445 0.358-0.746 0.358-0.024 0-0.047-0.001-0.071-0.003l0.003 0c-4.85-0.253-9.167-2.342-12.31-5.577l-0.004-0.005c-0.098 0.376-0.155 0.808-0.155 1.253 0 1.778 0.902 3.345 2.272 4.27l0.018 0.012c0.27 0.182 0.446 0.487 0.446 0.832 0 0.552-0.448 1-1 1-0.008 0-0.015-0-0.023-0l0.001 0c-0.548-0.010-1.074-0.082-1.577-0.21l0.047 0.010c0.554 1.812 2.029 3.181 3.866 3.574l0.034 0.006c0.458 0.097 0.797 0.499 0.797 0.979 0 0.456-0.305 0.841-0.722 0.961l-0.007 0.002c-0.412 0.117-0.89 0.198-1.383 0.225l-0.017 0.001c0.926 1.304 2.415 2.156 4.105 2.2l0.007 0c0.546 0.009 0.984 0.453 0.984 1 0 0.319-0.15 0.603-0.382 0.787l-0.002 0.002c-1.596 1.249-3.522 2.154-5.625 2.568l-0.085 0.014z">
                              </path>
                            </svg>
                          </span>
                        </a>
                      </li>
                      <li style="transform: translateZ(0px) translateY(0px) scaleY(1); opacity: 1;">
                        <a class="a2a_button_whatsapp" aria-label="Share Via whatsapp">
                          <span class="s-social-share-icon"><!-- Generated by IcoMoon.io -->
                            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                              viewBox="0 0 32 32">
                              <title>whatsapp</title>
                              <path
                                d="M16 32c-0.008 0-0.018 0-0.028 0-3.1 0-5.993-0.887-8.439-2.421l0.066 0.039-7.2 2.3 2.336-6.964c-1.713-2.492-2.736-5.575-2.736-8.897 0-0.020 0-0.040 0-0.060v0.003c0.009-8.833 7.167-15.991 15.999-16h0.001c8.837 0 16 7.163 16 16s-7.163 16-16 16v0zM7.906 27.424l0.4 0.264c2.169 1.449 4.837 2.312 7.707 2.312 7.732 0 14-6.268 14-14s-6.268-14-14-14c-0.004 0-0.009 0-0.013 0h0.001c-7.729 0.008-13.992 6.271-14 13.999v0.001c-0 0.010-0 0.021-0 0.032 0 3.072 1 5.909 2.693 8.206l-0.027-0.038 0.304 0.416-1.4 4.2zM20.716 24.958c-1.684-0.131-3.237-0.574-4.641-1.271l0.073 0.033c-3.098-1.456-5.634-3.668-7.438-6.405l-0.042-0.067c-1.102-1.357-1.819-3.067-1.962-4.938l-0.002-0.030c-0.001-0.036-0.001-0.078-0.001-0.12 0-1.575 0.66-2.995 1.719-4l0.002-0.002c0.547-0.52 1.289-0.839 2.105-0.839 0.033 0 0.066 0.001 0.099 0.002l-0.005-0c0.2 0 0.378 0 0.542 0.018 0.016-0.001 0.035-0.001 0.054-0.001 0.815 0 1.502 0.549 1.711 1.298l0.003 0.012 0.324 0.782c0.376 0.906 0.858 2.068 0.942 2.244 0.144 0.251 0.23 0.552 0.23 0.873 0 0.286-0.068 0.557-0.188 0.797l0.005-0.010c-0.149 0.307-0.332 0.57-0.55 0.802l0.002-0.002c-0.148 0.168-0.248 0.274-0.346 0.378s-0.172 0.18-0.26 0.284c0.575 0.92 1.237 1.713 1.992 2.406l0.008 0.008c0.829 0.758 1.802 1.373 2.872 1.8l0.064 0.022c0.369-0.266 0.672-0.6 0.896-0.985l0.008-0.015 0.174-0.232c0.328-0.484 0.875-0.798 1.495-0.798 0.249 0 0.487 0.051 0.703 0.142l-0.012-0.004c0.492 0.168 2.922 1.372 2.946 1.384l0.228 0.11c0.415 0.149 0.758 0.417 0.996 0.763l0.004 0.007c0.107 0.349 0.169 0.75 0.169 1.166 0 0.591-0.125 1.153-0.349 1.661l0.010-0.026c-0.702 1.368-1.983 2.353-3.511 2.637l-0.031 0.005c-0.309 0.071-0.663 0.112-1.028 0.112-0.004 0-0.007 0-0.011 0h0.001zM10.632 9.318c-0.028-0.002-0.062-0.004-0.095-0.004-0.245 0-0.472 0.076-0.659 0.206l0.004-0.002c-0.726 0.651-1.18 1.591-1.18 2.638 0 0.044 0.001 0.087 0.002 0.13l-0-0.006c0.122 1.404 0.662 2.662 1.495 3.671l-0.009-0.011 0.12 0.168c1.627 2.491 3.865 4.46 6.504 5.723l0.096 0.041c3.136 1.288 3.916 1.124 4.426 1.014 0.87-0.159 1.601-0.656 2.067-1.347l0.007-0.011c0.12-0.316 0.204-0.682 0.237-1.063l0.001-0.015-0.040-0.018-0.256-0.124c-0.8-0.4-2.46-1.2-2.734-1.292l-0.058 0.184c-0.346 0.501-0.684 0.934-1.045 1.347l0.015-0.017c-0.344 0.349-0.821 0.565-1.349 0.565-0.28 0-0.546-0.061-0.785-0.17l0.012 0.005c-1.403-0.547-2.609-1.301-3.646-2.239l0.010 0.009c-0.975-0.891-1.81-1.912-2.486-3.039l-0.034-0.061c-0.152-0.244-0.242-0.54-0.242-0.857 0-0.463 0.191-0.88 0.499-1.178l0-0c0.13-0.162 0.264-0.302 0.4-0.444l0.236-0.256c0.091-0.096 0.177-0.201 0.254-0.311l0.006-0.009c-0.158-0.36-0.622-1.472-0.988-2.352l-0.322-0.772-0.038-0.086c-0.188-0.010-0.302-0.016-0.426-0.016zM12.462 12.442v0.012z">
                              </path>
                            </svg>
                          </span>
                        </a>
                      </li>
                      <li style="transform: translateZ(0px) translateY(0px) scaleY(1); opacity: 1;">
                        <a class="a2a_button_email" aria-label="Share Via email">
                          <span class="s-social-share-icon"><!-- Generated by IcoMoon.io -->
                            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                              viewBox="0 0 32 32">
                              <title>mail</title>
                              <path
                                d="M28 2.667h-24c-2.205 0-4 1.795-4 4v18.667c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-18.667c0-2.205-1.795-4-4-4zM29.333 25.333c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-12.685l10.54 4.865c0.888 0.409 1.84 0.613 2.793 0.613s1.907-0.204 2.793-0.615l10.54-4.864zM29.333 9.711l-11.657 5.38c-1.065 0.492-2.288 0.492-3.353 0l-11.656-5.38v-3.044c0-0.735 0.599-1.333 1.333-1.333h24c0.735 0 1.333 0.599 1.333 1.333z">
                              </path>
                            </svg>
                          </span>
                        </a>
                      </li>
                      <li style="transform: translateZ(0px) translateY(0px) scaleY(1); opacity: 1;">
                        <a class="a2a_button_copy_link" aria-label="Share Via copy_link">
                          <span class="s-social-share-icon"><!-- Generated by IcoMoon.io -->
                            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                              viewBox="0 0 32 32">
                              <title>link</title>
                              <path
                                d="M19.247 23.019l-4.189 4.189c-2.831 2.831-7.435 2.831-10.265 0-1.371-1.372-2.125-3.193-2.125-5.132s0.755-3.761 2.125-5.133l4.189-4.191c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.521-1.885 0l-4.189 4.191c-1.875 1.875-2.907 4.367-2.907 7.019s1.032 5.143 2.907 7.017 4.368 2.907 7.019 2.907 5.143-1.032 7.017-2.908l4.189-4.189c0.521-0.521 0.521-1.364 0-1.885s-1.364-0.52-1.885 0.001zM22.276 9.724c-0.521-0.521-1.364-0.521-1.885 0l-10.667 10.667c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l10.667-10.667c0.521-0.521 0.521-1.364 0-1.885zM29.093 2.908c-1.875-1.876-4.368-2.908-7.019-2.908s-5.143 1.032-7.017 2.908l-4.189 4.188c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l4.189-4.189c2.831-2.831 7.435-2.831 10.265 0 1.371 1.372 2.125 3.193 2.125 5.132s-0.755 3.761-2.125 5.133l-4.189 4.191c-0.521 0.521-0.521 1.364 0 1.885 0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391l4.189-4.191c1.875-1.875 2.907-4.367 2.907-7.019s-1.032-5.143-2.907-7.016z">
                              </path>
                            </svg>
                          </span>
                        </a>
                      </li>
                    </ul>
                  </div>
                </salla-social-share>
              </div>
            </div>
            <div class="sm:hidden rtl:space-x-reverse space-x-2">
              <h4 class="text-red-400 font-bold text-xl inline-block">
                <?php echo $decPrice1; ?> ر.س
              </h4>
              <span class="text-gray-400 line-through">
                <?php echo $price1; ?> ر.س
              </span>
            </div>
            <?php echo $description; ?>
            <?php if ($size == 1) {
              echo '<div class="s-product-options-option-container" data-option-id="' . $id . '">
                        <div class="s-product-options-option" data-option-type="thumbnail" data-option-required="true">
                          <label for="options[' . $id . ']" class="s-product-options-option-label">
                            <b>المقاسات<span> * </span> </b>
                            <small></small>
                          </label>
                          <div class="s-product-options-option-content">
                            <div class="s-product-options-thumbnails-wrapper">';
              $stmt = $connection->prepare("SELECT * FROM `size` WHERE `product_id` = $id");
              $stmt->execute();
              $row = $stmt->get_result();
              $first = true; // متغير للتحقق من العنصر الأول
              while ($data = $row->fetch_assoc()) {
                echo '<div>
                                        <input type="radio" onclick="size_value(' . $data["id"] . ')" value="' . $data["id"] . '" data-itemid="' . $data["id"] . '" required="" name="options[' . $id . ']" data-img-id="111042437" id="option_168467259-' . $id . '_' . $data["id"] . '"' . ($first ? ' checked' : '') . '>
                                        <label for="option_168467259-' . $id . '_' . $data["id"] . '" data-img-id="111042437" class="go-to-slide" style="border: 1px solid #c7c7c7; height: 30px;">
                                          <span> ' . $data["name"] . ' </span>
                                        <span class="s-product-options-thumbnails-icon" style="margin-top: -5px;margin-left: 30px;">
                                            <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
                                              <title>check</title>
                                              <path d="M27.521 6.976c-0.569-0.472-1.407-0.393-1.879 0.171l-12.567 15.080-7.003-4.668c-0.615-0.411-1.441-0.244-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l8 5.333c0.227 0.149 0.484 0.223 0.739 0.223 0.384 0 0.763-0.165 1.027-0.48l13.333-16c0.471-0.565 0.393-1.407-0.171-1.877z"></path>
                                            </svg>
                                          </span>
                                        </label>
                                      </div>';
                $first = false; // بعد العنصر الأول يتم إلغاء التحديد الافتراضي
              }
              echo '</div>
                          </div>
                        </div>
                      </div>';
            } ?>
            <div class="flex justify-between">
              <div>
                <input type="hidden" name="id" value="2036710849">
                <?php
                echo $In_Stock > 0 ?
                  '<salla-quantity-input1 max="387" value="1" name="quantity" class="border-gray-200 flex justify-end rtl:ml-8 ltr:mr-8"><!---->
                        <div class="s-quantity-input-container">
                          <button class="s-quantity-input-increase-button s-quantity-input-button" onclick="TotalPlus()" type="button">
                            <span><!-- Generated by IcoMoon.io -->
                              <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
                                <title>add</title>
                                <path d="M26.667 14.667h-9.333v-9.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333v9.333h-9.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h9.333v9.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-9.333h9.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>
                              </svg>
                            </span>
                          </button>
                          <input class="s-quantity-input-input" value="1" max="387" id="quantity" name="quantity" min="1">
                          <button class="s-quantity-input-decrease-button s-quantity-input-button" onclick="TotalSub()" type="button">
                            <span><!-- Generated by IcoMoon.io -->
                              <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
                              <title>minus</title>
                              <path d="M26.667 14.667h-21.333c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h21.333c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333z"></path>
                            </svg>
                            </span>
                          </button>
                        </div>
                      </salla-quantity-input1>'
                  : '';
                ?>
              </div>
              <div class="center-between whitespace-nowrap rtl:space-x-reverse space-x-1">
                <div class="flex whitespace-nowrap gap-2">
                  <?php echo $decPrice1 > 0 ? '<div class="flex items-center space-x-2 rtl:space-x-reverse whitespace-nowrap">
                      <h4 class="total-price text-red-400 font-bold text-xl inline-block"> ' . $decPrice1 . ' ر.س</h4>
                      <span class="before-price text-sm text-gray-400 line-through">' . $price1 . ' ر.س</span>
                    </div>' : '<h4 class="font-bold text-xl">' . $price1 . ' ر.س</h4>' ?>
                </div>
              </div>
            </div>

            <?php
            echo $In_Stock > 0 ? '<salla-add-product-button1 id="add-to-cart-btn" quick-buy="" support-sticky-bar="" amount="5499" class="text-white block s-add-product-button-with-quick-buy s-add-product-button-with-sticky-bar hydrated" product-status="sale" product-type="product" product-id="1799736965" loader-position="end" type="submit" width="wide" channels="email,sms,mobile" subscribed-options="null" notify-options-availability=""><!---->
                  <form action="product.php?id=' . $id . '" method="POST"style="width: 100%;">
                    <input type="hidden" name="qnt" value="1" id="qnt">
                    <input type="hidden" name="size" value="' . $id_size . '" id="size">
                    <input type="hidden" name="product_id" value="' . $isID . '" id="">
                    <salla-button1 style="margin-left: 10px;" quick-buy="" support-sticky-bar="" amount="5499" product-status="sale" product-type="product" product-id="1799736965" loader-position="center" channels="email,sms,mobile" subscribed-options="null" notify-options-availability="" class="s-button-wrap hydrated" shape="btn" color="primary" fill="solid" size="medium" width="wide"><!---->
                      <button type="submit" name="addCart" quick-buy="" support-sticky-bar="" amount="5499" product-status="sale" product-type="product" product-id="1799736965" loader-position="center" channels="email,sms,mobile" subscribed-options="null" notify-options-availability="" class="undefined s-button-element s-button-btn s-button-solid s-button-wide s-button-primary s-button-loader-center">
                        <span class="s-button-text">إضافة للسلة</span>
                      </button>
                    </salla-button1>
                  </form>' :
              '<salla-add-product-button1 id="add-to-cart-btn" quick-buy="" support-sticky-bar="" amount="5499" class="text-white block hydrated" product-status="out-and-notify" product-type="product" product-id="38641042" loader-position="end" type="submit" width="wide" channels="email,sms,mobile" subscribed-options="null" notify-options-availability=""><!---->
                  <salla-product-availability1 quick-buy="" support-sticky-bar="" amount="5499" product-status="out-and-notify" product-type="product" product-id="38641042" loader-position="end" type="submit" width="wide" subscribed-options="null" notify-options-availability="" class="s-product-availability-wrap hydrated">
                    <span class="s-hidden">
                    نفدت الكمية
                    </span>
                    <salla-button1 class="s-button-wrap hydrated" shape="btn" color="primary" fill="solid" size="medium" width="wide"><!---->
                      <button type="button" class="undefined s-button-element s-button-btn s-button-solid s-button-wide s-button-primary s-button-loader-after">
                        <span class="s-button-text">اعلمني عند التوفر</span>
                      </button>
                    </salla-button1>
                  </salla-product-availability1>
                </salla-add-product-button1>';
            ?>
          </div>
        </div>
        <div class="installment-wrap">
          <salla-installment price="1599"></salla-installment>

        </div>
        <div class="product-tabs" id="product-tabs">
          <div class="tabs">
            <a data-target="product-comments-tab" data-component-id="product-tabs"
              class="tab-trigger tab--comments is-active">
              تقييمات المنتج
            </a>
          </div>
          <div class="tabs-wrapper">
            <div id="product-comments-tab" class="tabs__item is-active opacity-100 translate-y-0">
              <div class="s-comments s-comments-product user-cant-comment">
                <div class="comments-list-wrap">
                  <?php

                  $stmt = $connection->prepare("SELECT * FROM `coments` WHERE `category` = '$category'");
                  $stmt->execute();
                  $row = $stmt->get_result();
                  while ($data = $row->fetch_assoc()) {
                    echo '<div class="border-b last:border-0 mb-8 pb-8 border-gray-200 list-block">
                    <div class=" comment  flex text-sm rtl:space-x-reverse space-x-3 comment_id_17514199">
                      <div class="flex-none">
                        <img ';
                    if ($data["gnd"] == 1) {
                      echo 'data-src="../stores/themes/default/assets/images/avatar_male.png"';
                    } elseif ($data["gnd"] == 2) {
                      echo 'data-src="../stores/themes/default/assets/images/avatar_female.png"';
                    }
                    echo 'alt="' . $data["name"] . '" src="https://cdn.assets.salla.network/themes/392563753/1.67.0/images/s-empty.png" class="w-10 h-10 bg-gray-100 object-cover rounded-full lazy">
                      </div>
                      <div class="flex-1">
                        <div class="flex flex-wrap md:items-center justify-between mb-2 md:mb-0">
                          <div class="flex items-center mb-1">
                            <h3 class="font-bold text-base rtl:ml-10 ltr:mr-10 fix-align">' . $data["name"] . '</h3>
                            <div class="flex">
                              <i class="sicon-check rounded-full bg-amber-400 h-5 w-5 flex items-center justify-center text-xs"></i>
                              <span class="fix-align rtl:mr-1 ltr:ml-1 text-sm text-gray-600 mt-0.5">
                              قام بالشراء,
                              </span>
                              <span class="fix-align rtl:mr-1 ltr:ml-1 text-sm text-gray-600 mt-0.5">تم التقييم</span>
                            </div>
                          </div>
                          <p class="text-gray-400 text-sm"> ' . $data["time"] . ' </p>
                          <div class="w-full comment__rating text-xs mb-2.5 rtl:space-x-reverse space-x-1">
                          <salla-rating-stars value="' . $data['star'] . '" size="small"></salla-rating-stars>';
                    echo '</div>
                        </div>
                        <div class="prose prose-sm max-w-none text-gray-500">
                          <p>' . $data["comment"] . '</p>
                          <i class="icon-cart user-buy" data-toggle="tooltip" data-placement="right" title="قام بالشراء"></i>
                        </div>  
                      </div>
                    </div>
                  </div>';
                  }

                  ?>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="mt-10">
      <div class="container">
        <section id="similar-slider" class="mb-8 rtl:pl-0 ltr:pr-0 lg:overflow-hidden">
          <salla-slider type="carousel" block-title="منتجات قد تعجبك" block-subTitle display-all-url auto-play
            id="similar-slider">
            <div slot="items">
              <?php
              $stmt = $connection->prepare("SELECT * FROM products WHERE category = '$category' OR subclass = '$subclass' ORDER BY id DESC LIMIT 10");
              $stmt->execute();
              $row = $stmt->get_result();
              $id_size_id = 0;
              while ($data = $row->fetch_assoc()) {
                if ($data['size'] == 1) {
                  $stmt_size_id = $connection->prepare("SELECT MIN(id) FROM `size` WHERE `product_id` = " . $data['id']);
                  $stmt_size_id->execute();
                  $result_size_id = $stmt_size_id->get_result();

                  if ($result_size_id->num_rows > 0) {
                    $row_size_id = $result_size_id->fetch_assoc();
                    $id_size_id = $row_size_id['MIN(id)'];
                  }
                }
                echo '<div class="slide--one-fourth swiper-slide swiper-slide-active">
                      <div id="product-1052956333" 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(1052956333)" data-id="1052956333" data-cf-modified-0ff8f3eb07d75df63503795e->
                            <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="product.php?id=' . $id . '" method="POST"style="width: 100%;" class="btn--add-to-cart hydrated">
                          <input type="hidden" name="qnt" value="1" id="qnt">
                          <input type="hidden" name="product_id" value="' . $data['id'] . '" id="">
                          <input type="hidden" name="size" value="' . $id_size_id . '" id="size">
                            <salla-button1 type="submit" class="s-button-wrap hydrated" shape="btn" color="primary" fill="outline" size="medium" width="wide"><!---->
                              <button type="submit" style="height: 50px; margin-bottom: 20px;" class="undefined s-button-element s-button-btn s-button-outline s-button-wide s-button-primary-outline s-button-loader-center">
                                <span class="s-button-text">إضافة للسلة</span>
                              </button>
                            </salla-button1>
                          </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(1052956333)" data-id="1052956333" data-cf-modified-0ff8f3eb07d75df63503795e->
                              <i class="sicon-heart"></i>
                            </salla-button>
                          </div>
                        </div>
                      </div> 
                    </div>';
              }
              ?>
            </div>
          </salla-slider>
        </section>
      </div>
    </div>
    <?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"; ?>
  <script>
    let count_num = 1;
    function TotalPlus() {
      count_num += 1;
      document.getElementById("quantity").value = count_num;
      document.getElementById("qnt").value = count_num;
    }
    function TotalSub() {
      if (count_num > 1) {
        count_num -= 1;
      }
      document.getElementById("quantity").value = count_num;
      document.getElementById("qnt").value = count_num;
    }
    function size_value(num) {
      console.log(num);
      document.getElementById("size").value = num;
    }
  </script>
</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit