<?php
function get_stats() {
	global $DB;
	
	$stat = array();
	$stat['cate_webdir'] = $DB->get_count($DB->table('categories'), array('cate_mod' => 'webdir'));
	$stat['website'] = $DB->get_count($DB->table('website'));
	$stat['apply'] = $DB->get_count($DB->table('website'), array('web_status' => 2));
	$stat['user'] = $DB->get_count($DB->table('users'), 'user_type' != 'admin');
	$stat['adver'] = $DB->get_count($DB->table('advers'));
	$stat['link'] = $DB->get_count($DB->table('links'));
	$stat['feedback'] = $DB->get_count($DB->table('feedback'));
	$stat['label'] = $DB->get_count($DB->table('labels'));
	$stat['page'] = $DB->get_count($DB->table('pages'));
	$stat['cate_article'] = $DB->get_count($DB->table('categories'), array('cate_mod' => 'article'));
    $stat['article'] = $DB->get_count($DB->table('articles'));
	$stat['game'] = $DB->get_count($DB->table('games'));
	$stat['cate_game'] = $DB->get_count($DB->table('categories'), array('cate_mod' => 'game'));
	$stat['video'] = $DB->get_count($DB->table('videos'));
	$stat['cate_video'] = $DB->get_count($DB->table('categories'), array('cate_mod' => 'video'));

	return $stat;
}
?>