MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 18.217.142.228
Web Server : LiteSpeed
System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
User : u641149403 ( 641149403)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u641149403/domains/cabz4you.com/public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u641149403/domains/cabz4you.com/public_html/admin/recent_search_booking.php
<?php
require_once 'header.php';
require_once 'navbar.php';
if (isset($_GET['id'])) {
    $id=$_GET['id'];
    $query = $conn->query("DELETE FROM recent_search WHERE id='$id'");
    if ($query) {
        echo "<script>window.location.href = 'recent_search_booking'</script>";
    }
}
$sql = "SELECT * FROM recent_search ORDER BY id DESC";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while ($row = $result->fetch_assoc()) {
        $table_data[] = $row;
    }
}

?>

<!-- Page content -->
<div class="container-fluid pt-8">
    <div class="page-header mt-0  p-3">
        <h3 class="mb-sm-0">Recent Search Bookings</h3>
        <ol class="breadcrumb mb-0">
            <li class="breadcrumb-item"><a href="#"><i class="fe fe-home"></i></a></li>
            <li class="breadcrumb-item active" aria-current="page">Recent Search Bookings</li>
        </ol>
    </div>
    
    <div class="alert " id="msg" style="display:none"></div>
    <div class="card shadow">

        <div class="card-body">
            <?php
            if (isset($table_data)) {
                ?>
                <div class="table-responsive">
                    <table id="example" class="table table-striped table-bordered text-nowrap">
                        <thead>
                            <tr>
                                <th class="wd-15p">S.No</th>
                                <th class="wd-15p">From </th>
                                <th class="wd-15p">To</th>
                                <th class="wd-15p">Pickup Date</th>
                                <th class="wd-20p">Pickup Time</th>
                                <th class="wd-20p">Trip Type</th>
                                <th class="wd-20p">Customer Contact</th>
                                <th class="wd-20p">Created Date/Time</th>
                                <th class="wd-20p">Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            $x = 1;
                            foreach ($table_data as $hh) {
                                ?>
                                <tr>
                                    <td><?= $x; ?></td>
                                    <td><?= $hh['pickup_address'] ?></td>
                                    <td><?php echo str_replace('/', ' - ', $hh['drop_address']);?></td>
                                    <td><?= date("d-m-Y", strtotime($hh['pickup_date'])); ?></td>
                                    <td><?= date("h:i A", strtotime($hh['pickup_time'])); ?></td>
                                    <td><?= $hh['trip_type']; ?></td>
                                    <td><?= $hh['phone']; ?></td>
                                    <td><?= date("d-m-Y h:i:s", strtotime($hh['time_stamp'])); ?></td>
                                    <td>
                                        <a class="btn btn-danger text-white btn-sm" href="recent_search_booking?id=<?=$hh['id']?>" onclick="return confirm('Do you really want to delete?');"><i class="fa fa-trash"></i> Delete</a>
                                    </td>
                                </tr>
                                <?php $x++; } ?>
                            </tbody>
                        </table>
                    </div>
                    <?php
                } else {
                    echo "<h2>No Record Found.</h2>";
                }
                ?>
            </div>
        </div>
    </div>

    <?php
    require_once 'footer.php';
    require_once 'jslinks.php';
    ?>
    <script src="assets/js/custom.js"></script>
    <script src="assets/js/datatable.js"></script>



    

MMCT - 2023