File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/dhyeyaprakashan.com/cart1.php
Back
<?php include 'core/init.php'; mysqli_query($mysqli,"SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'"); mysqli_set_charset($mysqli,'utf8'); ?> <!DOCTYPE html> <html lang="en"> <!-- Mirrored from themes.pixelstrap.com/voxo/front-end/cart.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 31 May 2022 10:26:26 GMT --> <head> <!--<link rel="manifest" href="./manifest.json">--> <link rel="icon" href="image/logo1.png" type="image/x-icon"> <link rel="apple-touch-icon" href="image/logo1.png"> <meta name="theme-color" content="#51983c"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="Voxo"> <meta name="msapplication-TileImage" content="image/logo1.png"> <meta name="msapplication-TileColor" content="#FFFFFF"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Voxo"> <meta name="keywords" content="Voxo"> <meta name="author" content="Voxo"> <link rel="icon" href="image/logo1.png" type="image/x-icon" /> <title>dhyeyaprakashan</title> <!-- Google font --> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap" rel="stylesheet"> <!-- bootstrap css --> <link id="rtl-link" rel="stylesheet" type="text/css" href="assets/css/vendors/bootstrap.css"> <!-- font-awesome css --> <link rel="stylesheet" type="text/css" href="assets/css/vendors/font-awesome.css"> <!-- feather icon css --> <link rel="stylesheet" type="text/css" href="assets/css/vendors/feather-icon.css"> <!-- animation css --> <link rel="stylesheet" type="text/css" href="assets/css/vendors/animate.css"> <!-- slick css --> <link rel="stylesheet" type="text/css" href="assets/css/vendors/slick/slick.css"> <link rel="stylesheet" type="text/css" href="assets/css/vendors/slick/slick-theme.css"> <!-- Theme css --> <link id="color-link" rel="stylesheet" type="text/css" href="assets/css/demo6.css"> <style> .input p{ width:300px; margin:0px 0px 5px 9px; } input{ width:300px; padding:10px; border-color:#21252938; border-radius:50px; } h2{ margin:0px 0px 9px 0px; } input:hover{ border-color:#6c757d94; } .button{ background-color:#e22454; color:white; font-size:18px; border-style: none; } </style> </head> <body class="theme-color2 light ltr"> <?php include 'include/header.php'; ?> <?php $var_value = $_GET['discount']; echo $var_value; ?> <!-- mobile fix menu start --> <!--<div class="mobile-menu d-sm-none"> <ul> <li> <a href="index.html"> <i data-feather="home"></i> <span>Home</span> </a> </li> <li> <a href="javascript:void(0)" class="toggle-category"> <i data-feather="align-justify"></i> <span>Category</span> </a> </li> <li> <a href="cart.html" class="active"> <i data-feather="shopping-bag"></i> <span>Cart</span> </a> </li> <li> <a href="wishlist.html"> <i data-feather="heart"></i> <span>Wishlist</span> </a> </li> <li> <a href="user-dashboard.html"> <i data-feather="user"></i> <span>Account</span> </a> </li> </ul> </div>--> <!-- mobile fix menu end --> <!-- Cart Section Start --> <section class="cart-section section-b-space"> <div class="container"> <div class="row"> <!--<div class="col-sm-12 table-responsive mt-4">--> <table class="table cart-table"> <thead> <tr class="table-head"> <th scope="col">S.No</th> <th scope="col">product</th> <th scope="col">picture</th> <th scope="col">price</th> <th scope="col">quantity</th> <th scope="col" id="total">total</th> <!-- <th scope="col">Update</th>--> <th scope="col">delete</th> </tr> </thead> <tbody> <?php //print_r($_SESSION); $srno = 1; $total = 0; foreach($_SESSION['cart'] as $keyval => $product){ $sql = mysqli_fetch_array(mysqli_query($mysqli, "SELECT * FROM `books_details`where id='$keyval'")); echo '<tr id="response_'.$keyval.'"><td>'.$srno.'</td> <td>'.$sql['name'].'</td> <td><img src="admin/'.$sql['image'].'" style="width:110px; height:150px"></td> <td id="price">'.$sql['price'].'</td> <td id="quantity">'.$product.'</td> <td id="total">'.($product*$sql['price']).'</td>'; $srno++; $total +=($product*$sql['price']); ?> <!--<td><a href="" class="btn btn-warning btn-xs" style="color: #212529">Update</a></td>--> <td><a href="#" class="btn btn-danger del_buttonnb btn-xs" style="color: #212529" name="deleteid" id="deleteid-<?php echo $keyval ?>">Delete</a></td> </tr> <?php }; ?> </tbody> </table> <!--</div>--> <div class="col-12 mt-md-5 mt-4"> <div class="row"> <div class="col-sm-7 col-5 order-1"> <div class="left-side-button text-end d-flex d-block justify-content-end"> <form action="addCart.php" method="POST"> <button type="submit" value="clear all items" name="remove_all" class="btn btn-danger mx-2">Clear all items</button> </form> </div> </div> <div class="col-sm-5 col-7"> <div class="left-side-button float-start"> <a href="index.php" class="btn btn-solid-default btn fw-bold mb-0 ms-0"> <i class="fas fa-arrow-left"></i> Continue Shopping</a> </div> </div> </div> </div> <div class="cart-checkout-section"> <div class="row g-4"> <div class="col-lg-4 col-sm-6"> <div class="promo-section"> <div id="contactres"></div> <div class="cart-box"> <div class="cart-box-details"> <div class="total-details"> <div class="top-details"> <h2>Payment Details</h2> <div class="input"> <input type="hidden" class="form-control" id="order_id " name="order_id " maxlength="20" size="20" autocomplete="off" value="<?php echo "order_id " . rand(10000,99999999)?>"> <div class="name_error"></div> Name:<p><input type="text" name="name" id="name_id" placeholder="Enter your name"></p><br> <div class="email_error"></div> Email:<p><input type="email" name="email" id="email" placeholder="Enter your email"></p><br> <div class="address_error"></div> Address:<p><input type="text" name="address" id="address" placeholder="Enter your address"></p><br> <div class="mobile_error"></div> Mobile:<p><input type="number" name="mobile" id="mobile" placeholder="Enter your mobile" ></p><br> <div class="city_error"></div> City:<p><input type="text" name="city" id="city" placeholder="Enter your city name"></p><br> <div class="amount_error"></div> Total price:<input type="text" name="price" value="<?php echo $total ?>" id="sellingprice" disabled><br> <input type="hidden" name="price" id="total_price" value="<?php echo $total; ?>" disabled><br> <input type="hidden" value="7" id="discount"><br> </div> </div> <div class="bottom-details"> <a><input type="submit" value="submit" class="button" onclick="pay_now()" name="payment_button"></a> </div> </div> </div> </div> </div> </div> <div class="col-lg-4 col-sm-6 "> <!--<div class="checkout-button"> <a href="checkout.html" class="btn btn-solid-default btn fw-bold"> Check Out <i class="fas fa-arrow-right ms-1"></i></a> </div>--> </div> <div class="col-lg-4"> <div class="cart-box"> <div class="cart-box-details"> <div class="total-details"> <div class="top-details"> <h3>Cart Totals</h3> <tr id="response_<?php echo $result1["id"]; ?>"> <td class='align-middle'><?php echo $result1["id"]; ?></td> <h6 id="Totalprice">Total price<span><?php echo $total;?></span></h6> <h6>Discount<span></span></h6> <!--<h6>Convenience Fee<span><del></del></span></h6>--> </div> <div class="bottom-details"> <a id="process" class="process" disabled>Process Checkout</a> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> <!-- Cart Section End --> <?php include 'include/footer.php'; ?> <!-- tap to top Section Start --> <!-- <div class="tap-to-top"> <a href="#home"> <i class="fas fa-chevron-up"></i> </a> </div>--> <!-- tap to top Section End --> <div class="bg-overlay"></div> <!-- latest jquery--> <script src="assets/js/jquery-3.5.1.min.js"></script> <!-- Add To Home js --> <script src="assets/js/pwa.js"></script> <!-- Bootstrap js --> <script src="assets/js/bootstrap/bootstrap.bundle.min.js"></script> <!-- feather icon js --> <script src="assets/js/feather/feather.min.js"></script> <!-- lazyload js --> <script src="assets/js/lazysizes.min.js"></script> <!-- Slick js --> <script src="assets/js/slick/slick.js"></script> <script src="assets/js/slick/slick-animation.min.js"></script> <script src="assets/js/slick/custom_slick.js"></script> <!-- timer js --> <!--<script src="assets/js/count-down-timer.js"></script>--> <!-- Notify js --> <script src="assets/js/bootstrap/bootstrap-notify.min.js"></script> <!-- script js --> <script src="assets/js/theme-setting.js"></script> <script src="assets/js/script.js"></script> <script src="https://checkout.razorpay.com/v1/checkout.js"></script> </body> </html> <script> $("body").on("click", " .del_buttonnb", function(e) { e.preventDefault(); var clickedID = this.id.split('-'); var DbNumberID = clickedID[1]; var myData = 'Delete='+ DbNumberID; jQuery.ajax({ type: "POST", url: "addCart.php", dataType:"text", data:myData, success:function(response){ $('#response_'+DbNumberID).fadeOut(); }, error:function (xhr, ajaxOptions, thrownError){ alert(thrownError); } }); return false; }); </script> <!--<script> $(document).ready(function(e){ $('#cart_button').click(function(e){ /* alert('guru');*/ var name = $('#name').val(); var email = $('#email').val(); var address = $('#address').val(); var mobile = $('#mobile').val(); var city = $('#city').val(); var price = $('#total_price').val(); /*console.log(price);*/ /*console.log(city);*/ if(name == '' || email == '' || address == '' || mobile == '' || city ==''){ $("#contactres").html('<div class="alert alert-danger">Required Fileds Can\'t Be Empty.</div>').delay(3000).show().fadeOut("slow"); return false; }else{ $.ajax({ type: "POST", url: "ajax/checkoutform.php", dataType:"text", data:{ name: name, email: email, address: address, mobile: mobile, city: city, price:price }, cache: false, success: function(data) { console.log(data); }, error: function(xhr, status, error) { console.error(xhr); } }); } }); }); </script> --> <script> $('#process').hide(); $('.button').on('click',function(){ $('#process').show(); }); </script> <script> $('#process').click(function(){ $actual_price = $('#total_price').val(); $discount = $('#discount').val(); $totalprice = $actual_price - ($actual_price*$discount/100); $('#sellingprice').val($totalprice).delay("8000").fadeIn();; }); </script> <script> function pay_now(){ var name = $('#name_id').val(); var email = $('#email').val(); var address = $('#address').val(); var mobile = $('#mobile').val(); var city = $('#city').val(); var sellingprice = $('#sellingprice').val(); var options ={ "key": "rzp_test_5Xp0kMaCNwSz1B", "amount": sellingprice*100, "currency": "INR", "name": "test", "description": "test Transaction", "image": "image/dhyeyaprakashan.jpg", "handler": function (response){ jQuery.ajax({ type:'post', url:'insert.php', data:"payment_id="+response.razorpay_payment_id+"&name="+name+"&email="+email+"&mobile="+mobile+"&address="+address+"&amount="+amount+"&city="+city, success:function(result){ window.location.href="thank_you.php"; } }); } }; var rzp1 = new Razorpay(options); rzp1.open(); } </script>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings