X7ROOT File Manager
Current Path:
/home/u126090504/domains/oceanicabeachresort.com/public_html/admin
home
/
u126090504
/
domains
/
oceanicabeachresort.com
/
public_html
/
admin
/
📁
..
📁
assets
📄
banners.php
(9.78 KB)
📄
booking-dashboard.php
(4.93 KB)
📄
booking_status_update.php
(6.14 KB)
📄
booking_view.php
(4.04 KB)
📄
branding_settings.php
(5.93 KB)
📄
change_password.php
(3.01 KB)
📄
contacts.php
(3.83 KB)
📄
dashboard.php
(5.64 KB)
📁
dompdf
📄
downloads.php
(4.91 KB)
📄
forgot_password.php
(5.76 KB)
📄
gallery.php
(3.08 KB)
📁
img
📁
includes
📄
index.php
(82 B)
📁
invoices
📄
login.php
(13.47 KB)
📄
logo.png
(19.29 KB)
📄
logout.php
(102 B)
📄
manage_albums.php
(10.82 KB)
📄
manage_media.php
(11.77 KB)
📄
manage_photos.php
(6.35 KB)
📄
manage_videos.php
(18.38 KB)
📄
new_password.php
(3.9 KB)
📄
notice.php
(15.52 KB)
📄
notice_error.log
(38.45 KB)
📄
notices.php
(8.24 KB)
📄
payments.php
(14.96 KB)
📄
pdf_bill_template.php
(30.69 KB)
📁
phpmailer
📄
popup.php
(14.07 KB)
📄
reset_password.php
(2.27 KB)
📄
secure_session.php
(1000 B)
📄
settings.php
(8.34 KB)
📄
test.php
(239 B)
📄
test_pdf.php
(1.58 KB)
📄
testimonials.php
(15.15 KB)
📁
tmp
📄
update_status.php
(1.66 KB)
📄
upi_settings.php
(1.52 KB)
Editing: contacts.php
<?php include 'secure_session.php'; // 🔐 Always first (session security) include 'includes/auth.php'; // ✅ Your authentication check require_once '../config.php'; // ✅ DB connection include 'includes/header.php'; // ✅ Layout header $allowedTypes = ['jpg','jpeg','png']; $maxSize = 5 * 1024 * 1024; // 5MB $success = $error = ""; // CSRF Token if (empty($_SESSION['csrf'])) { $_SESSION['csrf'] = bin2hex(random_bytes(32)); } // Delete contact if (isset($_GET['delete'])) { $id = intval($_GET['delete']); $stmt = $conn->prepare("DELETE FROM contacttab WHERE id=?"); $stmt->bind_param("i", $id); $stmt->execute(); echo "<div class='alert alert-warning'>❌ Contact deleted successfully.</div>"; } ?> <div class="container py-4"> <h3><i class="fas fa-envelope"></i> Contact Messages</h3> <hr> <table class="table table-bordered table-striped table-responsive-sm"> <thead class="thead-dark"> <tr> <th>ID</th> <th>Name</th> <th>Email</th> <th>Subject</th> <th>Phone</th> <th>Submitted At</th> <th>Action</th> </tr> </thead> <tbody> <?php $res = $conn->query("SELECT * FROM contacttab ORDER BY id DESC"); if ($res->num_rows > 0) { while ($row = $res->fetch_assoc()) { $id = $row['id']; ?> <tr> <td><?php echo (int)$id; ?></td> <td><?php echo htmlspecialchars($row['coname']); ?></td> <td><?php echo htmlspecialchars($row['coemail']); ?></td> <td><?php echo htmlspecialchars($row['cosub']); ?></td> <td><?php echo htmlspecialchars($row['cophone']); ?></td> <td><?php echo htmlspecialchars($row['created_at'] ?? ''); ?></td> <td> <!-- View Button --> <button class="btn btn-info btn-sm" data-toggle="modal" data-target="#viewModal<?php echo $id; ?>">View</button> <!-- Delete Button --> <a href="?delete=<?php echo $id; ?>" class="btn btn-danger btn-sm" onclick="return confirm('Delete this contact?')">Delete</a> </td> </tr> <!-- Modal for viewing message --> <div class="modal fade" id="viewModal<?php echo $id; ?>" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header bg-primary text-white"> <h5 class="modal-title">Message from <?php echo htmlspecialchars($row['coname']); ?></h5> <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <p><strong>Email:</strong> <?php echo htmlspecialchars($row['coemail']); ?></p> <p><strong>Subject:</strong> <?php echo htmlspecialchars($row['cosub']); ?></p> <p><strong>Phone:</strong> <?php echo htmlspecialchars($row['cophone']); ?></p> <hr> <p><strong>Message:</strong></p> <p><?php echo nl2br(htmlspecialchars($row['comes'])); ?></p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <?php } } else { echo "<tr><td colspan='7' class='text-center'>No contacts found</td></tr>"; } ?> </tbody> </table> </div> <?php include 'includes/footer.php'; ?>
Upload File
Create Folder