<? global $vis_language; ?>
 <div class="row">
     <div class="col-md-12">
       <section class="container m-t-md">
		<? if($recent_articles!=-1) { ?>
            <div class="panel-heading b-b">
		       <h4 class="panel-title1"><? echo $vis_language['TXTRECENTARTICLES']; ?></h4></div>
               <div class="panel-body">
                  <ul class="list-group list-group-alt list-group-lg m-b-n no-borders">
                     <? for($i=0;$i<count($recent_articles);$i++) { ?>  
                     <li class="list-group-item">
                        <span class="pull-left thumb-sm m-r"><img class="img-circle" src="<?= VIS_PATH_PROFILE.$recent_articles[$i]['author_image']; ?>"></span>
                        <div class="clear">
                          <span class="vh-yellow m-l-md pull-right">
                            <? for($cn=0;$cn<$recent_articles[$i]['rating'];$cn++){ ?><i class="vh vh-lg vh-star"></i><? }
                               for($cn=$recent_articles[$i]['rating'];$cn<5;$cn++){ ?><i class="vh vh-lg vh-star-empty"></i><? } ?>
                          </span>
                          <? if(trim($recent_articles[$i]['article_url'])!=''): ?>
							<? $artUrl = trim(str_replace(' ','-',preg_replace('/\s+/', ' ', strtolower(preg_replace('/[^A-Za-z0-9\-]/', ' ', $recent_articles[$i]['article_url'])))),"-")
							?>
                          <? else: ?>
							<? $artUrl = trim(str_replace(' ','-',preg_replace('/\s+/', ' ', strtolower(preg_replace('/[^A-Za-z0-9\-]/', ' ', $recent_articles[$i]['article_title'])))),"-") ?>
                          <? endif;?>
                          <div class="h4 text-ellipsis l-h-1x"><a class="link-md" href="?/selfhelp/view-article/<?= $artUrl."/".$recent_articles[$i]['article_id']; ?>"><?= $recent_articles[$i]['article_title']; ?></a></div>
                          <div class="m-t-xs m-r-n">
                              <span class="m-r-md"><span class="font-bold"><? echo $vis_language['TXTPOSTEDBY']; ?></span>: <span class="text-primary"><?= $recent_articles[$i]['author']; ?></span></span>
                              <span class="m-r-md"><span class="font-bold"><? echo $vis_language['TXTPOSTON']; ?></span>: <span class="text-primary"><?= format_datetime($recent_articles[$i]['entry_date']); ?></span></span>
                          </div>
                        </div>
                     </li><? } ?>
                 </ul>
               </div><? } ?>
               <? if($featured_articles!=-1) { ?>
				 <div class="panel-heading b-b">
		         <h4 class="panel-title1"><? echo $vis_language['TXTFEATUREDARTICLES']; ?></h4></div>
                 <div class="panel-body">
                  <ul class="list-group list-group-alt list-group-lg m-b-n no-borders">
                     <? for($i=0;$i<count($featured_articles);$i++) {     ?> 
                     <li class="list-group-item">
                        <span class="pull-left thumb-sm m-r"><img class="img-circle" src="<?= VIS_PATH_PROFILE.$featured_articles[$i]['author_image']; ?>"></span>
                        <div class="clear">
                          <span class="vh-yellow m-l-md pull-right">
                            <? for($cn=0;$cn<$featured_articles[$i]['rating'];$cn++){ ?><i class="vh vh-lg vh-star"></i><? }
                               for($cn=$featured_articles[$i]['rating'];$cn<5;$cn++){ ?><i class="vh vh-lg vh-star-empty"></i><? } ?>
                          </span>
                          <? if(trim($featured_articles[$i]['article_url'])!=''): ?>
							<? $featUrl = trim(str_replace(' ','-',preg_replace('/\s+/', ' ', strtolower(preg_replace('/[^A-Za-z0-9\-]/', ' ', $featured_articles[$i]['article_url'])))),"-")
							
							?>
                          <? else: ?>
							<? $featUrl = trim(str_replace(' ','-',preg_replace('/\s+/', ' ', strtolower(preg_replace('/[^A-Za-z0-9\-]/', ' ', $featured_articles[$i]['article_title'])))),"-") ?>
                          <? endif;?>
                          <div class="h4 text-ellipsis l-h-1x"><a class="link-md" href="?/selfhelp/view-article/<?= $featUrl."/".$featured_articles[$i]['article_id']; ?>"><?= $featured_articles[$i]['article_title']; ?></a></div>
                          <div class="m-t-xs m-r-n">
                              <span class="m-r-md"><span class="font-bold"><? echo $vis_language['TXTPOSTEDBY']; ?></span>: <span class="text-primary"><?= $featured_articles[$i]['author']; ?></span></span>
                              <span class="m-r-md"><span class="font-bold"><? echo $vis_language['TXTPOSTON']; ?></span>: <span class="text-primary"><?= format_datetime($featured_articles[$i]['entry_date']); ?></span></span>
                          </div>
                        </div>
                     </li><? } ?>
                 </ul>
           <? } ?>
		</section>
	</div>
  </div>
