コード例 #1
0
 /**
  * 按小时统计详细_ajax
  */
 public function actionHourDetail()
 {
     Tools::import('Util_Stats');
     $utilStats = new Util_Stats(Util_Stats::STATS_OPERATOR);
     $key = $_POST['detail_key'];
     $time = array();
     $time['start'] = strtotime($_POST['start_date']);
     $time['end'] = strtotime($_POST['end_date']);
     $utilStats->setStatsTime($time);
     $utilStats->setOperator(array('game_type_id' => $_POST['game_type_id'], 'operator' => $_POST['operator_id']));
     $utilStats->setHour($key);
     $dataList = $utilStats->stats();
     $this->_view->assign('dataList', $dataList);
     $tableTitle = $utilStats->getTableTitle($_POST['game_type_id']);
     $tableTitle['time'] = $time;
     $this->_view->assign('tableTitle', $tableTitle);
     $this->_view->display('Stats/StatsOperator/OperatorDetail');
 }
コード例 #2
0
ファイル: StatsData.class.php プロジェクト: huangwei2wei/kfxt
 /**
  * 数据统计详细 ajax
  */
 public function actionDataDetail()
 {
     $date = array();
     ini_set('memory_limit', '256M');
     if ($_POST['date'] == 'total') {
         $date['start'] = strtotime($_POST['start_date']);
         $date['end'] = strtotime($_POST['end_date']);
     } else {
         $date['start'] = strtotime($_POST['date']);
         $date['end'] = strtotime('+1 day', $date['start']);
     }
     if ($_POST['key'] == 'total') {
         $users = $_POST['check_users'];
     } else {
         $users = $_POST['key'];
     }
     Tools::import('Util_Stats');
     $utilStats = new Util_Stats(Util_Stats::STATS_USER);
     $utilStats->setStatsTime($date);
     $utilStats->setUser($users);
     $utilStats->setGameType($_POST['game_type']);
     $dataList = $utilStats->stats();
     $tableTitle = $utilStats->getTableTitle();
     $tableTitle['time'] = $date;
     $this->_view->assign('dataList', $dataList);
     $this->_view->assign('tableTitle', $tableTitle);
     $this->_view->display();
 }