Mini Shell
<?php require_once('function-file.php');
require_once('function-menu.php');
require_once('function-testo-footer.php');
require_once("config.php");
$news_id=$_GET['newsid'];
$news=$conn->prepare("select * from news where news_id='$news_id'");
$news->execute();$newsrow=$news->fetch();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Home | Lanka Virtual Academy</title>
<?php commoncss();?>
</head><!--/head-->
<body class="homepage">
<?php headermenu();?>
<section class="header-title">
<div class="container">
<div class="row">
<div class="col-sm-12"><h2>NEWS</h2></div>
</div>
</div>
</section>
<section>
<div class="container news">
<div class="col-sm-7 col-xs-12">
<div class="row">
<div class="col-sm-9" style="padding-left: 0;"><h2><?php echo $newsrow['news_title'];?></h2></div><div class="col-sm-3" align="right"><?php echo date('d M Y',strtotime($newsrow['news_date']));?></div>
<div><h4><img src="admin/img/news/<?php echo $newsrow['news_img'];?>" class="img-responsive"></h4></div>
<?php echo $newsrow['news_desc'];?>
</div>
</div>
<div class="col-sm-5 col-xs-12 right">
<h4>ALL NEWS</h4>
<?php $newsdata=$conn->prepare("select * from news");
$newsdata->execute();$newsres=$newsdata->fetchall();
foreach($newsres as $newsrow){?>
<div class="row">
<div class="col-sm-5 col-xs-12"><a href="news-details.php?newsid=<?php echo $newsrow['news_id'];?>"><img src="admin/img/news/<?php echo $newsrow['news_img'];?>" class="img-responsive"></a></div>
<div class="col-sm-7 col-xs-12"><span class="small"><?php echo date('M Y', strtotime($newsrow['news_date']));?></span>
<h5>
<a href="news-details.php?newsid=<?php echo $newsrow['news_id'];?>"><?php echo substr($newsrow['news_title'],0,60);?></a>
</h5><!--<span class="small"><b>Jones Smith</b></span>-->
<p class="small"><?php echo substr($newsrow['news_desc'],0,120)."...";?></p><hr>
</div>
</div>
<?php }?>
</div>
</div>
</section>
<?php newssletter(); ?>
<?php footer(); commonjs();?>
</body>
</html>
Zerion Mini Shell 1.0