<?

$us = profile::getUser($p['id_type']);
$photos = DB::$pdo->queryFetch("SELECT * FROM `photos` WHERE `id` = ?  LIMIT 1;", [$p['data']]);
$browser = new browser();
if (!$photos) {
	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="_center _gray">
		<div>
			  
		</div>
		
		<div class="_photos-item">
		<div class="_photos-item-padd">
		<div class="_photos-cont">
			<div class="_photos-ph">
				<div class="_photos-ph-t">
			
				<a href="/photos<?=$us['id']?>/view<?=$photos['id']?>">
					<img style="max-width: 100%; position: relative;border-radius: 5px;" src="<?= FILES_SERVER . system:: photosGetView($photos['hash'], (!$browser->isMobile() ? "4" : "3")) ?>">
				</a>
				</div>
			</div>
		</div>
		</div>
		
	</div> 
		<div class="_font-s">
		</div>
		</div>
	</div>
    <?= like::init()->createButton(like::PHOTO, [
                'id_post' => $photos['id'],
                'id_user' => $user['id'],
                'id_author' => $photos['id_user']
    ]) ?>
    <div class="tb-line"></div>
			<div class="tb-bloc"><div class="tb-cont tb-1">
			<div class="tb-item"><a href="/photos<?=$us['id']?>/view<?=$photos['id']?>" class="tb-c">Посмотреть аватар</a></div>
		</div>
		</div>
</div>
  
  