<?php
  
//Навигация
ECHO "<div class='navigation'>";
ECHO "<a href='/'>".ICONS('home', 25, 'fa-fw')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities'>".LG('Сообщества')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities&section=show&id=".$comm['ID']."'>".TEXT_ABSOLUTE($comm['NAME'])."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities&section=forum_section&id=".$comm['ID']."'>".LG('Форум')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities&section=forum_section_themes&id=".$section['ID']."'>";
ECHO TEXT_ABSOLUTE($section['NAME'])."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO TEXT_ABSOLUTE($fthem['NAME']);
ECHO "</div>";

$column = DB::GET_COLUMN("SELECT COUNT(`ID`) FROM `COMMUNITIES_FORUM_THEM_LIKES` WHERE `THEM_ID` = '".$fthem['ID']."'");
$spage = SPAGE($column, $page_settings);
$page = PAGE($spage);
$limit = $page_settings * $page - $page_settings;
                         
IF ($column == 0){
  
  HTML::EMPTY();
  
}ELSE{
  
  ECHO "<div class='list-body'>";
  
  ECHO "<div class='list-menu'>";
  ECHO " ".LG('Тему оценили').":";
  ECHO "</div>";
  
}

$data = DB::GET_STRING_ALL("SELECT * FROM `COMMUNITIES_FORUM_THEM_LIKES` WHERE `THEM_ID` = '".$fthem['ID']."' ORDER BY `TIME` DESC LIMIT ".$limit.", ".$page_settings."");
  
WHILE ($list = $data->FETCH()){
  
  ECHO "<div class='list-menu'>";
  
  USER::LOGIN($list['USER_ID'], 1, 1);
  
  ECHO "<span class='time'>- ".FTIME($list['TIME'])."</span>";
  
  ECHO "</div>";
  
}

IF ($column > 0){

  ECHO "</div>";
  
}

IF ($spage > 1){ ECHO STR_PAGE('/modules/?path=communities&section=forum_them_show&id='.$fthem['ID'].'&get=like_list&', $spage, $page); }

ECHO "<div class='list'>";
ECHO "<a href='/modules/?path=communities&section=forum_them_show&id=".$fthem['ID']."'>".ICONS('arrow-left', 15, 'fa-fw')." ".LG('Назад')."</a>";
ECHO "</div>";
  
//Навигация
ECHO "<div class='navigation'>";
ECHO "<a href='/'>".ICONS('home', 25, 'fa-fw')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities'>".LG('Сообщества')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities&section=show&id=".$comm['ID']."'>".TEXT_ABSOLUTE($comm['NAME'])."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities&section=forum_section&id=".$comm['ID']."'>".LG('Форум')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "<a href='/modules/?path=communities&section=forum_section_themes&id=".$section['ID']."'>";
ECHO TEXT_ABSOLUTE($section['NAME'])."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO TEXT_ABSOLUTE($fthem['NAME']);
ECHO "</div>";

REQUIRE (ROOT.'/system/connections/footer.php');
EXIT;
  
?>