Mini Shell

Direktori : /home/rizant5/public_html_old/development/
Upload File :
Current File : /home/rizant5/public_html_old/development/blog.php

<?php require_once('function-file.php');

require_once('function-menu.php');

require_once('function-testo-footer.php');

require_once("config.php");

require_once('function-testo-footer.php');

$blogdata=$conn->prepare("select * from blogs");

$blogdata->execute();$blogres=$blogdata->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>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>BLOGS</h2></div>

            </div>

        </div>        

   </section>

    <section>

         <div class="container news">

         	<div class="col-sm-7 col-xs-12">

               <?php foreach($blogres as $blogrow){?>

                 <div class="row">

                        <div class="col-sm-4 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-8 col-xs-12 justify"><h4><a href="blog-details.php?blogid=<?php echo $blogrow['blog_id'];?>"><?php echo $blogrow['blog_title'];?></h4>

						<?php echo substr($blogrow['blog_desc'],0,160);?>

                        <p><span class="date"><i class="fa fa-clock-o news-fa"></i> <?php echo date('M d, Y', strtotime($blogrow['blog_date']));?></span>&nbsp;&nbsp;&nbsp;

                        <span class="comments"><i class="fa fa-comment news-fa"></i> 

						<?php $dbs=$conn->prepare("select count(commentid) as total_comment from blog_comment where blog_id='$blogrow[blog_id]'");$dbs->execute();$res=$dbs->fetch();echo $res['total_comment'];?> Comments</span></p>

                        </div>

                 </div>

                 <hr>

			<?php }?>

             </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 justify"><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,25);?></a></h5><!--<span class="small"><b>Jones Smith</b></span>-->

                        <p class="small"><?php echo substr($newsrow['news_desc'],0,80)."...";?></p><hr>

                        </div>

                 </div>

			<?php }?>

             </div>  

         </div>    

    </section>

    

  <?php newssletter();  ?>

<?php footer(); commonjs();?>   

</body>

</html>

Zerion Mini Shell 1.0