<?

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

$browser = new browser();
if (!$postGroup) {
	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">
	    
	<div class="post-l"><?=group :: Avatar($groups, 2)?></div>

	  <div class="notification__avatarIcon icon icon_notify_mini_new_post"></div>
	  </div>
	<div class="post-c">
		<div class="_name">
			Новая запись в группе - <a style="" href="/groups/?group=<?=$groups['id']?>"><?echo Emoji :: Text(system :: textOut(($groups['name'])))?></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(($postGroup['post'])))?>
				</div>
				  <?
                 if (DB :: $pdo -> querySingle("SELECT COUNT(*) FROM `groups_files` WHERE `id_post` = '".$postGroup['id']."'") > 0)
                {
                ?>
                    <div class="list_blog39">
                        <?
                        $query_f = DB :: $pdo -> query("SELECT * FROM `groups_files` WHERE `id_post` = '".$postGroup['id']."' ORDER BY `id` DESC");
                        while($r_f = $query_f -> fetch())
                        {
                        ?>
							<div class="llq_pdq--291">
								 <img class="sim_groups116" style="max-width: 20%; position: relative;" src="<?echo "".FILES_SERVER."/groups/files/".$r_f['id'].".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="/groups/?group=<?=$groups['id']?>&komm=<?=$postGroup['id']?>" class="tb-c">Посмотреть запись</a></div>
		</div> 
		</div>
</div>
  