Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/mastercleanindia.co.in/public_html/admin/
Dosya Yükle :
Current File : /home/u866425823/domains/mastercleanindia.co.in/public_html/admin/contact.php

<?php
session_start();
require 'include/PHPHelper.php';
if (!isset($_SESSION['userID'])) {
    header("location: login.php");
    exit;
}

?>

<!DOCTYPE html>
<html lang="en">
<?php
$title = "Contact Request || Master Clean India";
include 'include/head.php';


?>

<body>

    <!-- ======= Header ======= -->
    <?php
    include 'include/header.php';
    ?>
    <!-- End Header -->

    <!-- ======= Sidebar ======= -->
    <?php
    include 'include/sidebar.php';
    ?>
    <!-- End Sidebar-->

    <main id="main" class="main">

        <div class="pagetitle">
            <h1>Contact Requests</h1>
            <nav>
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="index.php">Dashboard</a></li>
                    <li class="breadcrumb-item active">Contact</li>
                </ol>
            </nav>
        </div><!-- End Page Title -->

        <section class="section">
            <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-body">
                            <h5 class="card-title">Contact Request</h5>
                            <div class="dataTable-wrapper dataTable-loading no-footer sortable searchable fixed-columns">
                                <div class="dataTable-container">
                                    <table class="table datatable dataTable-table">
                                        <thead>
                                            <tr>
                                                <th scope="col" data-sortable="" style="width: 5%;"><a href="#" class="dataTable-sorter">ID</a></th>
                                                <th scope="col" data-sortable="" style="width: 20%;"><a href="#" class="dataTable-sorter">Name</a></th>
                                                <th scope="col" data-sortable="" style="width: 25%;"><a href="#" class="dataTable-sorter">Email</a></th>
                                                <th scope="col" data-sortable="" style="width: 25%;"><a href="#" class="dataTable-sorter">Subject</a></th>
                                                <th scope="col" data-sortable="" style="width: 25%;"><a href="#" class="dataTable-sorter">Action</a></th>

                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php
                                            $sql = "SELECT * FROM `contactrequest`";
                                            $result = mysqli_query($conn, $sql);
                                            if (mysqli_num_rows($result) > 0) {
                                                while ($row = mysqli_fetch_assoc($result)) {
                                                    echo "
                                                        <tr>
                                                            <td>$row[id]</td>
                                                            <td>$row[name]</td>
                                                            <td>$row[email]</td>
                                                            <td>$row[subject]</td>
                                                            <td>
                                                                <button class='viewButton btn btn-primary ' data-bs-toggle='modal' data-bs-target='#contactRequestModal' 
                                                                        data-name='$row[name]'
                                                                        data-email='$row[email]'
                                                                        data-subject='$row[subject]'
                                                                        data-message='$row[message]'  
                                                                    >View</button>
                                                                <button class='deleteButton btn btn-danger '
                                                                        data-table='contactrequest'
                                                                        data-id='$row[id]'>Delete</button>
                                                            </td>
                                                        </tr>";
                                                }
                                            } else {
                                                echo "
                                                    <tr>
                                                        <td colspan='5'>
                                                        You are all caught up. No contact request found.
                                                    </td>
                                                </tr>";
                                            }
                                            ?>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal fade" id="contactRequestModal" tabindex="-1" role="dialog" data-bs-toggle="modal" aria-labelledby="exampleModalLabel" aria-hidden="true">
                <div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="exampleModalLabel">Contact Request Details</h5>
                            <button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
                        </div>
                        <div class="modal-body">
                            <!-- Display contact request details here -->
                            <p><strong>Name:</strong> <span id="contactName"></span></p>
                            <p><strong>Email:</strong> <span id="contactEmail"></span></p>
                            <p><strong>Subject:</strong> <span id="contactSubject"></span></p>
                            <p><strong>Message:</strong> <span id="contactMessage"></span></p>
                        </div>
                        <div class="modal-footer">
                            <a id="replyButton" href="#" class="btn btn-primary">Reply</a>
                            <a id="callButton" href="#" class="btn btn-primary">Call</a>
                        </div>
                    </div>
                </div>
            </div>
        </section>

    </main><!-- End #main -->


    <!-- ======= Footer ======= -->
    <?php
    include 'include/footer.php';
    ?>


</body>

</html>

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.