[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: myreport.php
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_log('error_reporting', E_ALL); include("functions.php"); if(!isset($_SESSION['index_no78897498'])){ header("location:index"); } else { $s_code = $_SESSION['index_no78897498']; $schoolID = $_SESSION['schoolID_no789397498']; $myschoolcode = $_SESSION['myschoolcode']; $indexx = mysqli_query($new, "SELECT * FROM enrol_details WHERE s_code = '$myschoolcode' and schoolID = '$schoolID'"); $fetchsch = mysqli_fetch_array($indexx); $school_code = $fetchsch['s_code']; $student_name = $fetchsch['stud_name']; $access_code = $fetchsch['access_code']; $codeexpired = $fetchsch['codeexpired']; $today = date("Y-m-d"); if (empty($access_code)) { header("Location: buyreportcode"); exit(); } // $s_code = $_SESSION['index_no78897498']; // $schoolID = $_SESSION['schoolID_no789397498']; // $myschoolcode = $_SESSION['myschoolcode']; // // Use prepared statements to prevent SQL injection // $stmt = mysqli_prepare($new, "SELECT s_code, stud_name, access_code, codeexpired FROM enrol_details WHERE s_code = ? AND schoolID = ?"); // mysqli_stmt_bind_param($stmt, "ss", $myschoolcode, $schoolID); // mysqli_stmt_execute($stmt); // $result = mysqli_stmt_get_result($stmt); // $fetchsch = mysqli_fetch_array($result, MYSQLI_ASSOC); // mysqli_stmt_close($stmt); // mysqli_close($new); // $school_code = $fetchsch['s_code']; // $student_name = $fetchsch['stud_name']; // $access_code = $fetchsch['access_code']; // $codeexpired = $fetchsch['codeexpired']; // $today = date("Y-m-d"); // if (empty($access_code)) { // header("Location: buyreportcode"); // exit(); // } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Student Results</title> <style> /* General Styling */ body { font-family: Arial, sans-serif; background-color: #f8f9fa; margin: 20px; } h5 { margin-top: 10px; color: #555; } /* Form Styling */ .d-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 15px; } .form-control { border: 1px solid #ced4da; border-radius: 5px; padding: 8px; } /* Table Styling */ table { width: 100%; border-collapse: collapse; background-color: white; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); margin-top: 20px; } thead tr { background-color: #343a40; color: white; } th, td { padding: 12px; text-align: center; border: 1px solid #dee2e6; } th { font-weight: bold; font-size: 14px; } tbody tr:nth-child(even) { background-color: #f2f2f2; } tbody tr:hover { background-color: #e9ecef; } /* Button Styling */ .btn-primary { background-color: #007bff; border: none; color: white; padding: 10px 20px; border-radius: 5px; cursor: pointer; } .btn-primary:hover { background-color: #0056b3; } </style> </head> <body> <form method="POST" class="d-flex"> <select class="form-control" name="academic" style="width: 30%;"> <option value="">---ACADEMIC YEAR---</option> <option value="2024/2025">2024/2025</option> <option value="2025/2026">2025/2026</option> <option value="2026/2027">2026/2027</option> <option value="2027/2028">2027/2028</option> </select> <select class="form-control" name="semester" required style="width: 20%;"> <option value="">---SELECT---</option> <?php $selectt = mysqli_query($new, "SELECT * FROM semester WHERE s_code = '$school_code'"); while ($getdataa = mysqli_fetch_array($selectt)) { ?> <option value="<?php echo $getdataa['semester']; ?>"><?php echo $getdataa['semester']; ?></option> <?php } ?> </select> <button type="submit" name="submit20" class="btn btn-primary">Search</button> </form> <div class="col-12"> <h5>Index Number: <?php echo $my_index; ?></h5> <h5>Semester: <?php echo $semester; ?></h5> <h5>Academic Year: <?php echo $academic; ?></h5> <table> <center><h3>RESULT TABLE</h3></center> <thead> <tr> <th>SUBJECTS</th> <th>CLASS SCORE<br>30%</th> <th>EXAM SCORE<br>70%</th> <th>TOTAL SCORE<br>100%</th> <th>POSITION</th> <th>GRADING</th> <th>REMARKS</th> </tr> </thead> <tbody> <?php $query = "SELECT * FROM student_result WHERE index_number = '$my_index' AND term = '$semester' AND TRIM(academicyear) = '$academic'"; //echo $query; $select = mysqli_query($new, $query) or die("SQL Error: " . mysqli_error($new)); while ($get = mysqli_fetch_array($select)) { ?> <tr> <td><?php echo $get['subject']; ?></td> <td><?php echo $get['class_score']; ?></td> <td><?php echo $get['exams_score']; ?></td> <td><?php echo $get['total_score']; ?></td> <td><?php echo $get['position']; ?></td> <td><?php echo $get['grading']; ?></td> <td><?php echo $get['remarks']; ?></td> </tr> <?php } ?> </tbody> </table> </div> </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