Файл: public_html/theme/dulat/main.php
Строк: 74
<?php
/**
* @package JohnCMS
* @link http://johncms.com
* @copyright Copyright (C) 2008-2011 JohnCMS Community
* @license LICENSE.txt (see attached file)
* @version VERSION.txt (see attached file)
* @author http://johncms.com/about
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
$mp = new mainpage();
/*
-----------------------------------------------------------------
Блок информации
-----------------------------------------------------------------
*/
echo'
<div class="towmenu">
<a href="#">Сілтеме</a>
<a href="#">Сілтеме</a>
<a href="#">Сілтеме</a>
</div>
<div class="phdr">Қош келдіңіз!</div>
';
echo $mp->news;
echo '<div class="menu"><a href="news/index.php">' . $lng['news_archive'] . '</a> (' . $mp->newscount . ')</div>' .
'<div class="menu"><a href="pages/faq.php">' . $lng['information'] . ', FAQ</a></div>';
echo '<div class="phdr">mp3 music</div>';
$i = 0;
include_once 'download/functions.php';
$zap = mysql_query("SELECT * FROM `downfiles` WHERE `type` != 1 AND `status` = 1 ORDER BY `time` DESC LIMIT 0,10");
while ($zap2 = mysql_fetch_array($zap)) {
echo ($i % 2) ? '<div class="list1">' : '<div class="list2">';
++$i;
$tf = pathinfo($zap2['way'], PATHINFO_EXTENSION); // Тип файла
if($tf == 'mp3'){
$set_view = array('variant' => 1, 'way_to_path' => 1);
}elseif((($tf == 'thm' or $tf == 'nth') && $down_setting['tmini']) || (($tf == '3gp' or $tf == 'mp4' or $tf == 'avi') && $down_setting['vmini']) || ($tf == 'jpg' or $tf == 'png' or $tf == 'jpeg' or $tf == 'gif')){
$set_view = array('link_download' => 1, 'div' => 1, 'way_to_path' => 1);
}else{
$set_view = array('variant' => 1,
'size' => 1, 'desc' => 1, 'count' => 1, 'div' => 1,
'comments' => 1, 'add_date' => 1, 'rating' => 1, 'way_to_path' => 1);
}
echo f_preview($zap2, $set_view, $tf);
echo '</div>';
}
/*
-----------------------------------------------------------------
Блок общения
-----------------------------------------------------------------
*/
// Ссылка на гостевую
if ($set['mod_guest'] || $rights >= 7)
echo '<div class="menu"><a href="guestbook/index.php">' . $lng['guestbook'] . '</a> (' . counters::guestbook() . ')</div>';
// Ссылка на Форум
if ($set['mod_forum'] || $rights >= 7)
echo '<div class="menu"><a href="forum/">' . $lng['forum'] . '</a> (' . counters::forum() . ')</div>';
/*
-----------------------------------------------------------------
Блок полезного
-----------------------------------------------------------------
*/
// Ссылка на загрузки
if ($set['mod_down'] || $rights >= 7)
echo '<div class="menu"><a href="download/">' . $lng['downloads'] . '</a> (' . counters::downloads() . ')</div>';
// Ссылка на библиотеку
if ($set['mod_lib'] || $rights >= 7)
echo '<div class="menu"><a href="library/">' . $lng['library'] . '</a> (' . counters::library() . ')</div>';
// Ссылка на библиотеку
if ($set['mod_gal'] || $rights >= 7)
echo '<div class="menu"><a href="gallery/">' . $lng['gallery'] . '</a> (' . counters::gallery() . ')</div>';
if ($user_id || $set['active']) {
echo ' ' .
'<div class="menu"><a href="users/index.php">' . $lng['users'] . '</a> (' . counters::users() . ')</div>' .
'<div class="menu"><a href="users/album.php">' . $lng['photo_albums'] . '</a> (' . counters::album() . ')</div>';
}
?>