<?

$us = profile::getUser($p['id_type']);
$blog = DB::$pdo->queryFetch("SELECT * FROM `blog` WHERE `id` = ?  LIMIT 1;", [$p['data']]);

$browser = new browser();
if (!$blog) {
	DB:: $pdo->query("DELETE FROM `events` WHERE `data` = ? LIMIT 1;", array($p['data']));
}

?><div class="list _l-padd-n">
	<div class="_l-padd">
	    <div>
                            <a class="toggle-menu-act" onclick="UI.toggleMenu(this);">
                                <span></span>
                            </a>
                            <div class="toggle-menu">
                            <div class="toggle-menu-arrow"><span></span></div>
                            <ul class="toggle-menu-block">
                                <a href="?del=<?=$p['key']?>&type=<?=$type?>">Удалить</a>
                            </ul>
                            </div>
                        </div>
	<div class="_oh">
	<div class="list-flex">
	<div class="post-l">
	 <?=profile::userAvatar($us, 3)?>
	  <div class="notification__avatarIcon icon icon_notify_mini_photo_tag"></div>
	  </div>
	<div class="post-c">
		<div class="_name">
			 <a href="<?=profile :: getLink($us)?>"><?=profile::getFullName($us, true)?></a> 
			 Создал(а) запись в блоге
		</div>
			<div class="_time">
				<?=system::times($p['date_create'])?>
			</div>
		</div>
	</div>
	</div>
		<div class=" _gray" style="font-size: 13px;">
		<div>
			  
		</div>
		
		<div class="_photos-item">
		<div class="_photos-item-padd">
		<div class="_photos-cont">
			<div class="_photos-ph">
				<div class="_photos-ph-t">
				
					<?echo Emoji :: Text(system :: textOut(($blog['text'])))?>
				</div>
				  <?
                 if (DB :: $pdo -> querySingle("SELECT COUNT(*) FROM `blog_files` WHERE `id_blog` = '".$blog['id']."'") > 0)
                {
                ?>
                    <div class="list_blog39">
                        <?
                        $query_f = DB :: $pdo -> query("SELECT * FROM `blog_files` WHERE `id_blog` = '".$blog['id']."' ORDER BY `id` DESC");
                        while($r_f = $query_f -> fetch())
                        {
                        ?>
                        <div class="llq_pdq--291">
                    <img class="liq-pdq--891" src="<?echo "".FILES_SERVER."/blog_files/".$r_f['id']."_m.jpg";?>" alt="*" />
                               </div>
                        <?
                        }
                        ?>
                    </div>
                <?
                }
                ?>
			</div>
		</div>
		</div>
		
	</div> 
		<div class="_font-s">
		</div>
		</div>
	</div>
		<div class="tb-line"></div>
			<div class="tb-bloc"><div class="tb-cont tb-1">
			<div class="tb-item"><a href="/blog/?note=<?=$blog['id']?>" class="tb-c">Посмотреть</a></div>
		</div>
		</div>
</div>
  
  