OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
quiz
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
đ
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
đ
admin.php
2.97 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
adminProcess
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
assets
-
02/15/2025 11:20:33 AM
rwxr-xr-x
đ
backup
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
editData.php
16.75 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
editQuestion.php
8.03 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
editQuiz.php
8.3 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
footer.php
1.86 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
forms
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
go_back.php
2.96 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
index.php
12.68 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
login.php
4.34 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
nav_scripts.php
1.96 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
navbar.php
2.41 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
navbar_login.php
2.34 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
payment.php
12.06 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
quiz.php
20.67 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
quizControl.php
8.4 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
quizQuestions.php
8.85 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
quizSubmitPage.php
39 bytes
05/19/2025 10:07:16 AM
rw-r--r--
đ
register.php
21.65 KB
05/19/2025 10:07:16 AM
rw-r--r--
đ
test
-
02/15/2025 11:20:34 AM
rwxr-xr-x
đ
test1
-
05/19/2025 10:07:16 AM
rwxr-xr-x
đ
yt_subscription
-
05/19/2025 10:07:16 AM
rwxr-xr-x
Editing: editData.php
Close
<?php // Assuming you have a connection to your database and the user ID or other identifier to fetch the data. include('assets/php/db_config.php'); include('assets/php/validate.logged.php'); function editCandidate() { global $gUserId, $conn; $query = "SELECT * FROM candidate WHERE id = ?"; $stmt = $conn->prepare($query); $stmt->bind_param("i", $gUserId); $stmt->execute(); $result = $stmt->get_result(); $user_data = $result->fetch_assoc(); ?> <form id="candidateRegistrationForm"> <h5>Academic Details</h5> <div class="row"> <div class="col-md-6 mb-3"> <label for="fullName" class="form-label">Full Name</label> <input type="text" class="form-control" placeholder="Enter the Candidate's Full Name" name="fullName" value="<?= $user_data['fullName']; ?>" required> </div> </div> <div class="row"> <div class="col-md-6 mb-3"> <label for="dob" class="form-label">Date of Birth</label> <input type="date" class="form-control" id="dob" name="dob" value="<?= $user_data['dob']; ?>" required> </div> <div class="col-md-6 mb-3"> <label for="gender" class="form-label">Gender</label> <select class="form-control" id="gender" name="gender" required> <option value="M" <?= ($user_data['gender'] == 'M') ? 'selected' : ''; ?>>Male</option> <option value="F" <?= ($user_data['gender'] == 'F') ? 'selected' : ''; ?>>Female</option> <option value="O" <?= ($user_data['gender'] == 'O') ? 'selected' : ''; ?>>Other</option> </select> </div> </div> <div class="row"> <div class="col-md-6 mb-3"> <label for="email" class="form-label">Candidate's Email</label> <input type="email" class="form-control" placeholder="Enter candidate's Email" name="email" value="<?= $user_data['email']; ?>" disabled> </div> <div class="col-md-6 mb-3"> <label for="mobile" class="form-label">Mobile Number</label> <div class="input-group"> <span class="input-group-text" id="basic-addon1">+91</span> <input type="tel" class="form-control" placeholder="Enter candidate's/ Parent's Mobile Number" name="mobile" value="<?= $user_data['mobile']; ?>" required pattern="^[0-9]{10}$" maxlength="10" disabled /> </div> </div> </div> <div class="mb-3"> <label for="address" class="form-label">Residential Address</label> <textarea class="form-control" placeholder="Enter the Residential Address" name="address" required><?= $user_data['address']; ?></textarea> </div> <div class="row"> <div class="col-md-6 mb-3"> <label for="city" class="form-label">City</label> <input type="text" class="form-control" placeholder="City" name="city" value="<?= $user_data['city']; ?>" required> </div> <div class="col-md-6 mb-3"> <label for="state" class="form-label">State/UT</label> <select class="form-control" id="state" name="state" required> <option value="Andhra Pradesh" <?= ($user_data['state'] == 'Andhra Pradesh') ? 'selected' : ''; ?>>Andhra Pradesh</option> <option value="Arunachal Pradesh" <?= ($user_data['state'] == 'Arunachal Pradesh') ? 'selected' : ''; ?>>Arunachal Pradesh</option> <option value="Assam" <?= ($user_data['state'] == 'Assam') ? 'selected' : ''; ?>>Assam</option> <option value="Bihar" <?= ($user_data['state'] == 'Bihar') ? 'selected' : ''; ?>>Bihar</option> <option value="Chhattisgarh" <?= ($user_data['state'] == 'Chhattisgarh') ? 'selected' : ''; ?>>Chhattisgarh</option> <option value="Goa" <?= ($user_data['state'] == 'Goa') ? 'selected' : ''; ?>>Goa</option> <option value="Gujarat" <?= ($user_data['state'] == 'Gujarat') ? 'selected' : ''; ?>>Gujarat</option> <option value="Haryana" <?= ($user_data['state'] == 'Haryana') ? 'selected' : ''; ?>>Haryana</option> <option value="Himachal Pradesh" <?= ($user_data['state'] == 'Himachal Pradesh') ? 'selected' : ''; ?>>Himachal Pradesh</option> <option value="Jharkhand" <?= ($user_data['state'] == 'Jharkhand') ? 'selected' : ''; ?>>Jharkhand</option> <option value="Karnataka" <?= ($user_data['state'] == 'Karnataka') ? 'selected' : ''; ?>>Karnataka</option> <!-- Default selected option --> <option value="Kerala" <?= ($user_data['state'] == 'Kerala') ? 'selected' : ''; ?>>Kerala</option> <option value="Madhya Pradesh" <?= ($user_data['state'] == 'Madhya Pradesh') ? 'selected' : ''; ?>>Madhya Pradesh</option> <option value="Maharashtra" <?= ($user_data['state'] == 'Maharashtra') ? 'selected' : ''; ?>>Maharashtra</option> <option value="Manipur" <?= ($user_data['state'] == 'Manipur') ? 'selected' : ''; ?>>Manipur</option> <option value="Meghalaya" <?= ($user_data['state'] == 'Meghalaya') ? 'selected' : ''; ?>>Meghalaya</option> <option value="Mizoram" <?= ($user_data['state'] == 'Mizoram') ? 'selected' : ''; ?>>Mizoram</option> <option value="Nagaland" <?= ($user_data['state'] == 'Nagaland') ? 'selected' : ''; ?>>Nagaland</option> <option value="Odisha" <?= ($user_data['state'] == 'Odisha') ? 'selected' : ''; ?>>Odisha</option> <option value="Punjab" <?= ($user_data['state'] == 'Punjab') ? 'selected' : ''; ?>>Punjab</option> <option value="Rajasthan" <?= ($user_data['state'] == 'Rajasthan') ? 'selected' : ''; ?>>Rajasthan</option> <option value="Sikkim" <?= ($user_data['state'] == 'Sikkim') ? 'selected' : ''; ?>>Sikkim</option> <option value="Tamil Nadu" <?= ($user_data['state'] == 'Tamil Nadu') ? 'selected' : ''; ?>>Tamil Nadu</option> <option value="Telangana" <?= ($user_data['state'] == 'Telangana') ? 'selected' : ''; ?>>Telangana</option> <option value="Tripura" <?= ($user_data['state'] == 'Tripura') ? 'selected' : ''; ?>>Tripura</option> <option value="Uttar Pradesh" <?= ($user_data['state'] == 'Uttar Pradesh') ? 'selected' : ''; ?>>Uttar Pradesh</option> <option value="Uttarakhand" <?= ($user_data['state'] == 'Uttarakhand') ? 'selected' : ''; ?>>Uttarakhand</option> <option value="West Bengal" <?= ($user_data['state'] == 'West Bengal') ? 'selected' : ''; ?>>West Bengal</option> <option value="Andaman and Nicobar Islands" <?= ($user_data['state'] == 'Andaman and Nicobar Islands') ? 'selected' : ''; ?>>Andaman and Nicobar Islands</option> <option value="Chandigarh" <?= ($user_data['state'] == 'Chandigarh') ? 'selected' : ''; ?>>Chandigarh</option> <option value="Dadra and Nagar Haveli and Daman and Diu" <?= ($user_data['state'] == 'Dadra and Nagar Haveli and Daman and Diu') ? 'selected' : ''; ?>>Dadra and Nagar Haveli and Daman and Diu</option> <option value="Lakshadweep" <?= ($user_data['state'] == 'Lakshadweep') ? 'selected' : ''; ?>>Lakshadweep</option> <option value="Delhi" <?= ($user_data['state'] == 'Delhi') ? 'selected' : ''; ?>>Delhi</option> <option value="Puducherry" <?= ($user_data['state'] == 'Puducherry') ? 'selected' : ''; ?>>Puducherry</option> <option value="Ladakh" <?= ($user_data['state'] == 'Ladakh') ? 'selected' : ''; ?>>Ladakh</option> </select> </div> </div> <div class="row"> <div class="col-md-6 mb-3"> <label for="pinCode" class="form-label">Pin Code</label> <input type="number" class="form-control" placeholder="Pincode" name="pinCode" value="<?= $user_data['pincode']; ?>" required oninput="validatePinCode(this)"> </div> </div> <button id="updateDetails" type="button" class="btn btn-success">Update Details</button> </form> <? // Close the database connection $stmt->close(); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Parent Registration</title> <link href="assets/img/favicon.png" rel="icon" /> <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon" /> <!-- Fonts --> <link href="https://fonts.googleapis.com" rel="preconnect" /> <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin /> <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet" /> <!-- Vendor CSS Files --> <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" /> <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet" /> <link href="assets/vendor/aos/aos.css" rel="stylesheet" /> <link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet" /> <link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet" /> <!-- Main CSS File --> <link href="assets/css/main.css" rel="stylesheet" /> <link rel="stylesheet" href="assets/css/styles.css"> <!-- Bootstrap JS and Popper.js --> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.min.js"></script> <!-- jQuery (required for some Bootstrap components like modals, etc.) --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- Additional Vendor JS Files --> <script src="assets/vendor/php-email-form/validate.js"></script> <script src="assets/vendor/aos/aos.js"></script> <script src="assets/vendor/glightbox/js/glightbox.min.js"></script> <script src="assets/vendor/purecounter/purecounter_vanilla.js"></script> <script src="assets/vendor/swiper/swiper-bundle.min.js"></script> <style> #candidateRegistrationForm{ margin: 10px; } </style> <script> // Submit the form using AJAX function submitForm() { $('#candidateRegistrationForm').on('submit', function(e) { e.preventDefault(); // Prevent the default form submission var formData = $(this).serialize(); // Serialize the form data $.ajax({ url: 'assets/php/updateCandidateForm.php', // PHP script to process the form data type: 'POST', data: formData, // Send the serialized form data success: function(response) { try { // Check if the response contains a success flag if (response.success) { alert('Updated Successfully'); // Handle any post-registration actions, like redirecting or displaying a message window.location.href = "dashboard.php"; // You can customize the redirect } else { alert('Invalid OTP'); } } catch (error) { alert('Error: Response is not in valid JSON format'); } }, error: function(xhr, status, error) { alert('An error occurred during form submission. Please try again.'); } }); }); // Trigger the form submission event (this is where the AJAX happens) $('#candidateRegistrationForm').submit(); } function validatePinCode(input) { var pinValue = input.value; // Remove non-digit characters and limit to 6 digits pinValue = pinValue.replace(/\D/g, '').slice(0, 6); input.value = pinValue; // Set the trimmed value back to the field } // Function to calculate age from DOB function calculateAge(dob) { const birthDate = new Date(dob); const today = new Date(); let age = today.getFullYear() - birthDate.getFullYear(); const m = today.getMonth() - birthDate.getMonth(); // Adjust age if birthday hasn't occurred yet this year if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { age--; } console.log(age); return age; } // Function to update the category options function updateCategoryOptions(age) { // Enable/Disable options based on the age $('#category option').prop('disabled', false); // Reset all options to enabled if (age < 12) { $('#category option[value="U12"]').prop('disabled', false); $('#category option[value="U18"]').prop('disabled', false); $('#category option[value="GEN"]').prop('disabled', false); } else if (age < 18) { $('#category option[value="U12"]').prop('disabled', true); $('#category option[value="U18"]').prop('disabled', false); $('#category option[value="GEN"]').prop('disabled', false); } else { $('#category option[value="U12"]').prop('disabled', true); $('#category option[value="U18"]').prop('disabled', true); $('#category option[value="GEN"]').prop('disabled', false); } } $(document).ready(function() { // Event listener for the DOB input field to update category $('#dob').on('change', function() { const dobValue = $(this).val(); if (dobValue) { const age = calculateAge(dobValue); // Set category based on age if (age < 12) { $('#category').val('U12'); } else if (age < 18) { $('#category').val('U18'); } else { $('#category').val('GEN'); } // Update the category options based on the calculated age updateCategoryOptions(age); } else { // Reset the category if no DOB is selected $('#category').val(''); $('#category option').prop('disabled', false); } }); $('#updateDetails').on('click', function() { submitForm(); }); }); </script> </head> <body> <header id="header" class="header d-flex align-items-center sticky-top"> <div class="container-fluid container-xl position-relative d-flex align-items-center"> <a href="index.php" class="logo d-flex align-items-center me-auto"> <img src="assets/img/logo_new.png" alt="" width="173" height="97" /></a> <nav id="navmenu" class="navmenu"> <ul> <li> <a href="index.php">Home<br /></a> </li> <li><a href="about_quiz.php">About</a></li> <li><a href="contact.php">Contact</a></li> <li><a href="dashboard.php">Dashboard</a></li> </ul> <i class="mobile-nav-toggle d-xl-none bi bi-list"></i> </nav> </div> </header> <button onclick="window.location.href='dashboard.php'" style="border-radius: 10px;">Back</button> <h1 class="text-center">Quiz ā˛Ļā˛ŋā˛ā˛ā˛¤</h1> <h2 class="text-center">Candidate Registration</h2> <br><br> <? editCandidate() ?> </body> <script src="assets/js/main.js"></script> </html>