Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /home/dnlcambodia/www/dnl_dashboard/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/dnlcambodia/www/dnl_dashboard/table.php
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="content-type" content="text/html; charset=us-ascii">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="apple-touch-icon" sizes="76x76" href="./assets/img/apple-icon.png">
    <link rel="icon" type="image/png" href="./assets/img/favicon.png">
    <title>DNL-Admin</title>
    <link rel="canonical" href="https://www.creative-tim.com/product/material-dashboard">
    <meta name="keywords" content="creative tim, html dashboard, html css dashboard, web dashboard, bootstrap 5 dashboard, bootstrap 5, css3 dashboard, bootstrap 5 admin, Material Dashboard bootstrap 5 dashboard, frontend, responsive bootstrap 5 dashboard, free dashboard, free admin dashboard, free bootstrap 5 admin dashboard">
    <meta name="description" content="Material Dashboard 2 is a beautiful Bootstrap 5 admin dashboard with a large number of components, designed to look beautiful and organized. If you are looking for a tool to manage and visualize data about your business, this dashboard is the thing for you.">
    <meta name="twitter:site" content="@creativetim">
    <meta name="twitter:title" content="DNL-Admin">
    <meta name="twitter:description" content="Material Dashboard 2 is a beautiful Bootstrap 5 admin dashboard with a large number of components, designed to look beautiful and organized. If you are looking for a tool to manage and visualize data about your business, this dashboard is the thing for you.">
    <meta name="twitter:creator" content="@creativetim">
    <meta name="twitter:image" content="./../../s3.amazonaws.com/creativetim_bucket/products/450/original/material-dashboard.jpg">
    <meta property="fb:app_id" content="655968634437471">
    <meta property="og:title" content="DNL-Admin">
    <meta property="og:type" content="article">
    <meta property="og:url" content="dashboard-2.html">
    <meta property="og:image" content="./../../s3.amazonaws.com/creativetim_bucket/products/450/original/material-dashboard.jpg">
    <meta property="og:description" content="Material Dashboard 2 is a beautiful Bootstrap 5 admin dashboard with a large number of components, designed to look beautiful and organized. If you are looking for a tool to manage and visualize data about your business, this dashboard is the thing for you.">
    <meta property="og:site_name" content="Creative Tim">
    <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900|Roboto+Slab:400,700">
    <link href="./assets/css/nucleo-icons.css" rel="stylesheet">
    <link href="./assets/css/nucleo-svg.css" rel="stylesheet">
    <script src="./../../kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Round" rel="stylesheet">
    <link id="pagestyle" href="./assets/css/material-dashboard.mine63c.css?v=3.1.0" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <link rel="stylesheet" href="./Css/style.css">
    <style>
        .async-hide {
            opacity: 0 !important
        }
    </style>
    <script>
        (function(i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r;
            i[r] = i[r] || function() {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date();
            a = s.createElement(o),
                m = s.getElementsByTagName(o)[0];
            a.async = 1;
            a.src = g;
            m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '../../../www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-46172202-22', 'auto', {
            allowLinker: true
        });
        ga('set', 'anonymizeIp', true);
        ga('require', 'GTM-K9BGS8K');
        ga('require', 'displayfeatures');
        ga('require', 'linker');
        ga('linker:autoLink', ["2checkout.com", "avangate.com"]);
    </script>
    <script>
        (function(w, d, s, l, i) {
            w[l] = w[l] || [];
            w[l].push({
                'gtm.start': new Date().getTime(),
                event: 'gtm.js'
            });
            var f = d.getElementsByTagName(s)[0],
                j = d.createElement(s),
                dl = l != 'dataLayer' ? '&l=' + l : '';
            j.async = true;
            j.src =
                '../../../www.googletagmanager.com/gtm5445.html?id=' + i + dl;
            f.parentNode.insertBefore(j, f);
        })(window, document, 'script', 'dataLayer', 'GTM-NKDMSK6');
    </script>
    <script defer data-site="demos.creative-tim.com" src="../../../api.nepcha.com/js/nepcha-analytics.js"></script>
    <style>
        /* Apply styles to the entire table */
        table.table {
            font-size: 14px;
            color: black;
            width: 100%;
            border-collapse: collapse;
        }

        /* Apply styles to table header cells */
        table.table th {
            text-align: left;
            padding: 8px;
            background-color: #f2f2f2;
            /* Light gray background color */
        }

        /* Apply styles to table data cells */
        table.table td {
            border: 1px solid #dddddd;
            text-align: left;
            padding: 8px;
        }

        /* Style alternating rows for better readability */
        table.table tr:nth-child(even) {
            background-color: #f9f9f9;
            /* Lighter gray background color for even rows */
        }

        /* Style links within the last column */
        table.table td:last-child a {
            margin-right: 5px;

            text-decoration: none;
        }

        /* Style links within the last column on hover */
        table.table td:last-child a:hover {
            text-decoration: underline;
        }

        table.table th {
            font-size: 12px;
            text-align: left;
            padding: 8px;
            background-color: #2a9c2f;
            /* Light gray background color */
        }

        .text-sm {
            font-size: small;
        }

        /* Style for the contact and send message links */
        a.contact,
        a.send-message {
            display: inline-block;
            padding: 5px 10px;
            margin-right: 5px;
            text-decoration: none;
            /* Change to your desired background color */
            color: #fff;
            /* Change to your desired text color */
            text-decoration: none;
            border-radius: 5px;
        }

        a.send-message {
            background-color: #f40419;

        }

        a.contact {
            background-color: #065ef2;
        }

        /* Hover effect for the links */
        a.contact:hover {
            background-color: #0056b3;
            text-decoration: none;
            color: #fff;
            /* Change to your desired text color */
        }

        a.send-message:hover {
            background-color: #e94040;
            text-decoration: none;
            color: #fff;
            /* Change to your desired text color */
        }

        .post-table-container {
            max-height: 730px;
            /* Set the desired height */
            overflow-y: scroll;
        }

        .post-table thead {
            position: sticky;
            top: 0;
            background-color: #fff;
            /* Set your background color */
            z-index: 100;
        }

        .date-filter-container {
            display: flex;
            align-items: center;
            margin: 10px 0;
        }

        .date-filter-container div {
            display: flex;
            align-items: center;
            margin-right: 10px;
        }

        .date-filter-container label {
            margin-right: 5px;

        }

        .date-filter-container input[type="date"],
        .date-filter-container select {
            padding: 5px;

            border: 1px solid #ccc;
            border-radius: 4px;
            outline: none;
        }

        .date-filter-container button {
            padding: 7px;
            font-size: 12px;
            border: 1px solid #ccc;
            background-color: #15b406;
            color: white;
            cursor: pointer;
            border-radius: 4px;
        }

        .date-filter-container button:hover {
            background-color: #0f8c04;
        }
    </style>
</head>

<body class="g-sidenav-show bg-gray-200">
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NKDMSK6" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <aside class="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3 bg-gradient-dark" id="sidenav-main">
        <div class="sidenav-header" style="margin-left:40px;">
            <i class="fas fa-times p-3 cursor-pointer text-white opacity-5 position-absolute end-0 top-0 d-none d-xl-none" aria-hidden="true" id="iconSidenav"></i><a class="navbar-brand m-0" href="home.php" target="_blank"><img src="./assets/DNL-01.png" alt="main_logo"></a>
        </div>
        <hr class="horizontal light mt-0 mb-2">
        <div class="collapse navbar-collapse w-auto" id="sidenav-collapse-main">
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link text-white " href="home.php">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">dashboard</i>
                        </div><span class="nav-link-text ms-1">Dashboard</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="./Service/upload_service.php">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">table_view</i>
                        </div><span class="nav-link-text ms-1">Service</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="./PHP/createPost.php">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">receipt_long</i>
                        </div><span class="nav-link-text ms-1">Blog Post</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link active bg-gradient-primary text-white" href="table.php">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">view_in_ar</i>
                        </div><span class="nav-link-text ms-1">Quotations</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="./Project/upload_project.php">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">format_textdirection_r_to_l</i>
                        </div><span class="nav-link-text ms-1">Project</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="./Feature/function.php">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">notifications</i>
                        </div><span class="nav-link-text ms-1">Feature</span>
                    </a>
                </li>
                <li class="nav-item mt-3">
                    <h6 class="ps-4 ms-2 text-uppercase text-xs text-white font-weight-bolder opacity-8">Account pages</h6>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="profile.html">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">person</i>
                        </div><span class="nav-link-text ms-1">Profile</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="sign-in.html">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">login</i>
                        </div><span class="nav-link-text ms-1">Sign In</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link text-white" href="sign-up.html">
                        <div class="text-white text-center me-2 d-flex align-items-center justify-content-center">
                            <i class="material-icons opacity-10">assignment</i>
                        </div><span class="nav-link-text ms-1">Sign Up</span>
                    </a>
                </li>
            </ul>
        </div>

    </aside>
    <main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg">
        <nav class="navbar navbar-main navbar-expand-lg px-0 mx-4 shadow-none border-radius-xl" id="navbarBlur" data-scroll="true">
            <div class="container-fluid py-1 px-3">

                <div class="collapse navbar-collapse mt-sm-0 mt-2 me-md-0 me-sm-4" id="navbar">
                    <div class="ms-md-auto pe-md-3 d-flex align-items-center">
                        <div class="input-group input-group-outline">
                            <label class="form-label">Type here...</label> <input type="text" class="form-control">
                        </div>
                    </div>

                </div>
            </div>
        </nav>
        <div class="container1">
            <div class="header">
                <h2>Quote requests</h2>
                <div class="buttons">
                    <form method="GET" action="./Export/Export.php" style="display:inline;">
                        <input type="hidden" name="bulk_action" value="export">
                        <input type="hidden" name="date_filter" value="<?php echo $_GET['date_filter'] ?? ''; ?>">
                        <input type="hidden" name="status_filter" value="<?php echo $_GET['status_filter'] ?? ''; ?>">
                        <input type="hidden" name="customer_filter" value="<?php echo $_GET['customer_filter'] ?? ''; ?>">
                        <div class="date-filter-container">
                            <div class="date-filter-group">
                                <label for="start_date">From Date:</label>
                                <input type="date" id="start_date" name="start_date" placeholder="Start Date">
                            </div>
                            <div class="date-filter-group">
                                <label for="end_date">To Date:</label>
                                <input type="date" id="end_date" name="end_date" placeholder="End Date">
                            </div>
                            <div>
                                <select name="export_status_filter">
                                    <option value="">All status</option>
                                    <option value="New Quote Request">Pending</option>
                                    <option value="Accepted Quote">Approved</option>
                                    <option value="Rejected Quote">Rejected</option>
                                </select>
                            </div>
                            <button type="submit" class="export" style="background-color:#15b406;"><i class="fas fa-file-export"></i> Export</button>
                        </div>
                    </form>
                </div>
            </div>
            <div class="filters">
                <form method="GET" action="">
                    <select name="date_filter">
                        <option value="">All dates</option>
                        <option value="today">Today</option>
                        <option value="this_week">This Week</option>
                        <option value="this_month">This Month</option>
                    </select>
                    <select name="status_filter">
                        <option value="">All status</option>
                        <option value="New Quote Request">New Quote</option>
                        <option value="Accepted Quote">Approved</option>
                        <option value="Rejected Quote">Rejected</option>
                    </select>

                    <input type="text" name="customer_filter" placeholder="Filter by registered customer">
                    <button type="submit" name="apply_filters">Search</button>

                </form>
            </div>

            <table class="quote-table">
                <thead>
                    <tr>
                        <th class="text-uppercase font-weight-bolder">No.</th>
                        <th class="text-uppercase font-weight-bolder">Name</th>
                        <th class="text-uppercase font-weight-bolder">Email</th>
                        <th class="text-uppercase font-weight-bolder">Company</th>
                        <th class="text-uppercase font-weight-bolder">Phone</th>
                        <th class="text-uppercase font-weight-bolder">City</th>
                        <th class="text-uppercase font-weight-bolder">Country</th>
                        <th class="text-uppercase font-weight-bolder">Type of goods</th>
                        <th class="text-uppercase font-weight-bolder">Quantity</th>
                        <th class="text-uppercase font-weight-bolder">Shipping Date</th>
                        <th class="text-uppercase font-weight-bolder">Delivery Date</th>
                        <th class="text-uppercase font-weight-bolder">Status</th>
                        <th class="text-uppercase font-weight-bolder">Detail</th>
                        <th class="text-uppercase font-weight-bolder">Action</th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    include './PHP/config/db_conn.php';

                    // Initialize the SQL query
                    $sql = "SELECT * FROM quotation WHERE 1=1";

                    // Apply filters
                    if (!empty($_GET['date_filter'])) {
                        $date_filter = $_GET['date_filter'];
                        if ($date_filter == 'today') {
                            $sql .= " AND DATE(shipping_date) = CURDATE()";
                        } elseif ($date_filter == 'this_week') {
                            $sql .= " AND WEEK(shipping_date) = WEEK(CURDATE())";
                        } elseif ($date_filter == 'this_month') {
                            $sql .= " AND MONTH(shipping_date) = MONTH(CURDATE())";
                        }
                    }

                    if (!empty($_GET['status_filter'])) {
                        $status_filter = $_GET['status_filter'];
                        $sql .= " AND status = '$status_filter'";
                    }

                    if (!empty($_GET['customer_filter'])) {
                        $customer_filter = $_GET['customer_filter'];
                        $sql .= " AND name LIKE '%$customer_filter%'";
                    }

                    $result = $conn->query($sql);

                    // Check if there are rows in the result
                    if ($result->num_rows > 0) {
                        // Output data of each row
                        while ($row = $result->fetch_assoc()) {
                            echo "<tr>";
                            echo "<td>" . $row["id"] . "</td>";
                            echo "<td>" . $row["name"] . "</td>";
                            echo "<td>" . $row["email"] . "</td>";
                            echo "<td>" . $row["company"] . "</td>";
                            echo "<td>" . $row["phone"] . "</td>";
                            echo "<td>" . $row["city"] . "</td>";
                            echo "<td>" . $row["country"] . "</td>";
                            echo "<td>" . $row["type_of_goods"] . "</td>";
                            echo "<td>" . $row["quantity"] . "</td>";
                            echo "<td>" . $row["shipping_date"] . "</td>";
                            echo "<td>" . $row["delivery_date"] . "</td>";
                            echo "<td><span class='status " . strtolower(str_replace(' ', '-', $row["status"])) . "'>" . $row["status"] . "</span></td>";
                            echo "<td>" . $row["details"] . "</td>";
                            echo "<td><a class='contact' href='approve.php?id=" . $row["id"] . "'>Approve</a> | <a class='send-message' href='reject.php?id=" . $row["id"] . "'>Reject</a></td>";
                            echo "</tr>";
                        }
                    } else {
                        echo "<tr><td colspan='14'>No results found</td></tr>";
                    }

                    // Close the database connection
                    $conn->close();
                    ?>
                </tbody>
            </table>
            <script>
                document.addEventListener("DOMContentLoaded", function() {
                    var tableBody = document.querySelector(".post-table-container tbody");

                    // Determine the number of rows to display (16 posts in this case)


                    // Loop to create table rows with dynamic serial numbers
                    for (var i = 0; i < numRows; i++) {
                        var row = document.createElement("tr");
                        var serialNumberCell = document.createElement("td");
                        serialNumberCell.textContent = i + 1; // Serial number starts from 1
                        row.appendChild(serialNumberCell);
                        // Add other cells based on your data
                        // For example: row.appendChild(createCell(data[i].id));
                        tableBody.appendChild(row);
                    }
                });
            </script>
        </div>
        <footer class="footer py-4">
            <div class="container-fluid">
                <div class="row align-items-center justify-content-lg-between">
                    <div class="col-lg-6">
                        <a href="https://www.creative-tim.com/license" class="nav-link pe-0 text-muted" target="_blank">Version 3.0</a>
                    </div>
                </div>
            </div>
        </footer>
        </div>
    </main>
    <div class="fixed-plugin">
        <a class="fixed-plugin-button text-dark position-fixed px-3 py-2"><i class="material-icons py-2">settings</i></a>
        <div class="card shadow-lg">
            <div class="card-header pb-0 pt-3">
                <div class="float-start">
                    <h5 class="mt-3 mb-0">Dashboard Option</h5>
                    <p>See our dashboard options.</p>
                </div>
                <div class="float-end mt-4">
                    <button class="btn btn-link text-dark p-0 fixed-plugin-close-button"><i class="material-icons">clear</i></button>
                </div>
            </div>
            <hr class="horizontal dark my-1">
            <div class="card-body pt-sm-3 pt-0">
                <div>
                    <h6 class="mb-0">Sidebar Colors</h6>
                </div><a href="javascript:void(0)" class="switch-trigger background-color">
                    <div class="badge-colors my-2 text-start"></div>
                </a>
                <div class="mt-3">
                    <h6 class="mb-0">Sidenav Type</h6>
                    <p class="text-sm">Choose between 2 different sidenav types.</p>
                </div>
                <div class="d-flex">
                    <button class="btn bg-gradient-dark px-3 mb-2 active" data-class="bg-gradient-dark" onclick="sidebarType(this)">Dark</button> <button class="btn bg-gradient-dark px-3 mb-2 ms-2" data-class="bg-transparent" onclick="sidebarType(this)">Transparent</button> <button class="btn bg-gradient-dark px-3 mb-2 ms-2" data-class="bg-white" onclick="sidebarType(this)">White</button>
                </div>
                <p class="text-sm d-xl-none d-block mt-2">You can change the sidenav type just on desktop view.</p>
                <div class="mt-3 d-flex">
                    <h6 class="mb-0">Navbar Fixed</h6>
                    <div class="form-check form-switch ps-0 ms-auto my-auto">
                        <input class="form-check-input mt-1 ms-auto" type="checkbox" id="navbarFixed" onclick="navbarFixed(this)">
                    </div>
                </div>
                <hr class="horizontal dark my-3">
                <div class="mt-2 d-flex">
                    <h6 class="mb-0">Light / Dark</h6>
                    <div class="form-check form-switch ps-0 ms-auto my-auto">
                        <input class="form-check-input mt-1 ms-auto" type="checkbox" id="dark-version" onclick="darkMode(this)">
                    </div>
                </div>
                <hr class="horizontal dark my-sm-4">

            </div>
        </div>
    </div>
    <script src="./assets/js/core/popper.min.js"></script>
    <script src="./assets/js/core/bootstrap.min.js"></script>
    <script src="./assets/js/plugins/perfect-scrollbar.min.js"></script>
    <script src="./assets/js/plugins/smooth-scrollbar.min.js"></script>
    <script>
        var win = navigator.platform.indexOf('Win') > -1;
        if (win && document.querySelector('#sidenav-scrollbar')) {
            var options = {
                damping: '0.5'
            }
            Scrollbar.init(document.querySelector('#sidenav-scrollbar'), options);
        }
    </script>
    <script async defer src="./../../buttons.github.io/buttons.js"></script>
    <script src="./assets/js/material-dashboard.mine63c.js?v=3.1.0"></script>
    <script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"829f96d1aab83fc5","b":1,"version":"2023.10.0","token":"1b7cbb72744b40c580f8633c6b62637e"}' crossorigin="anonymous"></script>
</body>

</html>

ZeroDay Forums Mini