[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: change-password.php
<?php include("functions.php"); if(!isset($_SESSION['username_Xw21erAAsqg4'])){ header("Location: index"); exit(); } else { $username = $_SESSION['username_Xw21erAAsqg4']; $gettype = mysqli_query($new,"SELECT * FROM admin WHERE username = '$username'"); $type1 = mysqli_fetch_array($gettype); $mytype = $type1['type']; $success_message = ""; if ($_SERVER['REQUEST_METHOD'] === 'POST') { // CSRF token validation if (!csrf_token_is_valid() || !csrf_token_is_recent()) { $success_message = "<p class='alert alert-danger text-center' role='alert'>Sorry, Token Authentication invalid.</p>"; } else { $password = test_input($_POST['password']); $confirm_password = test_input($_POST['confirm_password']); if($password != $confirm_password){ $success_message = "<p class='alert alert-danger text-center' role='alert'>Password do not match.</p>"; } else { $hashed_password = password_hash($password, PASSWORD_BCRYPT, ['cost' => 12]); $update = mysqli_query($new,"UPDATE admin SET password = '$hashed_password' WHERE username = '$username'"); if($update == true){ $success_message = "<p class='alert alert-success text-center' role='alert'>Password changed successfully.</p>"; } } } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Boxicons --> <link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'> <!-- My CSS --> <link rel="stylesheet" href="style.css"> <title>CHANGE PASSWORD : <?php echo $username;?></title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial', sans-serif; } .container { background: white; padding: 2rem; border-radius: 10px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); width: 100%; max-width: 400px; text-align: center; } h1 { font-size: 1.8rem; color: #333; margin-bottom: 1.5rem; } .form-group { margin-bottom: 1.5rem; text-align: left; } label { display: block; font-size: 0.9rem; color: #555; margin-bottom: 0.5rem; } input { width: 100%; padding: 0.8rem; font-size: 1rem; border: 1px solid #ddd; border-radius: 5px; outline: none; transition: border-color 0.3s; } input:focus { border-color: #6e8efb; } .verify-btn { width: 100%; padding: 0.8rem; background: #6e8efb; color: white; font-size: 1rem; border: none; border-radius: 5px; cursor: pointer; transition: background 0.3s; } .verify-btn:hover { background: #5a79e0; } .result { margin-top: 1rem; font-size: 0.9rem; padding: 0.8rem; border-radius: 5px; display: none; } .result.success { display: block; background: #e0f7e9; color: #28a745; } .result.error { display: block; background: #f8d7da; color: #dc3545; } /* Responsive design */ @media (max-width: 480px) { .container { padding: 1.5rem; margin: 1rem; } h1 { font-size: 1.5rem; } } </style> </head> <body> <!-- SIDEBAR --> <?php if($mytype == 'user'){?> <section id="sidebar"> <a href="dashboard" class="brand"> <i class='bx bxs-smile'></i> <span class="text"><?php echo $username;?></span> </a> <ul class="side-menu top"> <li class="active"> <a href="dashboard"> <i class='bx bxs-dashboard' ></i> <span class="text">Dashboard</span> </a> </li> <li> <a href="offline_ticket"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket (Cash)</span> </a> </li> <li> <a href="offline_ticket_momo"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket (Momo)</span> </a> </li> <li> <a href="verify_ticket"> <i class='bx bxs-doughnut-chart' ></i> <span class="text">Verify Ticket</span> </a> </li> </ul> <ul class="side-menu"> <li> <a href="change-password"> <i class='bx bxs-cog' ></i> <span class="text">Change password</span> </a> </li> <li> <a href="logout" class="logout"> <i class='bx bxs-log-out-circle' ></i> <span class="text">Logout</span> </a> </li> </ul> </section> <?php } else{?> <section id="sidebar"> <a href="dashboard" class="brand"> <i class='bx bxs-smile'></i> <span class="text"><?php echo $username;?></span> </a> <ul class="side-menu top"> <li class="active"> <a href="dashboard"> <i class='bx bxs-dashboard' ></i> <span class="text">Dashboard</span> </a> </li> <li> <a href="verify_ticket"> <i class='bx bxs-doughnut-chart' ></i> <span class="text">Verify Ticket</span> </a> </li> <li> <a href="offline_ticket"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket (Cash)</span> </a> </li> <li> <a href="offline_ticket_momo"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket (Momo)</span> </a> </li> <li> <a href="all-tickets"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">All Tickets</span> </a> </li> <li> <a href="verified"> <i class='bx bxs-doughnut-chart' ></i> <span class="text">All verified Tickets</span> </a> </li> <li> <a href="unverified"> <i class='bx bxs-message-dots' ></i> <span class="text">Unverified Tickets</span> </a> </li> <li> <a href="users"> <i class='bx bxs-group' ></i> <span class="text">Team</span> </a> </li> <li> <a href="finance"> <i class='bx bxs-group' ></i> <span class="text">Finance</span> </a> </li> </ul> <ul class="side-menu"> <li> <a href="change-password"> <i class='bx bxs-cog' ></i> <span class="text">Change password</span> </a> </li> <li> <a href="logout" class="logout"> <i class='bx bxs-log-out-circle' ></i> <span class="text">Logout</span> </a> </li> </ul> </section> <?php }?> <!-- SIDEBAR --> <!-- CONTENT --> <section id="content"> <!-- NAVBAR --> <nav> <i class='bx bx-menu' ></i> <a href="dashboard" class="nav-link">Dashboard</a> <form action="dashboard"> <div class="form-input"> <input type="search" placeholder="Search..."> <button type="submit" class="search-btn"><i class='bx bx-search' ></i></button> </div> </form> <input type="checkbox" id="switch-mode" hidden> <label for="switch-mode" class="switch-mode"></label> </nav> <!-- NAVBAR --> <!-- MAIN --> <main> <div class="table-data"> <div class="order"> <form id="registrationForm" method="POST"> <?php echo csrf_token_tag(); ?> <div class="container"> <h1>Change password</h1> <?php if (!empty($success_message)) { echo $success_message; } ?> <div class="form-group"> <label for="ticketCode">Password</label> <input type="password" id="ticketCode" name="password" required> </div> <div class="form-group"> <label for="ticketCode">Confirm Password</label> <input type="password" id="ticketCode" name="confirm_password" required > </div> <button id="submit" name="submit" class="verify-btn">Submit</button> </form> </div> </div> </div> </body> </html> <script src="script.js"></script> </body> </html>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 60.07 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:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002