[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: verify_ticket.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>VERIFY : <?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="#" class="nav-link">Categories</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> <!-- <a href="#" class="notification"> <i class='bx bxs-bell' ></i> <span class="num">8</span> </a> --> <!--<a href="#" class="profile">--> <!-- <img src="img/people.png">--> <!--</a>--> </nav> <!-- NAVBAR --> <!-- MAIN --> <main> <div class="table-data"> <div class="order"> <div class="container"> <h1>Ticket Verification</h1> <div class="form-group"> <label for="ticketCode">Enter Ticket Code</label> <input type="text" id="ticketCode" name="ticketCode" placeholder="e.g., PAX-1234-5678" title="Ticket code can only contain letters, numbers, and hyphens." > </div> <button id="confirmBtn" class="verify-btn" disabled>Confirm Ticket</button> <div id="result" class="result"></div> </div> </div> </div> <script> const ticketInput = document.getElementById('ticketCode'); const confirmBtn = document.getElementById('confirmBtn'); const resultDiv = document.getElementById('result'); // Debounce function to limit API calls function debounce(func, delay) { let timeoutId; return function (...args) { clearTimeout(timeoutId); timeoutId = setTimeout(() => func.apply(this, args), delay); }; } // Function to check ticket validity async function checkTicket(ticketCode, mode = 'check') { if (!ticketCode) { resultDiv.textContent = ''; resultDiv.classList.remove('success', 'error'); resultDiv.style.display = 'none'; confirmBtn.disabled = true; return; } resultDiv.textContent = 'Checking...'; resultDiv.classList.remove('success', 'error'); resultDiv.style.display = 'block'; try { const response = await fetch('VerifyTicket.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ ticket_code: ticketCode, mode }) }); const data = await response.json(); resultDiv.textContent = data.message; resultDiv.classList.add(data.valid ? 'success' : 'error'); confirmBtn.disabled = !data.valid || mode === 'confirm'; } catch (error) { resultDiv.textContent = 'Error checking ticket.'; resultDiv.classList.add('error'); confirmBtn.disabled = true; } } // Live search: trigger check on input ticketInput.addEventListener('input', debounce((e) => { const ticketCode = e.target.value.trim(); checkTicket(ticketCode, 'check'); }, 300)); // Confirm button: mark ticket as used confirmBtn.addEventListener('click', async (e) => { e.preventDefault(); const ticketCode = ticketInput.value.trim(); if (ticketCode) { await checkTicket(ticketCode, 'confirm'); } }); </script> </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: 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