Server IP : 103.6.199.200 / Your IP : 3.133.123.162 Web Server : Microsoft-IIS/10.0 System : Windows NT EMPUSA 10.0 build 20348 (Windows Server 2016) i586 User : EMPUSA$ ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Domains/airzones/onlinebooking.airzone.sg/wwwroot/ |
Upload File : |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="online_booking.aspx.cs" Inherits="WebBooking.online_booking" %> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <title>AirZone POS</title> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/font-awesome.min.css" rel="stylesheet"> <link href="css/prettyPhoto.css" rel="stylesheet"> <link href="css/price-range.css" rel="stylesheet"> <link href="css/animate.css" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> <link href="css/responsive.css" rel="stylesheet"> <%--<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">--%> <%--<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">--%> <link href="css/bootstrap-datepicker.css" rel="stylesheet" type="text/css" /> <%--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>--%> <script src="jquery/1.9.1/jquery.js" type="text/javascript"></script> <script src="js/bootstrap.min.js" type="text/javascript"></script> <%--<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>--%> <%--<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>--%> <script src="js/bootstrap-datepicker.js" type="text/javascript"></script> <%--<script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>--%> <%--<script src="js/bootstrap-datepicker.js" type="text/javascript"></script>--%> <%--<link href="css/datepicker.min.css" rel="stylesheet" type="text/css" />--%> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <script src="js/respond.min.js"></script> <![endif]--> <link rel="shortcut icon" href="images/ico/favicon.ico"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png"> <style type="text/css"> .Addcart_menu { background: #2e2873; color: #fff; font-size: 16px; font-family: 'Roboto' , sans-serif; font-weight: normal; } .aClick { background: green; } </style> </head> <!--/head--> <body> <header id="header"><!--header--> <div class="header_top"><!--header_top--> <div class="container"> <div class="row"> <div class="col-sm-6"> <div class="contactinfo"> <ul class="nav nav-pills"> <li><a href="tel:+65 3159 0767"><i class="fa fa-phone"></i>+65 3159 0767</a></li> <li><a href="mailto:info@airzone.sg"><i class="fa fa-envelope"></i>info@airzone.sg</a></li> </ul> </div> </div> <div class="col-sm-6"> <div class="social-icons pull-right"> <ul class="nav navbar-nav"> <li><a href="https://www.facebook.com/Airzonesg/"><i class="fa fa-facebook"></i></a></li> <li><a href="https://www.instagram.com/airzone_sg/"><i class="fa fa-instagram"></i></a></li> <li><a href="http://www.airzone.sg/"><i class="fa fa-globe"></i></a></li> <%--<li><a href=""><i class="fa fa-dribbble"></i></a></li> <li><a href=""><i class="fa fa-google-plus"></i></a></li>--%> </ul> </div> </div> </div> </div> </div><!--/header_top--> <div class="header-middle"><!--header-middle--> <div class="container"> <div class="row"> <div class="col-sm-4"> <div class="logo pull-left"> <a href="http://www.airzone.sg/"><img src="images/logo.png" alt="" /></a> </div> </div> <div class="col-sm-8"> <div class="shop-menu pull-right"> <ul class="nav navbar-nav"> <li><a href="http://www.airzone.sg/">Home</a></li> <li><a href="#" class="active">Online Booking</a></li> <li id="li_user"> <asp:Literal ID="ltrUser" runat="server"></asp:Literal> </li> </ul> </div> </div> </div> </div> </div><!--/header-middle--> </header> <!--/header--> <section id="cart_items"> <div class="container"> <div class="breadcrumbs"> <ol class="breadcrumb"> <li><a href="#">Home</a></li> <li class="active">Cart</li> </ol> <div class="btn-group"> <select id="ddlLocations" class="btn btn-default dropdown-toggle" style="margin-top: -50px;width: 345px;height: 50px;font-size: x-large;font-weight: bold;"> </select> </div> </div> <%--<div class="btn-group pull-right"> <div class="btn-group"> <select id="ddlLocations" class="btn btn-default dropdown-toggle" style="margin-top: -50px;"> </select> </div> </div>--%> <div class="category-tab"><!--category-tab--> <div class="col-sm-12"> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" onClick=loadProduct();>Products</a></li> <li><a href="#blazers" data-toggle="tab" onClick=loadComboProduct();>Combo Products</a></li> <li><a href="#sunglass" data-toggle="tab" onClick=loadAddOns();>Add Ons</a></li> </ul> </div> <div class="table-responsive cart_info"> <table class="table table-condensed" id="tblProduct"> <%--<thead> <tr class="cart_menu"> <td class="image">Products</td> <td class="description">Date</td> <td class="description">Time</td> <td class="price">Price</td> <td class="quantity">No.Of Tickets</td> <td class="description"></td> <td></td> </tr> </thead> <tbody> </tbody>--%> </table> </div> </div> </section> <!--/#cart_items--> <section id="do_action"> <div class="container"> <div class="media-body"> <ul class="sinlge-post-meta"> <li><i class="fa fa-user"></i>MY CART ITEMS</li> </ul> </div> <%--<div class="step-one"> <h2 class="heading">My Cart Items</h2> </div>--%> <div class="row"> <div class="col-sm-12"> <div class="total_area"> <div class="table-responsive cart_info"> <table class="table table-condensed" id="tblAddCart"> <thead id="thdAddCart"> <tr class="Addcart_menu"> <td class="image">Product Name</td> <td class="image">Date</td> <td class="quantity">Time</td> <td class="quantity" style="width: 1px;">Qty</td> <td class="price">Cost($)</td> <td class="price">Total Amount($)</td> <td></td> </tr> </thead> <tbody> </tbody> <tfoot style="background-color:#e6e4df"> <tr> <td><span id="cartSubTotal" style="color:#e6e4df;">$0.00</span><td> <td></td> <td></td> <td class="price">Total Amount</td> <td><span id="cartTotal" style="float:left">$0.00</span></td> <td></td> </tr> </tfoot> </table> </div> <div> <a class="btn btn-default check_out" href="#" onclick="cartSubmit()" >Submit</a> <%--<a class="btn btn-default update" href="#">Update</a>--%> </div> </div> </div> </div> </section> <!--/#do_action--> <footer id="footer"><!--Footer--> <div class="footer-bottom"> <div class="container"> <div class="row"> <p class="pull-left">Copyright © 2017 AirZone POS. All rights reserved.</p> <p class="pull-right">Designed by <span><a target="_blank" href="http://www.icomsoftsolutions.com">ICOM</a></span></p> </div> </div> </div> </footer> <!--/Footer--> <script type="text/javascript"> $(window).load(function() { $.ajax({ type: "POST", url: "online_booking.aspx/loadLocation", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data.d); $('#ddlLocations').append(data.d); } }); }); $(document).ready(function() { var location_id=$('#ddlLocations').find('option:selected').val(); if(location_id==undefined) { location_id=0; } $.ajax({ type: "POST", url: "online_booking.aspx/GetProduct", data: "{'LocationID':'"+location_id+"'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data.d); //$('#tblProduct tbody').html(''); $('#tblProduct').html(data.d); datepick(); } }); function datepick() { $('.date').datepicker({ format: 'mm/dd/yyyy', autoclose: true }); } }); </script> <script type="text/javascript"> $('#ddlLocations').on('change', function(e) { var locationName = $('#ddlLocations').find('option:selected').text(); var locationVal = $('#ddlLocations').find('option:selected').val(); if (locationVal != 0) { $.ajax({ type: "POST", url: "online_booking.aspx/getLocationWise", data: "{'locationName':'" + locationName + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data.d); $('#tblProduct tbody').html(''); $('#tblProduct tbody').html(data.d); datepick(); } }); } function datepick() { $('.date').datepicker({ format: 'mm/dd/yyyy', autoclose: true }); } }); </script> <script type="text/javascript"> //For Loading Products function loadProduct() { var location_id=$('#ddlLocations').val(); $.ajax({ type: "POST", url: "online_booking.aspx/GetProduct", data: "{'LocationID':'"+location_id+"'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data.d); //$('#tblProduct tbody').html(''); $('#tblProduct').html(data.d); datepick(); } }); function datepick() { $('.date').datepicker({ format: 'mm/dd/yyyy', autoclose: true }); } } </script> <script type="text/javascript"> //For Combo Loading function loadComboProduct() { $.ajax({ type: "POST", url: "online_booking.aspx/GetComboProduct", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data.d); //$('#tblProduct tbody').html(''); $('#tblProduct').html(data.d); datepick(); } }); function datepick() { $('.date').datepicker({ format: 'mm/dd/yyyy', autoclose: true }); } } </script> <script type="text/javascript"> function loadAddOns() { //var locationVal = $('#ddlLocations').find('option:selected').val(); $.ajax({ type: "POST", url: "online_booking.aspx/GetAddOns", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data.d); //$('#tblProduct tbody').html(''); $('#tblProduct').html(data.d); datepick(); } }); function datepick() { $('.date').datepicker({ format: 'mm/dd/yyyy', autoclose: true }); } } </script> <script type="text/javascript"> //For Qty +/- function addCartQty(rowId, proType) { var checkdate = $('#date' + rowId).val(); var pID = $('#pId' + rowId).val(); var cartQty = $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(); var time_slot=$('#time'+rowId+' :selected').val(); cartQty++; //console.log(cartQty); if (checkdate == "") { alert("Please Select Date"); return; } else if (time_slot == 0) { alert("Please Select Time"); return; } if (proType != 3) { var availableQty = $('#available' + rowId).text(); if (parseInt(availableQty) > 0 && parseInt(availableQty)!=undefined) { if (parseInt(availableQty) >= parseInt(cartQty)) { $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(cartQty); } else { alert('Available only ' + availableQty + ' ticket(s)'); return; } } else { alert('Tickets Not Available'); return; } // $.ajax({ // type: "POST", // url: "online_booking.aspx/GetCapacityManagementCount", // data: "{'cartQty':'" + cartQty + "',pID:'" + pID + "',checkdate:'" + checkdate + "',productType:'" + proType + "'}", // contentType: "application/json; charset=utf-8", // dataType: "json", // success: function(data) { // if (data.d == 0) // $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(cartQty); // else if (data.d == 3) // alert("Tickets Not Available"); // else // alert("Only " + data.d + " Tickets Available"); // } // }); } else if (proType == 3) { $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(cartQty); } } function subCartQty(rowId, proType) { var pID = $('#pId' + rowId).val(); var cartQty = $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(); if (cartQty > 0) { cartQty--; //console.log(cartQty); $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(cartQty); } } </script> <script type="text/javascript"> //For Add to Cart function addtoCart(rowId, proType, price) { var ltrUser = $('#ltrUserName').text(); if (ltrUser != "") { var pID = $('#pId' + rowId).val(); var cartQty = $('#cartQtyInput' + rowId + '_' + pID + '_' + proType).val(); var totQty = $('#available' + rowId).text(); var checkdate = $('#date' + rowId).val(); var pname = $('#pname' + rowId).text(); var timeSelect = $('#time' + rowId).find('option:selected').text(); var timersel=$('#time' + rowId).find('option:selected').val(); if(checkdate==""){ alert('Choose a Date!'); return false; }else if(timersel==0){ alert('Select a Time Slot!'); return false; }else if(totQty==0){ alert('Ticket not available'); return false; }else if (cartQty <= 0) { alert('Choose No. of Ticket(s) you want'); return false; }else{ var price = $('#price' + rowId).text().replace("$", ''); var cartSubTotal = $('#cartSubTotal').text().replace("$", ''); // var cartTax = $('#cartTax').text().replace("$", ''); // var shippingCost = $('#shippingCost').text(); var cartQtyandPrice = price * cartQty; var prvcartSubTotal = parseInt(cartSubTotal) + cartQtyandPrice; // var cartTotal = prvcartSubTotal + parseInt(cartTax); $('#cartSubTotal').text("$" + prvcartSubTotal); $('#cartTotal').text("$" + prvcartSubTotal + ".00"); if (proType == 1) { $('#tblAddCart').append('<tr id=' + pID + '_' + proType + '><td>' + pname + '</td><td>' + checkdate + '</td><td>' + timeSelect + '</td><td><input class="cart_quantity_input" type="text" name="quantity" value="' + cartQty + '" autocomplete="off" size="2" onkeyup="qty_input_change(\'' + pID + '\',' + proType + ')"></td><td>X $' + price + '</td><td class="class_total" id="addcartTotal_' + pID + '">$' + cartQtyandPrice + '.00</td><td class="cart_delete"><a class="removeAddCart" onclick="removeThisRow(\'' + pID + '\',' + proType + ')"><i class="fa fa-times"></i></a></td><td class="hide">' + totQty + '</td><td class="hide">' + cartQty + '</td></tr>'); } else if (proType == 2) { $('#tblAddCart').append('<tr id=' + pID + '_' + proType + '><td>' + pname + '</td><td>-</td><td>-</td><td><input class="cart_quantity_input" type="text" name="quantity" value="' + cartQty + '" autocomplete="off" size="2" onkeyup="qty_input_change(\'' + pID + '\',' + proType + ')"></td><td>X $' + price + '</td><td class="class_total" id="addcartTotal_' + pID + '">$' + cartQtyandPrice + '.00</td><td class="cart_delete"><a class="removeAddCart" onclick="removeThisRow(\'' + pID + '\',' + proType + ')"><i class="fa fa-times"></i></a></td></tr>'); } else if (proType == 3) { $('#tblAddCart').append('<tr id=' + pID + '_' + proType + '><td>' + pname + '</td><td>' + checkdate + '</td><td>-</td><td><input class="cart_quantity_input" type="text" name="quantity" value="' + cartQty + '" autocomplete="off" size="2" onkeyup="qty_input_change(\'' + pID + '\',' + proType + ')"></td><td>X $' + price + '</td><td class="class_total" id="addcartTotal_' + pID + '">$' + cartQtyandPrice + '.00</td><td class="cart_delete"><a class="removeAddCart" onclick="removeThisRow(\'' + pID + '\',' + proType + ')"><i class="fa fa-times"></i></a></td></tr>'); } $('#atag' + pID).addClass('aClick'); } } else { alert('Please Login...!'); window.location.href = "login.aspx"; return false; } } function removeThisRow(args, proType) { //console.log(args); //var rid = args.attr('id'); //console.log(rid); var rTotal = $('#addcartTotal_' + args).text(); var srTotal = rTotal.substring(1); var holeTotal = $('#cartTotal').text(); var sholeTotal = holeTotal.substring(1); var tot = parseFloat(sholeTotal) - parseFloat(srTotal); $('#cartSubTotal').text(tot); $('#cartTotal').text("$" + tot + ".00"); $('#atag' + args).removeClass('aClick'); $('#' + args + '_' + proType).remove(); } //Add to Cart Input Qty Change function qty_input_change(pro_id, proType) { var totTickets; var cartQty; var qty_val = $('#' + pro_id + '_' + proType).find("td:eq(3) input[type='text']").val(); if (proType == 1) { totTickets = $('#' + pro_id + '_' + proType).find('td:eq(7)').text(); cartQty = $('#' + pro_id + '_' + proType).find('td:eq(8)').text(); } else { totTickets = qty_val; } if (qty_val != "") { if (totTickets >= qty_val) { var qty_price = $('#' + pro_id + '_' + proType).find("td:eq(4)").text().substring(3); var tot_price = qty_val * qty_price; $('#' + pro_id + '_' + proType).find('td:eq(5)').text('$' + tot_price + '.00'); total_calc(); } else { alert('Available only '+ totTickets +' ticket(s)'); $('#' + pro_id + '_' + proType).find("td:eq(3) input[type='text']").val(cartQty); total_calc(); return; } } else { $('#' + pro_id + '_' + proType).find('td:eq(5)').text('$0.00'); } } function total_calc() { var cart_total = 0; var sum_tot = 0; $('#tblAddCart tbody .class_total').each(function() { //console.log($(this).text().substring(1)); cart_total = $(this).text().substring(1); var tot_val_arr = cart_total.split('.'); sum_tot += parseFloat(tot_val_arr[0]); //sum += tot; $('#cartSubTotal').text(sum_tot); $('#cartTotal').text("$" + sum_tot + ".00"); console.log(sum_tot); }); } </script> <script type="text/javascript"> function getSessionTimes(dateArg) { var checkdate = $('#date' + dateArg).val(); var pname = $('#pname' + dateArg).text(); $('#available' + dateArg).text(0); $('#available' + dateArg).closest('td').next('td').find('input').val(0); //console.log(checkdate); if (checkdate != "" && pname != "") { $.ajax({ type: "POST", url: "online_booking.aspx/GetSessionTimes", data: "{'checkdate':'" + checkdate + "','dateid':'" + dateArg + "','pname':'" + pname + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //console.log(data); $('#time' + dateArg + ' option').remove(); $('#time' + dateArg).append('<option value="0">Select Time</option>'); $('#time' + dateArg).append(data.d); } }); }else{ $('#time' + dateArg + ' option').remove(); $('#time' + dateArg).append('<option value="0">Select Time</option>'); //$('#time' + dateArg).append(data.d); } } </script> <script type="text/javascript"> function cartSubmit() { //var booking_id; $.ajax({ type: "POST", url: "online_booking.aspx/Select_MaxID", dataType: "json", contentType: "application/json;charset=utf-8", success: function(data) { if (data.d != "") { var booking_id = data.d; //console.log(booking_id); $('#tblAddCart tbody tr').each(function() { if ($(this).attr('id')) { var split_id = $(this).attr('id').split('_'); var product_id = split_id[0]; var product_type = split_id[1]; var product_name = $(this).find('td:eq(0)').text(); var cart_date = $(this).find('td:eq(1)').text(); var cart_time = $(this).find('td:eq(2)').text(); var cart_qty = $(this).find('td:eq(3) input[type="text"]').val(); var cart_price = $(this).find('td:eq(4)').text().substring(3); var total_cost = $(this).find('td:eq(5)').text().substring(1); var location = $('#ddlLocations').find('option:selected').val(); var grand_total = parseFloat($('#cartTotal').text().substring(1)); if (location == "0") location = "All"; else location = $('#ddlLocations').find('option:selected').text(); $.ajax({ type: "POST", url: "online_booking.aspx/Submit_Cart", dataType: "json", contentType: "application/json;charset=utf-8", data: "{'product_id':'" + product_id + "','product_name':'" + product_name + "','product_type':'" + product_type + "','cart_date':'" + cart_date + "','cart_time':'" + cart_time + "','cart_qty':'" + cart_qty + "','cart_price':'" + cart_price + "','total_cost':'" + total_cost + "','location':'" + location + "','booking_id':'" + booking_id + "','grand_total':'" + grand_total + "'}", success: function(data) { console.log(data.d); if (data.d == true) funPayPal(); //alert('Cart submitted successfully...!'); //$('#tblAddCart tbody tr').remove(); } }); } }); //PayPal // function funPayPal(){ // $.ajax({ // type: 'POST', // contentType: "application/json; charset=utf-8", // url: 'online_booking.aspx/paypal', // data: "{'itemCost':'" + $('#cartTotal').text() + "'}", // success: function(response) { // var val = response.d; // window.location.href = val; // } // }); // } } } }); } //PayPal function funPayPal(){ $.ajax({ type: 'POST', contentType: "application/json; charset=utf-8", url: 'online_booking.aspx/paypal', data: "{'itemCost':'" + $('#cartTotal').text() + "'}", success: function(response) { var val = response.d; window.location.href = val; } }); } function log_out() { $.ajax({ type: "POST", url: "online_booking.aspx/Log_out", dataType: "json", contentType: "application/json;charset=utf-8", success: function(data) { if (data.d == true) { location.reload(); } } }); } function timeSelect(rowID) { var selected_time = $('#time' + rowID + ' :selected').text(); var selected_time_val = $('#time' + rowID + ' :selected').val(); var productName = $('#pname' + rowID).text(); var selected_date = $('#date' + rowID).val(); if (productName != "" && selected_time_val != 0) { $.ajax({ type: "POST", url: "online_booking.aspx/Get_TicketCounts", dataType: "json", data: "{'selected_time':'" + selected_time + "','productName':'" + productName + "','selected_date':'" + selected_date + "'}", contentType: "application/json;charset=utf-8", success: function(data) { var count = JSON.parse(data.d); if (count != "") { $('#available' + rowID).text(count); } } }); } else $('#available' + rowID).text(0); } </script> <%--<script type="text/javascript"> $(function() { $('.date').datepicker({ format: 'mm/dd/yyyy', autoclose: true }); }); </script>--%> <%--<script src="js/jquery.js"></script>--%> <%--<script src="js/bootstrap.min.js"></script>--%> <script src="js/jquery.scrollUp.min.js"></script> <script src="js/jquery.prettyPhoto.js"></script> <script src="js/main.js"></script> </body> </html>