[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: buyreportcode.php
<?php // ini_set('display_errors', 1); // ini_set('display_startup_errors', 1); // error_reporting(E_ALL); include("functions.php"); if(!isset($_SESSION['index_no78897498'])){ header("location:index"); } else { $myschoolcode = $_SESSION['myschoolcode']; $schoolID = $_SESSION['student_id0023894']; $myschoolid = $_SESSION['student_id0023894453']; if($myschoolid ==""){ $okkay = $schoolID; } else { $okkay = $myschoolid; } $selectme = mysqli_query($new," SELECT access_code, codeexpired, student_name, classname, schoolID FROM enrol_details WHERE (schoolID = '$schoolID' OR unique_student_code = '$myschoolid') AND s_code = '$myschoolcode' "); $getpay = mysqli_fetch_array($selectme); $selectme = mysqli_query($new," SELECT access_code, codeexpired, student_name, classname, schoolID FROM enrol_details WHERE (schoolID = '$schoolID' OR unique_student_code = '$myschoolid') AND s_code = '$myschoolcode' "); $getpay = mysqli_fetch_array($selectme); if ($getpay) { $myname = $getpay['student_name']; $classname = $getpay['classname']; $schoolIDD = $getpay['schoolID']; $mynewschoolid = $getpay['unique_student_code']; $access_code = $getpay['access_code']; $codeexpired = $getpay['codeexpired']; $today = date("Y-m-d"); // If no code or expiry at all → go to buy page if (empty($access_code) || empty($codeexpired)) { } // If expired → go to buy page elseif (strtotime($codeexpired) < strtotime($today)) { } else { // Still valid → go to report page header("Location: veiwmyreport.php"); exit(); } } else { // No record at all for this student header("Location: personalrecords"); exit(); } $studentD = mysqli_query($new,"SELECT * FROM enrol_details,class WHERE (enrol_details.schoolID = '$schoolID' OR unique_student_code = '$mynewschoolid') and enrol_details.class_id = class.cid"); $getinfo = mysqli_fetch_array($studentD); $c_name = $getinfo['class_name']; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Buy Report Code</title> <script src="https://js.paystack.co/v1/inline.js"></script> <style> * { box-sizing: border-box; font-family: 'Poppins', sans-serif; } body { margin: 0; background: linear-gradient(135deg, #f0f4ff, #ffffff); display: flex; justify-content: center; align-items: center; min-height: 100vh; } .container { background: #fff; width: 95%; max-width: 550px; padding: 2rem; border-radius: 1rem; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); animation: fadeIn 0.8s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } } h1 { text-align: center; color: #2c3e50; font-size: 1.8rem; margin-bottom: 0.5rem; } .cost { text-align: center; font-weight: 600; color: #27ae60; font-size: 1.1rem; margin-bottom: 0.3rem; } .warning { text-align: center; background: #fff8e1; border: 1px solid #ffeb3b; padding: 0.6rem; border-radius: 6px; color: #8d6e00; font-size: 0.9rem; margin-bottom: 1.5rem; } .form-group { margin-bottom: 1.3rem; } label { display: block; margin-bottom: 0.4rem; font-weight: 600; color: #34495e; } label span { font-weight: 400; font-size: 0.85rem; color: #7f8c8d; } input { width: 100%; padding: 0.7rem 0.9rem; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; outline: none; transition: all 0.2s ease; } input:focus { border-color: #3498db; box-shadow: 0 0 4px rgba(52, 152, 219, 0.4); } input[readonly] { background-color: #f4f6f8; color: #555; } .note { font-size: 0.8rem; color: #7f8c8d; margin-top: 0.3rem; } button { width: 100%; background: #3498db; color: white; border: none; padding: 0.9rem; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; transition: background 0.3s ease, transform 0.2s ease; } button:hover { background: #2980b9; transform: translateY(-2px); } button:active { transform: scale(0.98); } </style> </head> <body> <div class="container"> <h1>Buy Report Access </h1> <p class="cost">Is onetime payment till the next acedamic year: <strong>GHC 40.00</strong></p> <!--<p class="warning">Please verify all details before proceeding. Codes purchased in error are non-refundable.</p>--> <form method="POST" id="paymentForm"> <div class="form-group"> <label for="fullName">Full Name</label> <input type="text" id="fullName" value="<?php echo $myname;?> [ Class : <?php echo !empty($classname) ? $classname : $c_name; ?>]" readonly> </div> <div class="form-group"> <label for="admissionNumber">School ID</label> <input type="text" id="admissionNumber" value="<?php echo $okkay;?>" readonly> </div> <button type="button" id="submitBtn">Pay Now</button> </form> </div> </body> </html> <script> // PHP variables passed into JS const indexNo = "<?php echo $okkay; ?>"; const schoolCode = "<?php echo $myschoolcode; ?>"; document.getElementById("submitBtn").addEventListener("click", function() { // Redirect to hubtel.php with dynamic parameters const redirectUrl = `reportpayments.php?myindex=${encodeURIComponent(indexNo)}&myschoolcode=${encodeURIComponent(schoolCode)}`; window.location.href = redirectUrl; }); </script>
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