вроде он <?php
/**
* MobileCMS
*
* Open source content management system for mobile sites
*
* @author MobileCMS Team <support@mobilecms.ru>
* @copyright Copyright (c) 2011, MobileCMS Team
* @link http://mobilecms.ru Official site
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
defined('IN_SYSTEM') or die('<b>403<br />Запрет доступа!</b>');
/**
* Виджет гостевой книги
*/
class forum_widget {
/**
* Показ виджета
*/
public static function display($widget_id) {
$db = Registry::get('db');
$stat = $db->get_row("SELECT
(SELECT COUNT(*) FROM a_forum_topics) AS topics,
(SELECT COUNT(*) FROM a_forum_messages) AS messages,
(SELECT COUNT(*) FROM a_forum_topics WHERE time > UNIX_TIMESTAMP() - 3600 * 24) AS new_topics,
(SELECT COUNT(*) FROM a_forum_messages WHERE time > UNIX_TIMESTAMP() - 3600 * 24) AS new_messages
");