D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
G:
/
PleskVhosts
/
jhalakdembla.com
/
akkonlineservices.com
/
Admin
/
Filename :
AllProduct.php
back
Copy
<?php include('layout/header.php'); require('Coding/db.php'); $query = "SELECT *,productcategory.Title AS CtgTitle FROM `productcategory` INNER JOIN `product` ON productcategory.id = product.ProductCtgId OR '0' = product.ProductCtgId"; $result = mysqli_query($conn,$query); ?> <main class="content"> <div class="container-fluid"> <div class="header"> <h1 class="header-title"> All Product </h1> </div> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h5 class="card-title">All Product</h5> <a href="AddProduct.php" class="btn btn-info ">Add More</a> </div> <div class="card-body"> <table id="datatables-buttons" class="table table-striped" style="width:100%"> <thead> <tr> <th>Sr. No.</th> <th>Category</th> <th>Title</th> <th>View</th> <th>Edit</th> <th>Delete</th> </tr> </thead> <tbody> <?php $i = 0; while($row = mysqli_fetch_assoc($result)){ $n = ++$i; ?> <tr> <td><?php echo $n;?></td> <td><?php echo $row['CtgTitle']; ?></td> <td><?php echo $row['Title']; ?></td> <td> <a href="ViewProduct.php?id=<?php echo $row['id']; ?>" > <i class="ion ion-md-eye me-2 text-success " ></i> </a> </td> <td> <a href="EditProduct.php?id=<?php echo $row['id'];?>" > <i class="ion ion-md-open me-2 " ></i> </a> </td> <td> <a href="Coding/DeleteProduct.php?id=<?php echo $row['id']; ?>"> <i class="ion ion-ios-trash me-2 text-danger"></i> </a> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </main> <script> document.addEventListener("DOMContentLoaded", function() { // Datatables with Buttons var datatablesButtons = $("#datatables-buttons").DataTable({ responsive: true, lengthChange: !1, buttons: ["copy", "print"] }); datatablesButtons.buttons().container().appendTo("#datatables-buttons_wrapper .col-md-6:eq(0)"); }); </script> <?php include('layout/footer.php'); ?>