halohalo
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
aramiyarkai
/
public_html
/
admin
/
Upload FileeE
HOME
<?php error_reporting (0); include "dbc.php"; page_protect(); ?> <?php include'header.php';?> <div class="main-bar"> <h3><i class="fa fa-archive"></i> Photo Gallery</h3> </div> <!-- /.main-bar --> </header> <!-- /.head --> </div> <!-- /#top --> <?php include'admin_admin.php';?> <!-- /#left --> <div id="content"> <div class="outer"> <div class="inner bg-light lter"> <style> .form-control.col-lg-6 { width: 50% !important; } </style> <div class="row"> <div class="col-lg-12"> <div class="box"> <header> <h5>View Photo Gallery</h5> <div class="toolbar"></div> </header> <div class="row"> <div class="col-lg-12"> <div class="box"> <div id="collapse4" class="body"> <?php include 'msg_display.php'?> <div class="col-md-12"> </div> <?php //include 'searchform.php'; ?> <div class="col-md-12"> </div> <form action="photo_view.php" method="get" enctype="multipart/form-data"> <div class="col-md-12"> <div class="col-lg-12" align="center"> <input type="submit" class="btn btn-danger" name="enable" id="enable" value="Enable All"> <input type="submit" class="btn btn-danger" name="disable" id="disable" value="Disable All"> <input type="submit" class="btn btn-danger" name="deleteAll" id="delete" value="Delete All"> </div> <div class="col-md-12"> </div> </div> <div class="col-md-12"> </div> <table id="datatable-responsive" class="table table-bordered table-condensed table-hover table-striped text-center"> <thead> <tr> <th>Select</th> <th>Image</th> <th>Category</th> <th>Status </th> <th>Actions</th> </tr> </thead> <tbody> <?php //include 'pagination.php'; $sno = 1; $sql = "select * from photo_gallery"; $result = mysqli_query($link,$sql); while($rw_gallery = mysqli_fetch_object($result)){ $image = $rw_gallery->image; ?> <tr> <td><input name="u[]" type="checkbox" value="<?php echo $rw_gallery->id; ?>" id="u[]"></td> <td><img src="<?php echo $image; ?>" height="100"></td> <td> <?php $cat=$rw_gallery->category; $cque=mysqli_query($link,"select * from photo_category where cat_id='$cat'"); $cat_rw=mysqli_fetch_object($cque); ?> <?php echo $cat_rw->cat_name; ?> </td> <td><?php echo $rw_gallery->status; ?></td> <td> <a class="btn btn-info" title="edit" href="photo_add.php?id=<?php echo $rw_gallery->id;?>&action=Update"> <i class="fa fa-edit"></i> </a> <a class="btn btn-danger" title="delete" href="photo_view.php?delete=d&id=<?php echo $rw_gallery->id;?>" onclick="return confirm('Are you sure want to delete?')"> <i class="fa fa-trash"></i> </a> </td> </tr> <?php $sno++; } ?> </tbody> </table> <?php //echo $pagination; ?> </form> </div> </div><!--/span--> </div><!--/row--> <?php $id=$_GET['id']; if($_GET['delete'] == 'd') { $id=$_GET['id']; mysqli_query($link,"delete from photo_gallery where id='$id'"); echo "<script>window.location.href='photo_view.php'</script>"; } if($_GET['deleteAll'] == 'Delete All') { $uid = $_GET['u']; $id = implode(",",$uid); mysqli_query($link,"delete from photo_gallery where id IN ($id)"); echo "<script>window.location.href='photo_view.php'</script>"; } if($_GET['enable'] == 'Enable All') { $uid = $_GET['u']; $id = implode(",",$uid); $update_status = mysqli_query($link,"update photo_gallery set status='Enable' where id IN ($id)"); echo "<script>window.location.href='photo_view.php'</script>"; } if($_GET['disable'] == 'Disable All') { $uid = $_GET['u']; $id = implode(",",$uid); $update_status = mysqli_query($link,"update photo_gallery set status='Disable' where id IN ($id)"); echo "<script>window.location.href='photo_view.php'</script>"; } ?> </div><!--/.fluid-container--> <!-- end: Content --> </div><!--/#content.span10--> </div><!--/fluid-row--> </div><!-- /.col-lg-12 --> <!-- /.row --> <!-- /.row --> </div><!-- /.inner --> </div><!-- /.outer --> </div><!-- /#content --> </div><!-- /#wrap --> <?php include'footer.php';?>