function web_statistics() { $content_template = $this->load_template($this->_template_root . 'web_statistics.xml'); $sm = vivvo_lite_site::get_instance(); $db =& $sm->get_db(); require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/core/Categories.class.php'; $cat_list = new Categories_list(); $content_template->assign('website_categories', strval($cat_list->get_count())); require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/core/Tags.class.php'; $tag_list = new Tags_list(); $content_template->assign('website_tags', strval($tag_list->get_count())); require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/core/Articles.class.php'; $articles_list = new Articles_list(); $content_template->assign('website_articles', strval($articles_list->get_count())); $content_template->assign('website_articles_active', strval($articles_list->get_count(array('search_status' => 1)))); $res = $db->query('SELECT sum(times_read) as times_view FROM ' . VIVVO_DB_PREFIX . 'articles_stats'); if (!PEAR::isError($res)) { if ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) { $times_view = $row['times_view']; } } $content_template->assign('website_articles_view', intval($times_view)); require_once VIVVO_FS_INSTALL_ROOT . 'lib/vivvo/core/Comments.class.php'; $comments_list = new Comments_list(); $content_template->assign('website_comments', strval($comments_list->get_count())); $user_mng = $sm->get_user_manager(); $user_list = $user_mng->get_user_list(); $content_template->assign('system_staff', strval($user_list->get_count(array('search_user_type' => 'staff')))); return $content_template->get_output(); }