JezK
Edit File: post_expired.php
<?php include('admin_functions.php'); $admin=new adm_functions(); $newsdata = $admin->get_news_postexpired(); $newsdata_active = $admin->get_news_expired(); $news_data = ''; $i =1; foreach($newsdata as $k=>$val){ $news_data .= ' <tr><td>'.$i.'</td> <td>'.$val['title'].'</td> <td>'.$val['postdate'].'</td> <td>'.$val['owner'].'</td> <td><a href="news_management_view.php?id='.$val['id'].'"><input type="button" class="btn btn-success" value="View"></a> <a href="news_management_edit.php?id='.$val['id'].'"><input type="button" class="btn btn-info" value="Edit"></a> <a href="news_management_delete.php?id='.$val['id'].'"><input type="button" class="btn btn-danger" value="Delete"></a> </td> </tr>'; $i++; } $currentPage='news_management'; include"header.php" ?> <div class="main-panel"> <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar bar1"></span> <span class="icon-bar bar2"></span> <span class="icon-bar bar3"></span> </button> <a class="navbar-brand" href="#">News Management</a> </div> </div> <div class="collapse navbar-collapse"> </div> </nav> <div class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="col-md-6"> <a href="news_management.php"><button class="btn btn-default pull-right" style="margin-right:10px;">Active News</button></a> </div> <div class="content table-responsive table-full-width"> <table class="table table-striped" id="example"> <thead> <th>S.No</th> <th style="width:300px;">News Title</th> <th>Posted Date & Time</th> <th>Owner</th> <th>Actions</th> </thead> <tbody> <?php echo $news_data; ?> </tbody> </table> </div> </div> </div> </div> </div> <?php include"footer.php" ?> <script> $(document).ready(function() { $('#example').DataTable(); }) </script> <link href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css" rel="stylesheet"> <script src="//code.jquery.com/jquery-1.12.4.js"></script> <script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>