File size: 1.9Kb
<?php
/*
*Manag-Develop BolCmS-Suptesat
*Syte- bolcms.cf
*/
$title = 'Админка';
require("../system/core.php");
switch($_GET['act']){
default:
echo '<div class="phdr">' .$lng ['admin'] . ' </div><div class="menu">';
$library = mysql_result(mysql_query("SELECT count(*) FROM `library`"), 0); // кол-о статей в библиотеке
$loads = mysql_result(mysql_query("SELECT count(*) FROM `loads`"), 0); // кол-о статей в библиотеке
$forum_topics = mysql_result(mysql_query("SELECT count(*) FROM `forum_topics`"), 0); // кол-о тем в форуме
$forum_msg = mysql_result(mysql_query("SELECT count(*) FROM `forum_msg`"), 0); // кол-о сообщений в форуме
$users = mysql_result(mysql_query("SELECT count(*) FROM `users`"), 0); // кол-о пользователей
echo '<div class="menu"><a href="loads.php"><li>' .$lng ['loads'] . ' </a> ('.$loads.')</div>';
echo '<div class="menu"><a href="forum.php"><li>' .$lng ['forum'] . ' </a> ('.$forum_topics.'/'.$forum_msg.')</div>';
// новости сайта
$news = mysql_fetch_assoc(mysql_query("SELECT * FROM `news` ORDER BY `time` DESC LIMIT 1"));
if(!isset($news['time'])){echo '<div class="menu"><a href="news.php"><li>' .$lng ['news'] . ' </a></div>';
}else{
echo '<div class="menu"><a href="news.php"><li>' .$lng ['news'] . ' </a> ('.date('d.m.Y / H:i', $news['time']).')</div>';
}
echo '<div class="menu"><a href="users.php"><li>' .$lng ['us'] . ' </a> ('.$users.')</div>';
echo '<div class="menu"><a href="system.php"><li>' .$lng ['sys'] . ' </a></div>';
echo '</div><div class="border"><a href="../">' .$lng ['niz'] . ' </a></div>';
break;
case 'exit':
unset($_SESSION['adm']);
echo '<div class="bmenu">' .$lng ['inf'] . ' </div><div class="bmenu">' .$lng ['ex'] . ' </div>';
echo '<div class="bmenu"><a href="../">' .$lng ['niz'] . ' </a></div>';
break;
}
require("../system/end.php");
?>