|
<?php
##Счетчики для главной страницы
$sql1 = $db->super_query("SELECT * FROM `news` ORDER BY `id` DESC LIMIT 1");
$count_news = $db->super_query('select count(id) as count from `news`');
$nkom = $db->super_query('select count(id) as count from `news_com` where `news` = "'.$sql1['id'].'"');
$nf = $db->super_query('select count(id) as count from `photo_files` where `time` > "'.(TIME - ((60 * 60) * 24)).'"');
$t_f = $db->super_query('select count(id) as count from `forum_tema`');
$p_f = $db->super_query('select count(id) as count from `forum_post`');
$ntf = $db->super_query('select count(id) as count from `forum_tema` where `time` > "'.(TIME - ((60 * 60) * 24)).'"');
$npf = $db->super_query('select count(id) as count from `forum_post` where `time` > "'.(TIME - ((60 * 60) * 24)).'"');
$df = $db->super_query("SELECT count(id) as count FROM `load_file`");
$ndf = $db->super_query('select count(id) as count FROM `load_file` WHERE `time` > "'.(TIME - ((60 * 60) * 24)).'"');
$guest = $db->super_query("SELECT count(id) as count FROM `guest`");
$lib = $db->super_query("SELECT count(id) as count FROM `lib_stat`");
$album = $db->super_query("SELECT count(id) as count FROM `photo_album`");
$album2 = $db->super_query("SELECT count(id) as count FROM `photo_files`");
$blog = $db->super_query("SELECT count(id) as count FROM `blog_stat`");
$alluser = $db->super_query("SELECT COUNT(*) as count FROM `users`");
?>