Hackfut Security File Manager
Current Path:
/home/u126195517/domains/rddvc.com/public_html/members
home
/
u126195517
/
domains
/
rddvc.com
/
public_html
/
members
/
📁
..
📁
assets
📄
bank.php
(4.65 KB)
📄
bank_form.php
(1.83 KB)
📄
bio.php
(3.01 KB)
📄
bio_form.php
(1.9 KB)
📄
breadcrumb.php
(250 B)
📄
brochure_download_kriya.php
(676 B)
📄
brochures.php
(4.47 KB)
📄
brochures_form.php
(2.54 KB)
📄
change_dvc_color.php
(7.48 KB)
📄
change_dvc_color_form.php
(23.01 KB)
📄
change_dvc_design.php
(2.94 KB)
📄
change_dvc_design_links.php
(2.95 KB)
📄
changepassword.php
(6.39 KB)
📄
changepasswordform.php
(1.89 KB)
📄
counter.php
(1.88 KB)
📄
cover_image.php
(3.05 KB)
📄
cover_image_form.php
(4.58 KB)
📁
cssphp
📄
diamond.php
(23.79 KB)
📄
disp_pln_amt.js
(454 B)
📄
enquiry.php
(4.13 KB)
📄
enquiry_form.php
(837 B)
📄
final_dvc.php
(2.74 KB)
📄
final_dvc_qrlink.php
(3.13 KB)
📄
final_dvc_qrlink_form.php
(6.09 KB)
📄
final_payment.php
(11.18 KB)
📄
final_payment_form.php
(1.52 KB)
📄
footer.php
(312 B)
📄
gallery.php
(2.8 KB)
📄
gallery_form.php
(3.8 KB)
📄
get_discount_rate.php
(1.24 KB)
📄
get_plan_amount.php
(1.05 KB)
📄
gold.php
(15.13 KB)
📄
googlereview.php
(3.04 KB)
📄
googlereview_form.php
(1.99 KB)
📄
header.php
(1.99 KB)
📄
movetop.php
(806 B)
📄
myprofile.php
(3.2 KB)
📄
payment-failed.php
(96 B)
📄
payment-success.php
(1.01 KB)
📄
payment.php
(3.16 KB)
📄
payment_link.php
(6.29 KB)
📄
products.php
(2.81 KB)
📄
products_form.php
(8.18 KB)
📄
profile_form.php
(10.99 KB)
📄
redeemcoupon.js
(1.17 KB)
📄
renewal.php
(6.5 KB)
📄
renewal_form.php
(2.16 KB)
📄
scripts.php
(1.46 KB)
📄
sidebar_diamond.php
(3.18 KB)
📄
sidebar_gold.php
(2.69 KB)
📄
social_links.php
(3.06 KB)
📄
social_links_form.php
(5.84 KB)
📄
statistics.php
(4.31 KB)
📄
tax_info.php
(3.03 KB)
📄
tax_info_form.php
(2.08 KB)
📄
user_forgot_password.php
(3.62 KB)
📄
user_new_password.php
(6.55 KB)
📄
youtube_links.php
(2.81 KB)
📄
youtube_links_form.php
(3.4 KB)
Editing: changepassword.php
<?php // Start PHP session (if not already started) if (session_status() == PHP_SESSION_NONE) { session_start(); require_once('assets/controlers/rddvcparamconfig.php'); // Corrected the path if (!isset($_SESSION['userid'])) { // Redirect to the login page if not logged in header("Location: ../login.php"); exit(); } // Access the username from the session $userid = $_SESSION['userid']; $rddvcplan = $_SESSION['rddvcplan']; $query = "SELECT * FROM rd_dvc_user_dt WHERE user_id = :uid"; $stmt = $RDSDVCUSER->prepare($query); $stmt->bindParam(':uid', $userid); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_ASSOC); } ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>RD's Digital Visiting Card | Change Password </title> <link href="../images/rddvc_icon.png" rel="shortcut icon" /> <!-- Template CSS --> <link rel="stylesheet" href="assets/css/style-liberty.css"> <!-- google fonts --> <link href="//fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&display=swap" rel="stylesheet"> </head> <body class="sidebar-menu-collapsed"> <div class="se-pre-con"></div> <section> <!-- sidebar menu start --> <?php if ($rddvcplan == "diamond") { include_once('sidebar_diamond.php'); } else if ($rddvcplan == "gold") { include_once('sidebar_gold.php'); } ?> <!-- //sidebar menu end --> <!-- header-starts --> <?php include_once('header.php'); ?> <!-- //header-ends --> <!-- main content start --> <div class="main-content"> <!-- content --> <div class="container-fluid content-top-gap"> <!-- breadcrumbs --> <nav aria-label="breadcrumb" class="mb-4"> <ol class="breadcrumb my-breadcrumb"> <li class="breadcrumb-item"><a href="index.php">Home</a></li> <li class="breadcrumb-item"><a href="#">Settings</a></li> <li class="breadcrumb-item active" aria-current="page">Change Password</li> </ol> </nav> <!-- //breadcrumbs --> <!-- card heading --> <div class="cards__heading"> <h3>Change Password</h3> </div> <!-- //card heading --> <!-- horizontal forms--> <!-- forms 3 --> <?php include_once('changepasswordform.php'); ?> <!-- //forms 3 --> </div> <!-- //content --> </div> <!-- main content end--> </section> <!--footer section start--> <?php include_once('footer.php'); ?> <!--footer section end--> <!-- move top --> <?php include_once('movetop.php'); ?> <!-- /move top --> <!-- Scripts --> <?php include_once('scripts.php'); ?> <script> document.addEventListener('DOMContentLoaded', function () { var passwordInput = document.getElementById('inputPassword'); var confirmPasswordInput = document.getElementById('confirmPassword'); var showPasswordCheckbox = document.getElementById('showPasswordCheckbox'); var updatePasswordBtn = document.getElementById('updatePasswordBtn'); function togglePasswordVisibility(input) { input.type = input.type === 'password' ? 'text' : 'password'; } showPasswordCheckbox.addEventListener('change', function () { togglePasswordVisibility(passwordInput); togglePasswordVisibility(confirmPasswordInput); }); // Add the event listener to the form instead of the button document.querySelector('form').addEventListener('submit', function (event) { event.preventDefault(); // Prevent the default form submission var newPassword = passwordInput.value; var confirmPassword = confirmPasswordInput.value; var userId = document.getElementsByName('user_id')[0].value; // Perform client-side validation if needed // Make an AJAX request to the server-side script var xhr = new XMLHttpRequest(); xhr.open('POST', 'assets/kiryacontrolers/updatecontents/update_user_password.php', true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); // ... xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200) { try { var response = JSON.parse(xhr.responseText); // Check the response for success and handle accordingly if (response.success) { // Password updated successfully alert(response.message); // You can update the UI based on the success message // Reset the form after a short delay setTimeout(function() { document.querySelector('form').reset(); }, 500); // Adjust the delay as needed } else { // Handle the case where the update was not successful console.error(response.message); // Display an error message to the user using an alert alert(response.message); } } catch (error) { // Handle JSON parsing error console.error('Error parsing JSON response:', error); } } else { // Handle errors console.error(xhr.statusText); } } }; // ... var data = 'inputPassword=' + encodeURIComponent(newPassword) + '&confirmPassword=' + encodeURIComponent(confirmPassword) + '&user_id=' + encodeURIComponent(userId); xhr.send(data); }); }); </script> </body> </html>
Upload File
Create Folder