Файл: 2/3020.ru/modules/news/plugins/news_list.php
Строк: 51
<?php
ECHO "<div class='list-menu'>";
ECHO "<table style='width: 100%;'><tr>";
ECHO "<td class='comments-avatar'>";
ECHO USER::AVATAR($list['USER_ID'], 50);
ECHO "</td>";
ECHO "<td class='comments-info'>";
ECHO USER::LOGIN($list['USER_ID'], 0, 1);
ECHO "<br /><span class='time'>".STIME($list['TIME'])."</span>";
ECHO "</td>";
ECHO "</tr></table>";
ECHO "<div style='margin-top: 8px; margin-bottom: 8px;'><a href='/modules/?path=news§ion=show&id=".$list['ID']."'><b>".CROP_TEXT(TEXT_ABSOLUTE($list['NAME']), 0, 80)."</b></a></div>";
$data2 = DB::GET_STRING_ALL("SELECT * FROM `ATTACHMENTS` WHERE (`TYPE` = 'photos' OR `TYPE` = 'videos') AND `ID_POST` = '".$list['ID']."' AND `NEWS` = '1' AND `ACT` = '1' ORDER BY `TIME` DESC LIMIT 1");
WHILE ($list2 = $data2->FETCH()){
REQUIRE (ROOT.'/users/attachments/plugins/inc_news_list.php');
}
ECHO "<div style='margin-top: 8px; margin-bottom: 8px;'>";
IF (STR($list['MESSAGE']) > 120){
ECHO "<div id='news".$list['ID']."' style='margin-top: 5px;'>";
ECHO CROP_TEXT(TEXT($list['MESSAGE'], 1, 1, 1, 0, 0), 0, 120);
ECHO "</div>";
ECHO "<div id='news2".$list['ID']."' style='display: none; margin-top: 5px;'>";
ECHO CROP_TEXT(TEXT($list['MESSAGE'], 1, 1, 1, 0, 0), 0, 1500);
ECHO "</div>";
?><a onclick="show_or_hide('news<?=$list['ID']?>', 'news2<?=$list['ID']?>', 'chevron<?=$list['ID']?>', 'opacity_message<?=$list['ID']?>')" load="none"><?
ECHO "<div id='chevron".$list['ID']."' class='chevron'><i class='fa fa-chevron-down fa-fw'></i></div>";
ECHO "</a>";
}ELSE{
ECHO TEXT($list['MESSAGE'], 1, 1, 1, 0, 0);
}
ECHO "</div>";
$count_like = DB::GET_COLUMN("SELECT COUNT(*) FROM `NEWS_LIKES` WHERE `NEWS_ID` = '".$list['ID']."'");
$count_eye = DB::GET_COLUMN("SELECT COUNT(*) FROM `NEWS_EYE` WHERE `NEWS_ID` = '".$list['ID']."'");
$count_comments = DB::GET_COLUMN("SELECT COUNT(*) FROM `NEWS_COMMENTS` WHERE `NEWS_ID` = '".$list['ID']."'");
ECHO "<a href='/modules/?path=news§ion=show&id=".$list['ID']."' class='btn-o'>".ICONS('heart', 15, 'fa-fw')." ".$count_like."</a>";
ECHO "<a href='/modules/?path=news§ion=show&id=".$list['ID']."' class='btn-o'>".ICONS('comment', 15, 'fa-fw')." ".$count_comments."</a>";
ECHO "<a href='/modules/?path=news§ion=show&id=".$list['ID']."' class='btn-o' style='float: right;'>".ICONS('eye', 15, 'fa-fw')." ".$count_eye."</a>";
ECHO "</div>";
?>