����JFIF��x�x������Exif��MM�*���� ����E���J����������������(������������������
Server IP : 103.191.208.227 / Your IP : 52.15.224.97 Web Server : LiteSpeed System : Linux emphasis.herosite.pro 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64 User : mhmsfzcs ( 1485) PHP Version : 8.1.31 Disable Function : show_source, system, shell_exec, passthru, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/mhmsfzcs/vflyorions.com/admin/assets/../ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include 'db.php'; include 'header.php'; include 'sidebar.php'; if(isset($_GET['delete'])) { $ad=$_GET['delete']; $query=$conn->prepare("delete from enquiries where id =?"); $query->bind_param("s",$ad); $res=$query->execute(); if($res) { $_SESSION['status']="User Deleted Successfully"; $_SESSION['status_code']="success"; } else { $_SESSION['status']="Oops something went wrong!!"; $_SEESION['status_code']="error"; } } ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0">Dashboard</h1> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active">Dashboard</li> </ol> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="card"> <div class="card-header"> <h3 class="card-title">Contacts</h3> </div> <!-- /.card-header --> <div class="card-body"> <table id="example1" class="table table-bordered table-striped"> <a href="download.php" class="btn btn-primary">Download CSV</a> <thead> <tr> <th>Sr. No.</th> <th>Name</th> <th>Email</th> <th>Phone</th> <th>Message</th> <th>Date</th> <th>Action</th> </tr> </thead> <tbody> <?php $que = "SELECT DISTINCT contact, name, email, message, date, id FROM enquiries ORDER BY id DESC"; $r = $conn->query($que); $sr = 1; $prev_contact = null; // Initialize $prev_contact outside the loop while ($row = $r->fetch_assoc()) { $id = $row['id']; ?> <tr <?php if ($row['contact'] == $prev_contact) echo 'style="display: none;"'; ?>> <td><?php echo $sr; ?></td> <td><?php echo $row['name']; ?></td> <td><?php echo $row['email']; ?></td> <td> <?php // Check if the current contact number has been displayed already if ($row['contact'] == $prev_contact) { echo ''; // Display empty cell } else { echo $row['contact']; // Display contact number } ?> </td> <td><?php echo $row['message']; ?></td> <td><?php echo $row['date']; ?></td> <td> <a href="allenquiries.php?delete=<?= $row['id']; ?>" onclick="return confirm('Are you sure to delete?')" class="btn btn-danger">Delete</a> </td> </tr> <?php if ($row['contact'] != $prev_contact) { $sr++; } $prev_contact = $row['contact']; // Store current contact number for comparison in the next iteration } ?> </tbody> </table> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.row --> </div><!--/. container-fluid --> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <!-- Control Sidebar --> <aside class="control-sidebar control-sidebar-dark"> <!-- Control sidebar content goes here --> </aside> <!-- /.control-sidebar --> <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#site").change(function() { var site_id=$(this).val(); var post_id = 'id='+ site_id; $.ajax ({ type: "POST", url: "fetch.php", data: post_id, cache: false, success: function(cities) { $("#cp").html(cities); } }); }); }); </script> --> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <?php if(isset($_SESSION['status']) && $_SESSION['status']!='') { ?> <script> new swal({ title: "<?php echo $_SESSION['status'];?>", //text: "You clicked the button!", icon: "<?php echo $_SESSION['status_code'];?>", button: "OK", }).then(function() { window.location = "allenquiries.php"; }); </script> <?php unset($_SESSION['status']); } ?> <?php include 'footer.php'; ?>