<?php 
require('../flowap/system.php');
switch($act) {
    default: 
    	$title->GetHeader();?>
    	<?php $sql = DB::$dbs->query("SELECT `name`,`urlt`,`time`,`message`,`idus`,`id` FROM `blog` WHERE `moder` = 0 ORDER BY `time` DESC LIMIT 50")->fetchAll(PDO::FETCH_BOTH);
        foreach ($sql as $blog): ?>
        	<div class="flowap3">
				<div class="fontniz">
					<div class="fontniz2" style="font-weight: 700;" title="кто написал">
						<?php echo functions::usvv($blog['idus']);?>
					</div>
					<time class="fontniz2" style="float: right;" title="время блога">
						<i class="far fa-clock"></i> <?php echo functions::vremja($blog['time']);?>
					</time>	
				</div>
				<a title="прочитать полностью" href="/blog/<?php echo $blog['urlt'];?>" class="flowap5">
					<div class="bogess">
						<h1><?php echo $blog['name'];?></h1>
						<?php echo mb_substr(bbcode::notags($blog['message']), 0, 350, 'UTF-8');?>...
					</div>	
				</a>	
			</div>
    	<?php endforeach;
    	$title->GetFooter();
	break;
}
?>