BLACKSITE
:
216.73.217.60
:
89.163.214.37 / samaistanbool.com
:
Linux da1 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
:
/
home
/
samaist1
/
public_html
/
Upload File:
files >> /home/samaist1/public_html/cart.php
<?php session_start(); if(isset($_POST['add_to_cart'])){ //if user already add a prodcut to chart if(isset($_SESSION['cart'])){ $product_array_ids = array_column($_SESSION['cart'],'product_id'); // if prodcut add aready to cart if(!in_array($_POST['product_id'],$product_array_ids)){ $product_id = $_POST['product_id']; $product_array = array( 'product_id' => $_POST['product_id'], 'product_name' => $_POST['product_name'], 'product_price' => $_POST['product_price'], 'product_quantity' => $_POST['product_quantity'], 'product_image1' => $_POST['product_image1'] ); $_SESSION['cart'][$product_id]=$product_array; //prodcut all ready added }else{ } //if this is the first prodcut }else{ $product_id=$_POST['product_id']; $product_name=$_POST['product_name']; $product_price=$_POST['product_price']; $product_quantity=$_POST['product_quantity']; $product_image1=$_POST['product_image1']; $product_array = array( 'product_id' => $product_id, 'product_name' => $product_name, 'product_price' => $product_price, 'product_quantity' => $product_quantity, 'product_image1' => $product_image1 ); $_SESSION['cart'][$product_id]=$product_array; } } //remove prodcut from chart else if(isset($_POST['remove_product'])){ $product_id = $_POST['product_id']; unset($_SESSION['cart'][$product_id]); } //edit prodcut quantity else if(isset($_POST['edit_quantity'])){ //datafrom form $product_id = $_POST['product_id']; $product_quantity = $_POST['product_quantity']; //data from array $product_array = $_SESSION['cart'][$product_id]; //edit quantity $product_array['product_quantity'] = $product_quantity; $_SESSION['cart'][$product_id] = $product_array; }else{ //header(("location:index.php")); } $total=0; ?> <?php include('layouts/header.php') ?> <!--cart--> <section class="cart container my-3 py-3"> <div class="container mt-5"> <h2 class="text-center">Sgopping Caert <i class="fa-solid fa-bag-shopping"></i></h2> <hr class="mx-auto"> </div> <table class="mt-5 pt-5"> <tr> <th>المنتج</th> <th>الكمية</th> <th>المبلغ</th> </tr> <?php foreach($_SESSION['cart'] as $key => $value) { ?> <tr> <td> <div class="product-info"> <img src="assets/imgs/<?php echo $value['product_image1'] ?>"> <div> <p><?php echo $value['product_name'] ?></p> <small><span>جنيه</span><?php echo $value['product_price'] ?></small> <br> <form method="post" action="cart.php"> <input type="hidden" name="product_id" value="<?php echo $value['product_id'] ?>"> <button class="k remove-btn btn btn-danger btn-sm" name="remove_product" type="submit"><i class="fa-solid fa-trash"></i> ازالة</button> </div> </div> </td> <td> <form method="post" action="cart.php"> <div style="display: flex;"> <input type="number" name="product_quantity" value="<?php echo $value['product_quantity'] ?>"> <input type="hidden" name="product_id" value="<?php echo $value['product_id'] ?>"> <button class=" k edit-btn btn btn-warning btn-sm" name="edit_quantity"><i class="fa-solid fa-pencil"></i> تعديل</button> <button class="s edit-btn btn btn-warning btn-sm" name="edit_quantity"><i class="fa-solid fa-pencil"></i> </button> <button class="s remove-btn btn btn-danger btn-sm" name="remove_product" type="submit"><i class="fa-solid fa-trash"></i> </button> </div> </form> </td> <td> <span><?php echo $value['product_quantity'] * $value['product_price']; $total = $total +($value['product_quantity'] * $value['product_price']); ?></span> <span class="product-price">جنيه</span> </td> </tr> <?php } ?> </table> <div class="cart-total"> <table> <tr> <td>الاجمالى</td> <td><h5><span><?php echo $total ?></span>جنيه</h5></td> </tr> <tr> <td>اجمالى الفاتورة مع الضريبة </td> <td><h5><span><?php echo $total ?></span>جنيه</small></td> </tr> </table> </div> <div> <form method="post" action="checkout.php"> <input type="hidden" name="total"value="<?php echo $total ?>" > <?php if($total != 0){ ?> <!-- <button class="buy-btn" type="submit" name="checkout"> اكمال عملية الشراء <i class="fa-solid fa-clipboard-check"></i> </button> --> <?php } ?> </form> </div> </section> <!--footer--> <footer class="mt-5 py-5"> <div class="row container mx-auto pt-5"> <div class="footer-one col-lg-3 col-md-6 col-sm-12"> <img src="assets/imgs/logo.png" class="logo"> <p class="pt-3">نحن نقدم لك افضل المنتجات و الماركات العالمية بالاضافة الى عروض التخفيض المميزة</p> </div> <div class="footer-one col-lg-3 col-md-6 col-sm-12"> <h5 class="pd-2">منتجات مميزة</h5> <ul class="text-uppercase"> <li><a href="">رجالى</a></li> <li><a href="">اطفالى</a></li> <li><a href="">نسائي</a></li> <li><a href="">احذية</a></li> <li><a href="">ساعات</a></li> <li><a href="">عطور</a></li> </ul> </div> <div class="footer-one col-lg-3 col-md-6 col-sm-12"> <h5 class="pd-2">اتصل بنا</h5> <div> <h6 class="text-uppercase">العنوان : </h6> <p>السودان - شمال دارفور - الفاشر - السوق الكبير</p> </div> <div> <h6 class="text-uppercase">الهاتف : </h6> <p>249906441443+</p> </div> <div> <h6 class="text-uppercase">الايميل : </h6> <p>bollb404@hmail.com</p> </div> </div> <div class="footer-one col-lg-3 col-md-6 col-sm-12 text-center"> <h5 class="pd-2">انستغرام</h5> <div class="row "> <img src="assets/imgs/1.jpg" class="img-fluid w-25 h-40 md-2"> <img src="assets/imgs/1.jpg" class="img-fluid w-25 h-40 md-2"> <img src="assets/imgs/1.jpg" class="img-fluid w-25 h-40 md-2"> <img src="assets/imgs/1.jpg" class="img-fluid w-25 h-40 md-2"> <img src="assets/imgs/1.jpg" class="img-fluid w-25 h-40 md-2"> </div> </div> </div> <div class="copyright mt-5"> <div class="row container mx-auto"> <div class="col-lg-4 col-md-3 col-sm-12 md-4 text-center"> <img src="assets/imgs/35-351793_credit-or-debit-card-mastercard-logo-visa-card.png.jpg"> </div> <div class="col-lg-4 col-md-3 col-sm-12 md-4 text-nowrap"> <p class="text-center">حقوق النشر محفوظة ابراهيم للخدمات البرمجية 2024</p> </div> <div class="col-lg-4 col-md-3 col-sm-12 md-4 text-center"> <a href=""><i class="fa-brands fa-facebook"></i></a> <a href=""><i class="fa-brands fa-whatsapp"></i></a> <a href=""><i class="fa-brands fa-facebook"></i></a> </div> </div> </div> </footer> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> </body> </html>