📁 File Manager
Editing:
/home/wedigitalindia/www/admin/view_service_location_pages.php
<?php include("connection.php"); include("header.php"); ?> <div class="main-content"> <div class="page-content"> <div class="container-fluid"> <!-- Page Title --> <div class="row"> <div class="col-12"> <div class="page-title-box d-sm-flex align-items-center justify-content-between"> <h4 class="mb-sm-0 font-size-18"> View Service Location Pages </h4> </div> </div> </div> <!-- Table --> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <div class="row mb-2"> <div class="col-sm-6 mt-3"> <div class="search-box me-2 d-inline-block"> <div class="position-relative"> <input type="text" class="form-control" id="searchInput" onkeyup="searchTable()" placeholder="Search..."> <i class="bx bx-search-alt search-icon"></i> </div> </div> </div> <div class="col-sm-6 mt-3"> <div class="text-sm-end"> <a href="add_service_location_page.php"> <button type="button" class="btn btn-success btn-rounded waves-effect waves-light mb-2"> <i class="mdi mdi-plus me-1"></i> Add Location Page </button> </a> </div> </div> </div> <div class="table-responsive"> <table class="table align-middle table-nowrap table-hover w-100"> <thead class="table-light"> <tr> <th>S.No</th> <th>Image</th> <th>Service</th> <th>Location</th> <th>Slug</th> <th>Status</th> <th width="220">Action</th> </tr> </thead> <tbody> <?php $query = mysqli_query( $con, "SELECT lp.*, tc.cat_name FROM tbl_location_pages lp LEFT JOIN tbl_top_category tc ON lp.category_id = tc.t_id ORDER BY lp.loc_id DESC" ); $serial = 1; while ($row = mysqli_fetch_assoc($query)) { ?> <tr> <td> <?php echo $serial++; ?> </td> <td> <?php if (!empty($row['image'])) { ?> <img src="./assets/images/location/<?php echo $row['image']; ?>" width="120" height="80" style="object-fit:cover;border-radius:8px;"> <?php } else { echo "No Image"; } ?> </td> <td> <?php echo $row['cat_name']; ?> </td> <td> <?php echo $row['location_name']; ?> </td> <td> <?php echo $row['slug']; ?> </td> <td> <?php if ($row['status'] == 1) { ?> <span class="badge bg-success"> Active </span> <?php } else { ?> <span class="badge bg-danger"> Inactive </span> <?php } ?> </td> <td> <a href="edit_service_location_page.php?loc_id=<?php echo $row['loc_id']; ?>"> <button class="btn btn-primary btn-rounded waves-effect waves-light mb-2"> <i class="far fa-edit"></i> Edit </button> </a> <a href="delete_service_location_page.php?loc_id=<?php echo $row['loc_id']; ?>" onclick="return confirm('Are you sure you want to delete this record?')"> <button class="btn btn-danger btn-rounded waves-effect waves-light mb-2"> <i class="fas fa-trash"></i> Delete </button> </a> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <?php include("footer.php"); ?> </div> <script> function searchTable() { let input = document.getElementById("searchInput"); let filter = input.value.toUpperCase(); let table = document.querySelector("table"); let tr = table.getElementsByTagName("tr"); for(let i=1;i<tr.length;i++) { let txtValue = tr[i].textContent || tr[i].innerText; if( txtValue.toUpperCase() .indexOf(filter) > -1 ) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } } </script>
Save
Cancel