[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: users.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']; } ?> <!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>Welcome : <?php echo $username;?></title> </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">Offline Ticket(Cash)</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">Offline Ticket(Cash)</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="#"> <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="head-title"> <div class="left"> <h1>All Team members</h1> <ul class="breadcrumb"> <li> <a href="dashboard">All Team members</a> </li> <li><i class='bx bx-chevron-right' ></i></li> <li> <a class="active" href="dashboard">All Team members</a> </li> </ul> </div> <a class="btn-download" id="openModalBtn"> <i class='bx bxs-cloud-download'></i> <span class="text">Add new Team</span> </a> </div> <div class="table-data"> <div class="order"> <div class="head"> </div> <div> <input type="text" id="searchInput" onkeyup="searchTable()" placeholder="Search table..."> </div> <table id="ticketTable"> <thead> <tr> <th>ID</th> <th>Username</th> <th>Email</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php $cnt = 1; $totalTickw = mysqli_query($new, "SELECT * FROM admin WHERE type != 'admin' order by id DESC"); while ($getrow = mysqli_fetch_array($totalTickw)) { ?> <tr> <td><?php echo $cnt++; ?></td> <td><?php echo htmlspecialchars($getrow['username']); ?></td> <td><?php echo htmlspecialchars($getrow['email']); ?></td> <td> <?php if($getrow['active'] == '1'){; echo '<span class="status completed">Active</span>'; } else { echo '<span class="status pending">Inactive</span>'; }?> </td> <td> <a href="delete_user.php?id=<?php echo $getrow['id']; ?>" onclick="return confirm('Are you sure you want to delete this user?')"> Delete </a> </td> </tr> <?php } ?> </tbody> </table> <script> function searchTable() { // Get input value and table let input = document.getElementById("searchInput"); let filter = input.value.toLowerCase(); let table = document.getElementById("ticketTable"); let tr = table.getElementsByTagName("tr"); // Loop through all table rows, starting from index 1 to skip header for (let i = 1; i < tr.length; i++) { let td = tr[i].getElementsByTagName("td"); let rowVisible = false; // Check each cell in the row for (let j = 0; j < td.length; j++) { if (td[j]) { let txtValue = td[j].textContent || td[j].innerText; if (txtValue.toLowerCase().indexOf(filter) > -1) { rowVisible = true; break; } } } // Show or hide row based on search match tr[i].style.display = rowVisible ? "" : "none"; } } </script> <style> #searchInput { padding: 8px; margin-bottom: 10px; width: 100%; max-width: 300px; box-sizing: border-box; } /* Modal container */ .modal { display: none; position: fixed; z-index: 999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); } /* Modal content */ .modal-content { background: #fff; margin: 10% auto; padding: 30px; border-radius: 12px; width: 400px; max-width: 90%; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); position: relative; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } /* Modal header */ .modal-content h2 { margin-top: 0; font-size: 22px; text-align: center; color: #333; } /* Close button */ .close { position: absolute; top: 10px; right: 15px; font-size: 26px; color: #999; cursor: pointer; } .close:hover { color: #000; } /* Form styling */ .modal-content form { display: flex; flex-direction: column; gap: 15px; } .modal-content label { font-weight: 500; color: #333; } .modal-content input { padding: 10px; font-size: 14px; border-radius: 6px; border: 1px solid #ccc; transition: border 0.3s ease; } .modal-content input:focus { border-color: #007BFF; outline: none; } /* Submit button */ .modal-content button { padding: 12px; background-color: #007BFF; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; } .modal-content button:hover { background-color: #0056b3; } </style> </div> </div> </main> <!-- MAIN --> </section> <!-- CONTENT --> <!-- Modal --> <!-- Modal --> <div id="adminModal" class="modal"> <div class="modal-content"> <span class="close" id="closeModalBtn">×</span> <h2>Add New Team</h2> <form id="adminForm"> <label for="username">Username:</label> <input type="text" id="username" name="username" required> <label for="email">Email:</label> <input type="email" id="email" name="email" required> <label for="password">Password:</label> <input type="password" id="password" name="password" required> <select name="status" required> <option value="">select</option> <option value="admin">Admin</option> <option value="user">Team</option> </select> <button type="submit">Submit</button> </form> </div> </div> <script> const openModalBtn = document.getElementById('openModalBtn'); const closeModalBtn = document.getElementById('closeModalBtn'); const adminModal = document.getElementById('adminModal'); openModalBtn.onclick = function () { adminModal.style.display = 'block'; } closeModalBtn.onclick = function () { adminModal.style.display = 'none'; } window.onclick = function (event) { if (event.target == adminModal) { adminModal.style.display = 'none'; } } </script> <script> document.getElementById('adminForm').addEventListener('submit', function(e) { e.preventDefault(); // Stop normal form submission const formData = new FormData(this); fetch('add_user.php', { method: 'POST', body: formData }) .then(res => res.text()) .then(response => { alert(response); // Show response from server document.getElementById('adminForm').reset(); // Clear form document.getElementById('adminModal').style.display = 'none'; // Close modal }) .catch(error => { alert('Error: ' + error); }); }); </script> <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: 59.81 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