| Current Path : /home/bolconlineco/www/aaaaaa/demo/coordinator/ |
| Current File : /home/bolconlineco/www/aaaaaa/demo/coordinator/News.php |
<?php
ob_start();
session_start();
?>
<?php include('includes/header.php'); ?>
<script src="//cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css">
<script type="text/javascript">
var $jq = jQuery.noConflict();
</script>
<?php
if(!isset($_SESSION['coordinator']) || $_SESSION['coordinatorrole'] != 2)
{
header("location:../index.php");
exit();
}
?>
<script language="javascript" src="includes/jquery.js"></script>
<?php
if(isset($_GET['msg']))
{
?>
<div class="errors"><?php echo $_GET['msg']; ?></div>
<?php
}
?>
<h3 class="page-title">News Management</h3>
<ul class="page-breadcrumb breadcrumb">
<li><i class="fa fa-home"></i> <a href="dashbord.php"> Home </a> <i class="fa fa-angle-right"></i> </li>
<li class="active">News Management</li>
</ul>
<div class="row clearfix">
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue">
<div class="portlet-title clearfix" style="padding-bottom: 13px;">
<div class="col-sm-6">
<div class="caption" style="font-size: 16px;"> <i class="fa fa-globe"></i>News Management</div>
</div>
<div class="col-sm-6"><a href="add_news.php" style="float: Right;margin-right: 10px; color: #fff;">Add News</a></div>
</div>
<div class="portlet-body clearfix">
<table class="tablestyle table table-striped table-bordered table-hover" id="sample_2">
<thead>
<tr>
<td>sr#</td>
<td>Title</td>
<td>Description</td>
<td>Date</td>
<td>Status</td>
<td>Action</td>
</tr>
</thead>
<tbody>
<?php
$queryNews = "select * from tbl_news";
$queryResult = mysql_query($queryNews) or die(mysql_error());
$sr="";
while($resultSet = mysql_fetch_array($queryResult))
{
$sr++;
list($year,$month,$day)=explode('-',$resultSet['news_date']);
?>
<tr>
<td><?php echo $sr; ?></td>
<td><?php echo $resultSet['title'];?></td>
<td><?php echo substr($resultSet['descriptions'],0,200);?></td>
<td><?php echo $day.'/'.$month.'/'.$year; ?></td>
<td><?php
if($resultSet['nStatus']==1) { echo "Enable"; }
else { echo "Disable"; } ?>
</td>
<td>
<a href="update_news.php?id=<?php echo $resultSet['id'];?>"><img src="../images/edit-icon.png" alt="Edit"/></a>
<a href="delete_news.php?id=<?php echo $resultSet['id'];?>" onclick='return confirm("Are you Sure to delete ?") ' ;> <img src="../images/delete-icon.png" alt="Delete" /> </a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<script>
$jq(document).ready(function(){
$jq('#category_sort').dataTable({bFilter: false, bInfo: false, "bLengthChange": false});
});
</script>
</div>
</div>
</div>
</div>
</div>
</div> <!-- end content -->
</div><!-- end wrapper -->
<?php include('../includes/footer.php');?>