Файл: modules/index/index.php
Строк: 73
<?php
$totalThreads = DB::run()->querySingle("select count(`id`) from `forum_threads`;");
$totalPosts = DB::run()->querySingle("select count(`id`) from `forum_posts`;");
$totalPosts_new = DB::run()->querySingle("select count(`id`) from `forum_posts` where `time` > ?;", array(TIME - 24 * 3600));
$totalPosts_new = $totalPosts_new ? ' <font color="green">+'.$totalPosts_new.'</font>' : FALSE;
$totalGuestbook = DB::run()->querySingle("select count(`id`) from `guestbook`;");
$totalGuestbook_new = DB::run()->querySingle("select count(`id`) from `guestbook` where `time` > ?;", array(TIME - 24 * 3600));
$totalGuestbook .= $totalGuestbook_new ? ' <font color="green">+'.$totalGuestbook_new.'</font>' : FALSE;
$totalBlogsPosts = DB::run()->querySingle("select count(`id`) from `blogs_posts`;");
$totalBlogsPosts_new = DB::run()->querySingle("select count(`id`) from `blogs_posts` where `time` > ?;", array(TIME - 24 * 3600));
$totalBlogsPosts .= $totalBlogsPosts_new ? ' <font color="green">+'.$totalBlogsPosts_new.'</font>' : FALSE;
$totalDownloads = DB::run()->querySingle("select count(`id`) from `downloads_posts`;");
$totalDownloads_new = DB::run()->querySingle("select count(`id`) from `downloads_posts` where `time` > ?;", array(TIME - 24 * 3600));
$totalDownloads .= $totalDownloads_new ? ' <font color="green">+'.$totalDownloads_new.'</font>' : FALSE;
$lang['Welcome_username'] = str_replace('%username%', is_auth() ? $u['username'] : $lang['Guest'], $lang['Welcome_username']);
$config['newtitle'] = $lang['Welcome_username'];
$tpl['file'] = 'index';
require_once 'core/header.php';