/** * site statistics */ public function index() { $site_detail = Mysite::instance()->detail(); $statking_id = $site_detail['statking_id']; /* 初始化默认查询条件 */ $query_struct = array('where' => array(), 'like' => array(), 'orderby' => array(), 'limit' => array()); $data = array(); $data['count_ip'] = 0; $data['sum_order'] = Myorder::instance()->sum(); $data['count_order_user'] = Myorder::instance()->count_order_user(); $data['count_order'] = Myorder::instance()->query_count($query_struct); $data['count_user'] = Myuser::instance()->query_count($query_struct); $average_data = statistics::get_average_data($data); $this->template->content = new View("site/statistics"); $this->template->content->average_data = $average_data; }