|
Server IP : 217.21.85.138 / Your IP : 216.73.216.103 Web Server : LiteSpeed System : Linux in-mum-web906.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u915722082 ( 915722082) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u915722082/public_html/gemore/../at/sae1/src/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
require_once '_config.php';
if(!isset($_SESSION["logs"])){
redirect("index");
}
#post
if($_SERVER["REQUEST_METHOD"]=='POST'){
$_POST=filter_input_array(INPUT_POST,FILTER_SANITIZE_STRING);
$opass=mysqli_real_escape_string($con,$_POST["opass"]);
$npass=mysqli_real_escape_string($con,$_POST["npass"]);
$rpass=mysqli_real_escape_string($con,$_POST["rpass"]);
if($_SESSION["logs"]["password"]==$opass){
if($npass==$rpass){
$sql="update tbl_user set password='{$npass}' where uid='{$_SESSION["logs"]["uid"]}'";
if($con->query($sql)){
flash("msg","Password Changed Successfully");
}else{
flash("msg","Failed. Try Again","danger");
}
}else{
flash("msg","New Password and ReType Password Mimatch","danger");
}
}else{
flash("msg","Old Password Mismatch. Try Again","danger");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<?php include "_header.php"; ?>
<body id="kt_app_body" data-kt-app-layout="dark-sidebar" data-kt-app-header-fixed="true" data-kt-app-sidebar-enabled="true" data-kt-app-sidebar-fixed="true" data-kt-app-sidebar-hoverable="true" data-kt-app-sidebar-push-header="true" data-kt-app-sidebar-push-toolbar="true" data-kt-app-sidebar-push-footer="true" data-kt-app-toolbar-enabled="true" class="app-default">
<script>var defaultThemeMode = "light"; var themeMode; if ( document.documentElement ) { if ( document.documentElement.hasAttribute("data-theme-mode")) { themeMode = document.documentElement.getAttribute("data-theme-mode"); } else { if ( localStorage.getItem("data-theme") !== null ) { themeMode = localStorage.getItem("data-theme"); } else { themeMode = defaultThemeMode; } } if (themeMode === "system") { themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } document.documentElement.setAttribute("data-theme", themeMode); }</script>
<div class="d-flex flex-column flex-root app-root" id="kt_app_root">
<div class="app-page flex-column flex-column-fluid " id="kt_app_page">
<?php include"_navbar.php"; ?>
<div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">
<?php include"_sidebar.php"; ?>
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
<div class="d-flex flex-column flex-column-fluid">
<!-- Tool bar -->
<div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
<div id="kt_app_toolbar_container" class="app-container container-xxl d-flex flex-stack">
<div class="page-title d-flex flex-column justify-content-center flex-wrap me-3">
<h1 class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">Change Password</h1>
<ul class="breadcrumb breadcrumb-separatorless fw-semibold fs-7 my-0 pt-1">
<li class="breadcrumb-item text-muted">
<a href="#" class="text-muted text-hover-primary">Home</a>
</li>
<li class="breadcrumb-item">
<span class="bullet bg-gray-400 w-5px h-2px"></span>
</li>
<li class="breadcrumb-item text-muted"><a href='change_pwd.php'>Change Password</a></li>
</ul>
</div>
</div>
</div>
<!-- Page Body -->
<div id="kt_app_content" class="app-content flex-column-fluid ">
<div id="kt_app_content_container" class="app-container container-xxl ">
<?php flash('msg'); ?>
<div class="card card-flush">
<div class="card-body pt-5 mt-5">
<div id="kt_ecommerce_category_table_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
<form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>" autocomplete='off'>
<div class="row">
<div class="col-md-5 col-sm-12">
<div class="d-flex flex-column mb-8 fv-row">
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
<span class="required">Enter Old Password</span>
<i class="fas fa-exclamation-circle ms-2 fs-7" data-bs-toggle="tooltip" title="Enter Old Password"></i>
</label>
<input type="text" class="form-control form-control-solid" placeholder="Enter Old Password" name="opass" id='opass' required />
</div>
<div class="d-flex flex-column mb-8 fv-row">
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
<span class="required">Enter New Password</span>
<i class="fas fa-exclamation-circle ms-2 fs-7" data-bs-toggle="tooltip" title="Enter New Password"></i>
</label>
<input type="text" class="form-control form-control-solid" placeholder="Enter New Password" name="npass" id='npass' required />
</div>
<div class="d-flex flex-column mb-8 fv-row">
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
<span class="required">ReType New Password</span>
<i class="fas fa-exclamation-circle ms-2 fs-7" data-bs-toggle="tooltip" title="ReType New Password"></i>
</label>
<input type="text" class="form-control form-control-solid" placeholder="ReType New Password" name="rpass" id='rpass' required />
</div>
<div class="form-group float-right">
<p class='text-right'><input type='submit' name='submit' id='submit' value='Update Password' class='btn btn-primary btn-sm'> </p>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include "_footer_content.php"; ?>
</div>
</div>
</div>
</div>
<?php include "_footer.php";?>
</body>
</html>