Mini Shell

Direktori : /proc/self/root/proc/self/root/home/rizant5/www/admin/
Upload File :
Current File : //proc/self/root/proc/self/root/home/rizant5/www/admin/blogs.php

<?php 
require_once("../config.php");
require_once("function-file.php");
require_once("function-menu.php");
cookiecheck();
if((!empty($_GET['action']))&&($_GET['action']=='delete')){
	$blog_id=$_GET['blog_id'];
	$conn->exec("delete from blogs where blog_id='$blog_id'");
	header("location:blogs.php");
}?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Blogs</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <?php  cssfile();datatablecss();?>
    <style>.selected{color:red;}</style>
  </head>
  <body class="hold-transition skin-blue layout-top-nav">
    <!-- Site wrapper -->
    <div class="wrapper">
<?php headermenu();?>
      <!-- =============================================== -->
      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <!-- Main content -->
        <div class="col-sm-12">
        <section class="content">
          <!-- Default box -->
          <div class="box">
            <div class="box-header with-border">
              <h3 class="box-title">Blogs</h3>
              <div class="box-tools pull-right">
                <a href="blog-new.php" class="btn btn-primary btn-sm" ><i class="fa fa-plus"></i> Add Blog</a>
              </div>
            </div>
            <div class="box-body">
              <table class="table table-bordered table-striped dataTable" id="data-table">
                <thead><tr><th>Image</th><th>Title</th><th>Action</th></tr></thead>
                 <tbody>
                 	<?php  $data=$conn->prepare("select * from blogs");
					$data->execute();$result=$data->fetchall();$i=1;
					foreach($result as $row){
						echo "<tr>";
						echo "<td><img src='img/blogs/$row[blog_img]' width='100'></td>";
						echo "<td>$row[blog_title]</td>";
						echo "<td><a href='blog-edit.php?blog_id=$row[blog_id]' title='Edit Blog' class='btn btn-info btn-xs'>Edit</a>&nbsp;&nbsp;";?><a href='blogs.php?action=delete&blog_id=<?php echo $row['blog_id'];?>' onclick="return confirm('Are you sure you want to delete?')" title='Delete Blog' class='btn btn-danger btn-xs'>Delete</a>&nbsp;&nbsp;<a href='blogs-view.php?blog_id=<?php echo $row['blog_id'];?>' class='btn btn-warning btn-xs'>Views</a></td><?php
						echo "</tr>";
						$i++;
					}
					?>
                 </tbody>
                 </table>
            </div><!-- /.box-body -->
          </div><!-- /.box -->
        </section><!-- /.content -->
        </div>
      </div></div><!-- /.content-wrapper -->
      <?php footer();?>
    </div><!-- ./wrapper -->
   <?php jsfile();datatablejs();?>
   <script>
$('#data-table').dataTable({
     responsive: true,
     "dom": 'T<"clear">lfrtip',
	  "ordering": false,
     "tableTools": {
           "sSwfPath": "../apptheme/plugins/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
		   "aButtons": [
            {
                "sExtends": "copy",
                "mColumns": [0, 1]
            },
   			{
                "sExtends": "xls",
                 "mColumns": [0, 1]
            },
                        {
                "sExtends": "pdf",
                 "mColumns": [0, 1]
            },
        ]
      }
});
</script>

  </body>
</html>

Zerion Mini Shell 1.0