[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: index.php
<?php include("functions.php"); $message = ""; 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 { $student_id = test_input($_POST['studentid']); // could be schoolID or indexNo $access_code1 = test_input($_POST['access_code']); $sql1 = "SELECT index_no, schoolID, s_code, access_code,unique_student_code FROM enrol_details WHERE (schoolID = ? OR index_no = ? OR unique_student_code = ? ) AND access_code = ?"; $stmt1 = $con->prepare($sql1); $loggedIn = false; if ($stmt1) { $stmt1->execute([$student_id, $student_id,$student_id, $access_code1]); $data = $stmt1->fetch(PDO::FETCH_ASSOC); if ($data) { // Login success from enrol_details $_SESSION['index_no78897498'] = $data['index_no']; $_SESSION['student_id0023894'] = $data['schoolID']; $_SESSION['student_id0023894453'] = $data['unique_student_code']; $_SESSION['myschoolcode'] = $data['s_code']; $loggedIn = true; header('Location: dashboard'); exit; } } // If not found in enrol_details, check enrol_generic if (!$loggedIn) { $sql2 = "SELECT indexNo, s_code, access FROM enrol_generic WHERE indexNo = ? AND access = ?"; $stmt2 = $con->prepare($sql2); if ($stmt2) { $stmt2->execute([$student_id, $access_code1]); $data2 = $stmt2->fetch(PDO::FETCH_ASSOC); if ($data2) { // Login success from enrol_generic $_SESSION['index_no78897498'] = $data2['indexNo']; $_SESSION['student_id0023894'] = null; // no schoolID in this table $_SESSION['myschoolcode'] = $data2['s_code']; header('Location: dashboard'); exit; } else { $message = '<p class="btn btn-danger">Error: Invalid Index Number or Access Code.</p>'; } } } } } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Student Login</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">Login Instructions</h2> <div class="text-center mb-3"> <?php if($message != "") { echo $message; } ?> </div> <p class="login-instructions"> Please ensure you have your access token and student ID or Index number </p> <form method="POST" class="needs-validation" novalidate> <?php echo csrf_token_tag(); ?> <div class="mb-3"> <label class="form-label">SCHOOL ID OR BECE INDEX NUMBER</label> <input type="text" class="form-control" name="studentid" required> <div class="invalid-feedback">Index number is required</div> </div> <!-- Index Number --> <div class="mb-3"> <label class="form-label">REFERENCE NUMBER</label> <input type="number" class="form-control" name="access_code" required> <div class="invalid-feedback">Access token code required</div> </div> <button class="btn btn-primary w-100" type="submit" name="submit">Login</button> </form> <div class="login-footer text-center"> <a href="homeindex" class="glass-btn">Purchase Reference Code</a> <style> .glass-btn { display: inline-block; padding: 10px 20px; color: white; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; backdrop-filter: blur(6px); text-decoration: none; font-weight: 500; transition: all 0.3s ease; } .glass-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); } </style> <br /><br /> <a href="getcode">Recover your access token code? 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: 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