hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
b4h4ej4a6kj6
/
public_html
/
kitsandcleats.in
/
admin
/
Upload FileeE
HOME
<?php include('functions.php'); $obj = new Operations(); if($_GET['action'] == 'delete'){ $obj->delete('products',$_GET['id']); header('location:view-product.php'); } include 'header.php'; ?> <?php require_once 'sidebar.php'?> <!-- Main Content --> <div class="main-content"> <section class="section"> <div class="section-body"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h2>View Products</h2> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-striped" id="table-1"> <thead> <tr class="text-center"> <th>#ID</th> <th>Name</th> <th>Price</th> <th>Quantity</th> <th>Image</th> <th>Status</th> <th width="75">Action</th> </tr> </thead> <tbody> <?php $w = "order by id desc"; $rs=$obj->getList('products',$w); foreach($rs as $rss){ ?> <tr class="text-center"> <td>fo00<?php echo $rss['id'];?></td> <td><?php echo $rss['name'];?></td> <td>₹<?php echo $rss['price'];?></td> <td><?php echo $rss['qty'];?></td> <td><img src="./images/products/<?php echo $rss['image'];?>" width="50" height="50"></td> <td><span style="cursor:pointer" id="view-banner_<?php echo $rss['id']; ?>" <?php if($rss['status'] == 'Active'){ ?>class="btn btn-success"<?php }else{ ?> class="btn btn-danger sub"<?php } ?>><?php echo $rss['status']; ?></span></td> <td style="width:20%"><a href="add-product.php?mode=edit&id=<?php echo $rss['id'];?>" class="btn btn-primary">Edit</a> <a id="del-img_<?php echo $rss['id']; ?>" href="javascript:void(0)" class="btn btn-danger btn_dengars">Delete</a></td> </tr> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $('#view-banner_<?php echo $rss['id']; ?>').click(function(){ window.location = "product_bac.php?id=<?php echo $rss['id']; ?>"; }); </script> <script> $('#del-img_<?php echo $rss['id']; ?>').click(function(){ var r = confirm("Are You Sure You Want To Delete This!"); if (r == true) { window.location = "?action=delete&id=<?php echo $rss['id']; ?>"; } else { } }); </script> <?php }?> </tbody> </table> </div> </div> </div> </div> </div> </div> </section> </div> <?php require_once 'footer.php'?>