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> Blog</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; } body{ margin-bottom:0; } </style> <div class="row"> <div class="col-lg-12"> <div class="box"> <header> <div class="row"> <div class="col-lg-10"> <h5>View Blog</h5> </div> <div class="col-lg-2"> <a href="add_blog.php?action=Save" class="btn btn-success ">Add Blog </a> </div> </div> <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="view_blog.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="Delete" id="Delete" value="Delete All"> <input type="submit" class="btn btn-danger" name="Approve" id="Approve" value="Approve All"> <input type="submit" class="btn btn-danger" name="Unapprove" id="Unapprove" value="Unapprove All"> <a class="btn btn-info" title="edit" href="qrcode/viewallqrcode.php" target="_blank"> <i class="fa fa-qrcode"></i> View All QR Code </a> </div> <div class="col-md-12"> </div> <div class="col-md-12"> </div> <table id="datatable-responsive" class="table table-bordered table-condensed table-hover table-striped"> <thead> <tr> <th>Select</th> <th>Category</th> <th>Blog Title</th> <th>Blog Sub Title</th> <th>Image</th> <th>Date</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> <?php //include 'pagination.php'; $sno = 1; $sql = "select * from blog order by `id` desc"; $result = mysqli_query($link,$sql); while($rw_blog = mysqli_fetch_object($result)){ $bid = $rw_blog->bid; $cid = $rw_blog->cat_id; $scat = mysqli_query($link,"select * from blog_category where cat_id='$cid'"); $cat = mysqli_fetch_object($scat); $cat_name = $cat->cat_name; ?> <tr> <td><input name="u[]" type="checkbox" value="<?php echo $rw_blog->id; ?>" id="u[]"></td> <td> <?php echo $cat->cat_id;?><br><?php echo $cat_name; ?> </td> <td> <?php echo $rw_blog->title;?> </td> <td> <?php echo $rw_blog->sub_title;?> </td> <td class="center"> <img src="<?php echo $rw_blog->image;?>" width="100" height="100"> </td> <td class="center"><?php echo $rw_blog->date;?></td> <td class="center"><?php echo $rw_blog->status; ?></td> <td> <a class="btn btn-info" title="edit" href="qrcode/sample_image.php?url=https://www.aramiyarkai.com/blogview-<?php echo $rw_blog->seo_url; ?>.php" target="_blank"> <i class="fa fa-qrcode"></i> </a> <a class="btn btn-info" title="edit" href="add_blog.php?id=<?php echo $rw_blog->id;?>&action=Update"> <i class="fa fa-edit"></i> </a> <a class="btn btn-danger" title="delete" href="view_blog.php?delete=d&id=<?php echo $rw_blog->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 class="clearfix"></div> <div class="col-md-12"> </div> </div><!--/span--> </div><!--/row--> <?php $id=$_GET['id']; if($_GET['delete'] == 'd') { $id=$_GET['id']; mysqli_query($link,"delete from blog where id='$id'"); echo "<script>window.location.href='view_blog.php'</script>"; } if(isset($_GET['Delete'])) { foreach ($_GET['u'] as $uid) { mysqli_query($link,"delete from blog where id='$uid'"); } echo "<script>window.location.href='view_blog.php'</script>"; } if(isset($_GET['Approve'])) { foreach ($_GET['u'] as $uid) { $update_status = mysqli_query($link,"update blog set status='0' where id='$uid'"); } echo "<script>window.location.href='view_blog.php'</script>"; } if(isset($_GET['Unapprove'])) { foreach ($_GET['u'] as $uid) { $update_status = mysqli_query($link,"update blog set status='1' where id='$uid'"); } echo "<script>window.location.href='view_blog.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';?>