<?php
if ($data['count_photos'] > 0) {
	echo"<div class='app-container'>
      <div class='app-user--sections' id='uphoto'>
        <div class='app-user--sections--name'>
          <a href='/photos{$data['id']}' title='Фотографии'>".language::text('photo', $language,'profile')."
            <span class='app-sections--counter'>{$data['count_photos']}</span>
          </a>
        </div>

        <div class='app-user--sections--main'>";
    $pho = DB :: $pdo -> query("SELECT * FROM `photos` WHERE `id_user` = ?  ORDER by `time` DESC LIMIT 8", array($data['id'])); #Переменная фото
                $i = 0;
		        $in = 0;
	    	while($r = $pho -> fetch()) {
			++$i;
         
        echo"<div class='app-user--sections--item'>
            <a href='/photos{$data['id']}/view{$r['id']}'>
              <img class='app--sections--photo' src='".FILES_SERVER.system :: photosGetView($r['hash'],1)."'>
            </a>
          </div>";
}
       
echo"</div>
    </div>
    <a class='app-user--sections--show' href='#show-all'>
        Показать все фотографии
        </a>
    </div>";
	}