MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 18.225.98.59
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/queries.php
<?php
require_once 'header.php';
require_once 'navbar.php';

$sql="SELECT * from queries ORDER BY `id` DESC";
$res=$conn->query($sql);
if($res->num_rows > 0)
{
    while($row=$res->fetch_assoc())
    {
        $queries[]=$row;
    }
}

if (isset($_POST['delete_id'])) {
    $id = $_POST['delete_id'];

    $query = "DELETE FROM queries WHERE id = " . $id;

    if ($conn->query($query)) {
        echo "Success";
    } 
}
?>

<style>
	.vendor_pass{
		background-color: #ffc800;
		color: #fff;
	}
	.confirmed{
		background-color: #0aa50a;
		color: #fff;
	}
	.cancelled{
		background-color: red;
		color: #fff;
	}
    .booked{
        background-color: #3485b6;
        color: #fff;
    }
</style>
<!-- Page content -->
<div class="container-fluid pt-8">
    <div class="page-header mt-0 p-3">
        <h3 class="mb-sm-0">All Queries</h3>
    </div>
    <div id="alert2" class="col-md-12"></div>
    <!-- Table -->
    <div class="row">
        <div class="col-12">
            
         <div class="alert alert-success" id="success" style="display:none">Success! Your Request has been submited.</div>
         
         
         <div class="card shadow">
                <!-- <div class="card-header bg-transparent border-0">
                    <h2 class=" mb-0">Pending Vendors</h2>
                </div> -->
                
                
                <div class="card-body">
                    <div class="grid-margin">
                        <div class="">
                            <div class="table-responsive">
                                <table id="example" class="text-center table card-table table-vcenter text-nowrap  align-items-center table-bordered">
                                    <thead>              
                                        <tr>                         	
                                            <th>S.No</th>
                                            <th>Name</th>
                                            <th>Contact</th>
                                            <th>Email </th>
                                            <th>Message</th>
                                            <th>Action</th>
                                            
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
                                        if(isset($queries))
                                        {
                                           $x=1;
                                           foreach($queries as $query)
                                           {
                                            ?>
                                            <tr>
                                                <td><?=$x?></td>
                                                <td><?=$query['name'];?></td>
                                                <td><?=$query['contact'];?></td>
                                                <td><?=$query['email'];?></td>
                                                <td><?=$query['message'];?></td>
                                                <td><button type="button" name="del" class="btn btn-danger" value="${data.id}" onclick="del(<?=$query['id'];?>)">
                                                    <i class="fa fa-trash"></i></button></td>
                                                    
                                                </tr>
                                                <?php
                                                $x++;  
                                            }
                                        }
                                        ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php 
require_once 'footer.php';
require_once 'jslinks.php';
?>                          
<!-- Adon JS -->
<script src="assets/js/custom.js"></script>
<script src="assets/js/datatable.js"></script>

</script>
<script>
    function del(e) {
      var verify = confirm("Do you really want to delete!!!");
      if(verify) {
         $("#global-loader").show();
         $.ajax({
          url: "queries.php",
          type: "POST",
          data: {
              delete_id: e,
          },
          success: function(response){
              location.reload();
          },
      })
     }
 }
</script>

MMCT - 2023