Файл: 2/3020.ru/modules/blogs/content/index.php
Строк: 40
<?php
//Навигация
ECHO "<div class='navigation'>";
ECHO "<a href='/'>".ICONS('home', 25, 'fa-fw')."</a>";
ECHO "".ICONS('angle-right', 20, 'fa-fw')."";
ECHO "".LG('Блоги')."</a>";
ECHO "</div>";
ECHO "<div class='tmenu_body'>";
IF (GET('get') == 'rating'){
$sql = "ORDER BY `RATING` DESC";
$url = "&get=rating";
ECHO "<a href='/modules/?path=blogs' class='tmenu-33'>".LG('Новые')."</a>";
ECHO "<a href='/modules/?path=blogs&get=all' class='tmenu-33'>".LG('Все')."</a>";
ECHO "<a href='/modules/?path=blogs&get=rating' class='tmenu-33 tmenu-33-o'>".LG('По рейтингу')."</a>";
}ELSEIF (GET('get') == 'all'){
$sql = NULL;
$url = "&get=all";
ECHO "<a href='/modules/?path=blogs' class='tmenu-33'>".LG('Новые')."</a>";
ECHO "<a href='/modules/?path=blogs&get=all' class='tmenu-33 tmenu-33-o'>".LG('Все')."</a>";
ECHO "<a href='/modules/?path=blogs&get=rating' class='tmenu-33'>".LG('По рейтингу')."</a>";
}ELSE{
$sql = "ORDER BY `TIME` DESC";
$url = NULL;
ECHO "<a href='/modules/?path=blogs' class='tmenu-33 tmenu-33-o'>".LG('Новые')."</a>";
ECHO "<a href='/modules/?path=blogs&get=all' class='tmenu-33'>".LG('Все')."</a>";
ECHO "<a href='/modules/?path=blogs&get=rating' class='tmenu-33'>".LG('По рейтингу')."</a>";
}
ECHO "</div>";
//Поиск
REQUIRE (ROOT.'/modules/search/plugins/form/blogs.php');
ECHO "<div class='list'>";
IF (ISSET($user)){
ECHO "<a class='btn-o' href='/modules/?path=blogs§ion=users&id=".$user['ID']."'>".ICONS('user', 15, 'fa-fw')." ".LG('Мои записи')."</a>";
}
ECHO "<a class='btn-o' href='/modules/?path=blogs§ion=categories'>".ICONS('bars', 15, 'fa-fw')." ".LG('Категории')."</a>";
ECHO "</div>";
$column = DB::GET_COLUMN("SELECT COUNT(*) FROM `BLOGS` WHERE `PRIVATE` = '0' AND `PASSWORD` = '".NULL."'");
$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'>";
}
$data = DB::GET_STRING_ALL("SELECT * FROM `BLOGS` WHERE `PRIVATE` = '0' AND `PASSWORD` = '".NULL."' ".$sql." LIMIT ".$limit.", ".$page_settings."");
WHILE ($list = $data->FETCH())
{
REQUIRE (ROOT.'/modules/blogs/plugins/blogs_list.php');
}
IF ($column > 0){
ECHO "</div>";
}
IF ($spage > 1){ ECHO STR_PAGE('/modules/?path=blogs'.$url.'&', $spage, $page); }
IF (ISSET($user)){
ECHO "<div class='list'>";
ECHO "<a href='/modules/?path=blogs§ion=users&id=".$user['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 "".LG('Блоги')."</a>";
ECHO "</div>";
?>