[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: getcode.php
<?php include("functions.php"); $message = ""; $myschoolID = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (!csrf_token_is_valid() || !csrf_token_is_recent()) { $message = "<p class='alert alert-danger text-center' role='alert'>Token Authentication Failed</p>"; } else { $access_code2020 = test_input($_POST['access_code']); $schoolCode = test_input($_POST['schoolCode']); $select = mysqli_query($new, "SELECT access_code FROM stud_payment WHERE indexNumber = '$access_code2020' AND s_code = '$schoolCode'"); if (!$select) { $message = "<p class='alert alert-danger'>Database query failed: " . mysqli_error($new) . "</p>"; } elseif (mysqli_num_rows($select) === 0) { $message = '<p class="btn btn-danger">Error: Wrong Index number or Reference number does not exist</p>'; } else { $getalldata = mysqli_fetch_assoc($select); $myschoolID = $getalldata['access_code']; // ✅ This will be displayed } } } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>RECOVER YOUR ACCESS TOKEN CODE</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta content="eliosof" name="author" /> <!-- Bootstrap CSS --> <link href="assets/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/css/icons.min.css" rel="stylesheet"> <link href="assets/css/app.min.css" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-beta.1/css/select2.min.css" rel="stylesheet" /> <style> body { background-image: url('440.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat; min-height: 100vh; display: flex; align-items: center; justify-content: center; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .login-card { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); border-radius: 20px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); padding: 2rem; width: 100%; max-width: 500px; animation: fadeIn 0.6s ease-in-out; } .login-title { font-weight: 700; font-size: 1.4rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; color: #0d6efd; } .login-instructions { font-size: 0.9rem; line-height: 1.5; color: #333; text-align: justify; margin-bottom: 1.5rem; } .form-label { font-weight: 500; margin-bottom: 0.3rem; } .form-control, .select2-container .select2-selection--single { border-radius: 12px !important; padding: 0.6rem; } .btn-primary { border-radius: 12px; font-weight: 600; padding: 0.75rem; } .login-footer { font-size: 0.85rem; color: #555; margin-top: 1.5rem; } .login-footer a { color: #0d6efd; text-decoration: none; font-weight: 500; } .login-footer a:hover { text-decoration: underline; } /* Select2 custom styling with logos */ .school-option { display: flex; align-items: center; gap: 10px; } .school-option img { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; } @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* Fix Select2 look */ .select2-container .select2-selection--single { height: 45px !important; border-radius: 12px !important; display: flex; align-items: center; padding: 5px 12px; } /* Fix dropdown results */ .select2-results__option { display: flex; align-items: center; gap: 10px; padding: 6px 10px; } /* Logo inside dropdown and selection */ .school-option img { width: 25px; height: 25px; border-radius: 50%; object-fit: cover; } </style> </head> <body> <div class="login-card"> <h2 class="login-title text-center">RECOVER YOUR REFERENCE NUMBER</h2> <div class="text-center mb-3"> <?php if($message != "") { echo $message; } ?> </div> <form method="POST" class="needs-validation" novalidate> <?php echo csrf_token_tag(); ?> <div class="mb-3"> <label class="form-label">Select Your School</label> <select class="form-select school-select" name="schoolCode" required> <option value="">-- Select Your School --</option> <?php $getallshs = mysqli_query($new,"SELECT DISTINCT logo, school_name,school_code FROM schools ORDER BY school_name DESC"); while($row = mysqli_fetch_assoc($getallshs)) { $logo = $row['logo']; $name = $row['school_name']; $school_code = $row['school_code']; echo '<option value="'.$school_code.'" data-logo="'.$logo.'">'.$name.'</option>'; } ?> </select> <div class="invalid-feedback">Please select your school</div> </div> <div class="mb-3"> <label class="form-label">Your Index number:</label> <input type="text" id="schoolInput" class="form-control" name="access_code" autocomplete="off" required> <div class="invalid-feedback">Student id is required</div> </div> <div class="mb-3"> <label class="form-label">YOUR REFERENCE NUMBER</label> <input type="number" class="form-control" readonly value="<?php echo $myschoolID;?>"> </div> <button class="btn btn-primary w-100" type="submit" name="submit">GET REFERENCE</button> </form> <div class="login-footer text-center"> <a href="index">Do you want to login? Click here</a> <!-- <h6 class="mt-3 fw-bold">HELPLINE: +233 208 825 287</h6> --> <p class="mt-2 mb-0">© <script>document.write(new Date().getFullYear())</script> Powered by BBECAS</p> </div> </div> <!-- JS --> <script src="assets/libs/jquery/jquery.min.js"></script> <script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-beta.1/js/select2.min.js"></script> <script src="assets/js/pages/pass-addon.init.js"></script> <script src="assets/js/pages/validation.init.js"></script> <script> // Initialize Select2 with proper template for logos $(".school-select").select2({ placeholder: "-- Select Your School --", width: '100%', templateResult: function (data) { if (!data.id) return data.text; let logo = $(data.element).data('logo'); return $('<span class="school-option"><img src="'+logo+'" />'+data.text+'</span>'); }, templateSelection: function (data) { if (!data.id) return data.text; let logo = $(data.element).data('logo'); return $('<span class="school-option"><img src="'+logo+'" />'+data.text+'</span>'); } }); </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