OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
quiz
/
backup
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
đ
..
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
assets
-
02/15/2025 11:20:34 AM
rwxr-xr-x
đ
bregister.php
15.32 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
callback.php
871 bytes
05/19/2025 10:07:16 AM
rw-r--r--
đ
child_registration.php
9.47 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
dashboard copy.php
6.72 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
dashboard.php
5.94 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
data
-
02/15/2025 11:20:32 AM
rwxr-xr-x
đ
function.php
5.06 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
index.php
4.64 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
oauth.php
355 bytes
05/19/2025 10:07:16 AM
rw-r--r--
đ
old_backup
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
payment
-
02/15/2025 11:20:34 AM
rwxr-xr-x
đ
payment.php
3.67 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
process
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
register.php
10.96 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
sendOtp.php
2.32 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
styles.css
0 bytes
02/15/2025 11:21:44 AM
rw-r--r--
đ
subscription_check.php
1.39 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
verify.php
2.23 KB
05/19/2025 10:07:16 AM
rw-r--r--
Editing: dashboard copy.php
Close
<? include 'assets/php/db_config.php'; include 'assets/php/function.php'; include 'assets/php/validate.logged.php'; // $userId = $_SESSION['userId']; $count_child = count_registerd_students($gUserId); function view_payment_status($user_id) { global $conn; $sql = "SELECT * FROM child_details WHERE user_id = ? AND payment_status = 0"; if ($stmt = $conn->prepare($sql)) { $stmt->bind_param("i", $user_id); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $payments = []; while ($row = $result->fetch_assoc()) { $payments[] = $row; } return ["count" => $result->num_rows, "data" => $payments]; } else { return ["count" => $result->num_rows, "data" => ""]; } $stmt->close(); } else { return null; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Dashboard</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script> <link rel="stylesheet" href="assets/css/styles.css"> <style> body { padding: 0px; } .dashboard-container { display: flex; flex-wrap: wrap; gap: 20px; } .left-panel, .right-panel { padding: 20px; border: 1px solid #ddd; border-radius: 10px; background-color: #f9f9f9; } .left-panel { flex: 1; min-width: 300px; } .right-panel { flex: 1; min-width: 300px; } .child-details { margin-bottom: 10px; padding: 10px; border: 1px solid #ccc; border-radius: 5px; } .quiz-button { margin-top: 20px; } </style> </head> <body> <nav class="navbar navbar-light bg-light shadow-sm"> <div class="container-fluid"> <a class="navbar-brand" href="index.php"> <img src="assets/img/logo.png" alt="Logo"> </a> </div> </nav> <div class="container"> <h1 class="text-center mb-4">Quiz ā˛Ļā˛ŋā˛ā˛ā˛¤</h1> <div class="dashboard-container"> <!-- Left Panel: Child Details --> <div class="left-panel"> <h2>Total Children Registered: <span id="totalChildren"><?= $count_child ?></span></h2> <div id="childDetails"> <!-- Child details will be dynamically loaded here --> </div> <? if ($count_child < 3) { ?> <button id="#" onclick="window.location.href='child_registration.php'" class="btn btn-primary btn-lg">Register Your Child</button> <? } ?> </div> <!-- Right Panel: YouTube Video --> <div class="right-panel"> <div class="subscribe-container" style="text-align: center; padding: 20px; background-color: #f4f4f4; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);"> <h2>Subscribe to Hosadigantha Digital YouTube Channel!</h2> <p>Stay updated with the latest videos by subscribing to our channel.</p> <a href="http://www.youtube.com/@HosadiganthaDigital" target="_blank" style="text-decoration: none; display: flex; justify-content: center;"> <button style="background-color: #FF0000; color: white; font-size: 16px; padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 10px;"> <!-- YouTube Logo --> <img src="https://upload.wikimedia.org/wikipedia/commons/4/42/YouTube_icon_%282013-2017%29.png" alt="YouTube Logo" style="width: 24px; height: auto;"> Subscribe Now </button> </a> </div> <h2>Video Tutorial</h2> <div class="ratio ratio-16x9"> <iframe width="560" height="315" src="https://www.youtube.com/embed/I8gNAvSC698?si=iJ3DkN1kCcjHIGkD" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> </div> </div> </div> <!-- Start Quiz Button --> <div class="text-center quiz-button"> <button id="#" class="btn btn-primary btn-lg">Start Your Quiz</button> </div> </div> <script> $(document).ready(function() { // Function to fetch children data asynchronously async function getChildrenData() { try { const response = await $.ajax({ url: 'process/showChildDetails.php', // Path to the PHP endpoint type: 'GET', dataType: 'json', // Expecting JSON response }); console.log('Data fetched successfully:', response); return response; // Return the response data to be used later } catch (error) { console.error('Error fetching data:', error); return []; // Return an empty array in case of error } } // Function to display children data on the page async function displayChildrenData() { const children = await getChildrenData(); // Fetch data asynchronously console.log('Children data:', children); // Verify the fetched data if (children.length > 0) { // Populate Total Children $('#totalChildren').text(children.length); // Loop through children data and generate HTML for each child children.forEach((child, index) => { const childHtml = ` <div class="child-details"> <h5>Child ${index + 1}</h5> <p><strong>Name:</strong> ${child.child_name}</p> <p><strong>Class:</strong> ${child.child_class}</p> <p><strong>School:</strong> ${child.school_name}</p> <p><strong>City:</strong> ${child.city}</p> </div> `; $('#childDetails').append(childHtml); // Append generated HTML to the childDetails container }); } else { $('#childDetails').html('<p>No children data available.</p>'); // Show message if no data is available } } // Call the function to display the data when the page is ready displayChildrenData(); // Start Quiz Button Click $('#startQuiz').on('click', function() { alert('Redirecting to the quiz page!'); // Add redirection logic here, for example: // window.location.href = '/quiz'; }); }); </script> </body> </html>