[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: edit_profile.php
<?php include('header.php'); include('map/token.php');?> <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> <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> function checkPass() { var pass1 = document.getElementById('pass1'); var pass2 = document.getElementById('pass2'); var message = document.getElementById('error-nwl'); var goodColor = "#66cc66"; var badColor = "#ff6666"; if(pass1.value.length > 7) { message.style.color = goodColor; message.innerHTML = "character number ok!" } else { message.style.color = badColor; message.innerHTML = " you have to enter at least 8 digit!" return; } if(pass1.value == pass2.value) { message.style.color = goodColor; message.innerHTML = "ok!" document.getElementById("btn").disabled = false; } else { message.style.color = badColor; message.innerHTML = " These passwords don't match" document.getElementById("btn").disabled = true; } } </script> <!-- BANNER --> <div class="banner-inner"> <img src="images/inner-banner.jpg" alt="" class="banner-img"> </div> <!-- soon --> <div class="profile" style=""> <div class="container"> <div class="title-section text-center"> <p class="w3ls-title-sub">Edit Profile </p> <h3 class="w3ls-title">Your <span> Account</span></h3> </div> <div class="row"> <div class="col-md-3 col-sm-3 col-xs-12"> <?php include('user-profile.php');?> </div> <div class="col-md-9 col-sm-9 col-xs-12"> <div class="profile-box"> <h3>Edit Profile Information :</h3> <form class="profile" action="edit_profile.php" method="post"> <div class="form-left-to-w3l " id="b_name"> <label>Name : </label> <input type="text" title="Click for Edit" name="name" value="<?=$uname?>" readonly> </div> <div class="form-left-to-w3l"> <label>Email ID : </label> <input type="text" title="Click for Edit" name="email" id="email" value="<?=$uemail?>" readonly> </div> <div class="form-left-to-w3l " id="b_name"> <label>Phone no : </label> <input type="text" title="Click for Edit" id="phn" name="phone" name="phone" value="<?=$uphone?>" > </div> <div class="form-left-to-w3l " id="b_name"> <label>State : </label> <select id="state" name="state" > <option value="">State</option> <?php $table1='states'; $stmt1=$show->readAll($table1); $num1=$stmt1->rowCount(); if($num1>0){ while($row1=$stmt1->fetch(PDO::FETCH_ASSOC)){ echo "<option value='".$row1['state_name']."'";if($ustate==$row1['state_name']) echo "selected"; echo ">".$row1['state_name']."</option>"; } } ?> </select> </div> <div class="form-left-to-w3l " id="b_name"> <label>City : </label> <input type="text" title="Click for Edit" value="<?=$ucity?>" name="city"> </div> <div class="form-left-to-w3l " id="b_name"> <label>Pincode : </label> <input type="text" title="Click for Edit" value="<?=$upincode?>" name="pincode"> </div> <div class="form-left-to-w3l " id="b_name" style="height:auto;width: 100%;"> <label>Address : </label> <p id="demo"></p> <textarea name="" title="Click for Edit" style=""><?=$uaddress?></textarea> <div id="map"></div> <script> /*Map Initialization*/ var map,picker; function initMap1(){ map = new mappls.Map('map', { center: [22.5726, 88.3639], 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_cook.php", success: function(html){ //alert(html); $('#demo').html(html).show(); } }); } </script> <div id="map_hide"></div> </div> <div class="form-sub-acc"> <div class="form-sub"> <input type="submit" class="" name="update" id="btn" value="Update"> </div> </div> </form> <?php if(isset($_POST['update'])){ $allowed = ["address","state","city","pincode","phone","latitude","longitude","district","locality"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "uid") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars(strip_tags($_POST[$key])); } } $setStr = rtrim($setStr, ","); $params['customer_id'] =$_SESSION['login_id']; $show->table ='customers'; $show->cols =$setStr; $show->id_name ='customer_id'; //print_r($params); $show->params =$params; if($show->update_all()){ echo '<script> setTimeout(function() { swal({ title: "Thank You ", text: "Your profile has been updated", type: "success" }, function() { window.location = "'.$_SERVER['REQUEST_URI'].'"; }); }, 1000); </script>'; }else{ echo "Something went wrong"; } }?> </div> <br> <div class="profile-box"> <form class="profile" action="" method="post"> <div class="form-left-to-w3l"> <label>Password : </label> <input type="password" placeholder="New Password" id="pass1" onkeyup="checkPass(); return false;" name="password"> </div> <div class="form-left-to-w3l"> <label style="line-height: 25px;">Confirm Password : </label> <input type="password" placeholder="Confirm Password" id="pass2" onkeyup="checkPass(); return false;" name="cpassword1"> <div id="error-nwl"></div> </div> <div class="form-sub-acc"> <div class="form-sub"> <input type="submit" class="" name="sub" id="btn" value="Update"> </div> </div> </form> <?php if(isset($_POST['update_pass'])){ $sq="update customers set password='".htmlentities(strip_tags(md5($_POST['password'])))."' where customer_id='".$_SESSION['login_id']."'"; $stmt=$con->prepare($sq); if($stmt->execute()){ echo "<script>alert('Password has been changed. Please login again to continue');window.location.href='logout.php';</script>"; } }?> </div> </div> </div> </div> </div> <?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.58 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