Размер файла: 2.15Kb
- <?php
- define('_IN_JOHNCMS', 1);
-
- $headmod = 'lib';
- $textl = 'Библиотека';
- require_once ("../incfiles/core.php");
- require_once ("./inc/conf.php");
- // Ограничиваем доступ к Библиотеке
- if (!$set['mod_lib'] && $rights < 7)
- $error = 'Библиотека закрыта';
- elseif ($set['mod_lib'] == 1 && !$user_id)
- $error = 'Доступ в Библиотеку открыт только <a href="../in.php">авторизованным</a> посетителям';
- if ($error) {
- require_once ("../incfiles/head.php");
- echo '<div class="rmenu"><p>' . $error . '</p></div>';
- require_once ("../incfiles/end.php");
- exit;
- }
- require_once ("../incfiles/head.php");
- if($rights == 5 || $rights >= 6)
- {
- echo '<div class="gmenu"><a href="admin.php"><strong>Управление библиотекой</strong></a></div>';
- $co = mysql_result(mysql_query("select COUNT(*) from `library` where `moder` = '0' and `type` = 'file'"),0);
- if($co > 0)
- {
- echo '<div class="menu"><strong>'.$co.'</strong> статей ожидают модерации перейти к ним <a href="mod.php">>>></a></div>';
- }
- }
- $count_dir = mysql_result(mysql_query("select COUNT(*) from `library` where `type` = 'dir'"),0);
- $count_file = mysql_result(mysql_query("select COUNT(*) from `library` where `type` = 'file' and `moder` = '1'"),0);
- $count_new_file = mysql_result(mysql_query("select COUNT(*) from `library` where `type` = 'file' and `path` LIKE '/%' and `time` > '".($realtime -($new_fil * 24 * 3600) )."' and `moder` = '1'"),0);
- $count_s = mysql_result(mysql_query("select SUM(count) from `library` where `type` = 'file' and `moder` = '1'"),0);
- echo '<div class="gmenu">';
- echo 'Всего категорий:<strong>'.$count_dir.'</strong><br/>';
- echo 'Всего книг:<strong>'.$count_file.'</strong><br/>';
- echo 'Всего новых книг:<strong>'.$count_new_file.'</strong><br/>';
- echo 'Всего прочтений:<strong>'.$count_s.'</strong><br/>';
- echo '</div>';
-
- echo '<br/><a href="index.php?">В библиотеку</a><br/>';
- require_once ('../incfiles/end.php');
- ?>