Mini Shell
<?php require_once('function-file.php');
require_once('function-menu.php');
require_once("config.php");
$newsdata=$conn->prepare("select * from news");
$newsdata->execute();$newsres=$newsdata->fetchall();
?>
<!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>Lanka Virtual Academy | Educational News</title>
<meta name="description" content="Latest educational news, updates, and opinions.">
<meta name="Keywords" content="">
<?php require_once('function-testo-footer.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">
<?php foreach($newsres as $newsrow){?>
<div class="row">
<div class="col-sm-4 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-8 col-xs-12"><h4><a href="news-details.php?newsid=<?php echo $newsrow['news_id'];?>"><?php echo $newsrow['news_title'];?></h4>
<?php echo substr($newsrow['news_desc'],0,300)."...";?>
<p><span class="date"><i class="fa fa-clock-o news-fa"></i> <?php echo date('M d, Y', strtotime($newsrow['news_date']));?></span>
</div>
</div>
<hr>
<?php }?>
</div>
<div class="col-sm-5 col-xs-12 right">
<h4>LATEST BLOGS</h4>
<?php $blogdata=$conn->prepare("select * from blogs limit 5");
$blogdata->execute();$blogres=$blogdata->fetchall();
foreach($blogres as $blogrow){?>
<div class="row">
<div class="col-sm-5 col-xs-12"><a href="blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>"><img src="admin/img/blogs/<?php echo $blogrow['blog_img'];?>" class="img-responsive"></a></div>
<div class="col-sm-7 col-xs-12"><span class="small"><?php echo date('M Y', strtotime($blogrow['blog_date']));?></span><h5><a href="blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>"><?php echo substr($blogrow['blog_title'],0,60);?></a></h5><!--<span class="small"><b>Jones Smith</b></span>-->
<p class="small"><?php echo substr($blogrow['blog_desc'],0,120)."...";?></p><hr>
</div>
</div>
<?php }?>
</div>
</div>
</section>
<?php newssletter(); ?>
<?php footer(); commonjs();?>
</body>
</html>
Zerion Mini Shell 1.0