Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
admin
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php include('config/dbcon.php'); include('authentication.php'); //include('../all/config.php'); //session_start(); include('include/header.php'); ?> <div class="container-fluid px-4"> <div class="row mt-4"> <div class="col-md-12"> <?php include('message.php'); ?> <div class="card"> <div class="card-header"> <h4>View Services<a href="service-add.php" class="btn btn-primary float-end">Add Service</a></h4> </div> <div class="card-body"> <div class="table-responsive"> <table class="table bordered table-striped"> <thead> <tr> <th>ID</th> <th>Name</th> <th>Image</th> <th>Status</th> <th>Edit</th> <?php if( $_SESSION['auth_role'] == 2): ?> <th>Delete</th> <?php endif; ?> </tr> </thead> <tbody> <?php $service = "SELECT * FROM services WHERE status !='2'"; $service_run = mysqli_query($con, $service); if(mysqli_num_rows($service_run)>0) { foreach($service_run as $service) { ?> <tr> <td><?= $service['id'] ?></td> <td><?= $service['name'] ?></td> <td> <img src="../uploads/service/<?= $service['image'] ?>" width="60px" height="60px" /> <img src="../uploads/service/<?= $service['icon'] ?>" width="60px" height="60px" /> </td> <td> <?= $service['status'] == '1' ? 'Hidden':'Visible' ?> </td> <td> <a href="service-edit.php?id=<?= $service['id'] ?>" class="btn btn-success">Edit</a> </td> <?php if( $_SESSION['auth_role'] == 2): ?> <td> <form action="code-superadmin.php" method="POST"> <button type="submit" name="service_detete_btn" value="<?= $service['id'] ?>" class="btn btn-danger">Delete</button> </form> </td> <?php endif; ?> </tr> <?php } }else{ ?> <tr> <td colspan="7">No Record Found</td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <?php include('include/footer.php'); include('include/script.php'); ?>