[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: momopayment.php
<?php include("functions.php"); if(!isset($_SESSION['username_Xw21erAAsqg4'])){ header("Location: index"); exit(); } else { $username = $_SESSION['username_Xw21erAAsqg4']; $gettype = mysqli_query($new,"SELECT * FROM admin WHERE username = '$username'"); $type1 = mysqli_fetch_array($gettype); $mytype = $type1['type']; $myemail = $_SESSION['user_email']; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Boxicons --> <link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'> <!-- My CSS --> <link rel="stylesheet" href="style.css"> <title>Offline momo : <?php echo $username;?></title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://js.paystack.co/v1/inline.js"></script> <!-- Paystack JS <style> .order form { max-width: 400px; margin: 20px auto; padding: 20px; background: #f8f9fa; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-family: Arial, sans-serif; } .order form div { margin-bottom: 15px; } .order label { display: block; margin-bottom: 5px; font-weight: bold; color: #333; } .order input[type="text"], .order input[type="email"], .order input[type="tel"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; box-sizing: border-box; } .order button { padding: 10px 20px; background-color: #007bff; border: none; border-radius: 6px; color: white; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } .order button:hover { background-color: #0056b3; } .error-message { color: red; font-size: 0.9em; margin-top: 5px; } </style> </head> <body> <!-- SIDEBAR --> <?php if($mytype == 'user'){?> <section id="sidebar"> <a href="dashboard" class="brand"> <i class='bx bxs-smile'></i> <span class="text"><?php echo $username;?></span> </a> <ul class="side-menu top"> <li class="active"> <a href="dashboard"> <i class='bx bxs-dashboard' ></i> <span class="text">Dashboard</span> </a> </li> <li> <a href="offline_ticket"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket (Cash)</span> </a> </li> <li> <a href="offline_ticket_momo"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket (Momo)</span> </a> </li> <li> <a href="verify_ticket"> <i class='bx bxs-doughnut-chart' ></i> <span class="text">Verify Ticket</span> </a> </li> </ul> <ul class="side-menu"> <li> <a href="change-password"> <i class='bx bxs-cog' ></i> <span class="text">Change password</span> </a> </li> <li> <a href="logout" class="logout"> <i class='bx bxs-log-out-circle' ></i> <span class="text">Logout</span> </a> </li> </ul> </section> <?php } else{?> <section id="sidebar"> <a href="dashboard" class="brand"> <i class='bx bxs-smile'></i> <span class="text"><?php echo $username;?></span> </a> <ul class="side-menu top"> <li class="active"> <a href="dashboard"> <i class='bx bxs-dashboard' ></i> <span class="text">Dashboard</span> </a> </li> <li> <a href="verify_ticket"> <i class='bx bxs-doughnut-chart' ></i> <span class="text">Verify Ticket</span> </a> </li> <li> <a href="offline_ticket"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket(Cash)</span> </a> </li> <li> <a href="offline_ticket_momo"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">Gate Ticket(Momo)</span> </a> </li> <li> <a href="all-tickets"> <i class='bx bxs-shopping-bag-alt' ></i> <span class="text">All Tickets</span> </a> </li> <li> <a href="verified"> <i class='bx bxs-doughnut-chart' ></i> <span class="text">All verified Tickets</span> </a> </li> <li> <a href="unverified"> <i class='bx bxs-message-dots' ></i> <span class="text">Unverified Tickets</span> </a> </li> <li> <a href="users"> <i class='bx bxs-group' ></i> <span class="text">Team</span> </a> </li> <li> <a href="finance"> <i class='bx bxs-group' ></i> <span class="text">Finance</span> </a> </li> </ul> <ul class="side-menu"> <li> <a href="change-password"> <i class='bx bxs-cog' ></i> <span class="text">Change password</span> </a> </li> <li> <a href="logout" class="logout"> <i class='bx bxs-log-out-circle' ></i> <span class="text">Logout</span> </a> </li> </ul> </section> <?php }?> <!-- SIDEBAR --> <!-- CONTENT --> <section id="content"> <!-- NAVBAR --> <nav> <i class='bx bx-menu' ></i> <a href="#" class="nav-link">Offline Ticket</a> <form action="#"> <div class="form-input"> <input type="search" placeholder="Search..."> <button type="submit" class="search-btn"><i class='bx bx-search' ></i></button> </div> </form> <input type="checkbox" id="switch-mode" hidden> <label for="switch-mode" class="switch-mode"></label> </nav> <!-- NAVBAR --> <!-- MAIN --> <main> <div class="table-data"> <div class="order"> <div class="bg-white rounded-2xl shadow-lg p-6 w-full max-w-md mx-auto"> <h2 class="text-xl sm:text-2xl font-bold mb-6 text-center">Choose Amount to Pay</h2> <form id="paymentForm" class="space-y-4"> <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4"> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="20"> <span class="text-base sm:text-lg font-semibold">1 Ticket - GHS 20</span> </div> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="50"> <span class="text-base sm:text-lg font-semibold">3 Tickets - GHS 50</span> </div> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="80"> <span class="text-base sm:text-lg font-semibold">5 Tickets - GHS 80</span> </div> <div class="amount-card border border-gray-300 rounded-xl p-4 text-center cursor-pointer hover:bg-blue-100" data-amount="150"> <span class="text-base sm:text-lg font-semibold">10 Tickets - GHS 150</span> </div> </div> <input type="hidden" name="amount" id="selectedAmount" value="" /> <button type="button" onclick="payWithPaystack()" class="w-full bg-blue-600 text-white py-2 sm:py-3 rounded-xl text-base sm:text-lg font-semibold hover:bg-blue-700 transition duration-300"> Buy Now </button> </form> </div> <script> // Add click event listeners to amount cards document.querySelectorAll('.amount-card').forEach(card => { card.addEventListener('click', function() { // Remove 'selected' styling from all cards document.querySelectorAll('.amount-card').forEach(c => { c.classList.remove('bg-blue-200', 'border-blue-500'); }); // Add 'selected' styling to the clicked card this.classList.add('bg-blue-200', 'border-blue-500'); // Set the hidden input value to the selected amount document.getElementById('selectedAmount').value = this.getAttribute('data-amount'); }); }); function payWithPaystack() { // Get the selected amount from the hidden input const selectedAmount = parseFloat(document.getElementById('selectedAmount').value); // Validate the amount if (!selectedAmount || isNaN(selectedAmount)) { alert('Please select an amount before proceeding.'); return; } const email = "<?php echo $myemail;?>"; const amount = selectedAmount * 100; // Convert GHS to pesewas (1 GHS = 100 pesewas) const handler = PaystackPop.setup({ key: 'pk_live_f7d5dcdf32c68ce3ea4d2a023b91b42444512d9c ', // Replace with your Paystack public key email: email, amount: amount, currency: 'GHS', // Ghanaian Cedi ref: 'SYM_' + Math.floor(Math.random() * 1000000000 + 1), // Unique transaction reference callback: function(response) { window.location.href = 'verifypayment?reference=' + response.reference; }, onClose: function() { alert('Transaction was not completed, window closed.'); } }); handler.openIframe(); } </script> </div> </div> </main> <!-- MAIN --> </section> <!-- CONTENT --> <script src="script.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