示例#1
0
 public function tranxinfoAction()
 {
     $array_of_params = $this->_request->getParams();
     $fromdate = $array_of_params['fromdate'] . ' 00:00:00';
     $todate = $array_of_params['fromdate'] . ' 23:59:59';
     $tReport = new TReport();
     $tranx = $tReport->getTransByUser('', $array_of_params['tranxid'], $fromdate, $todate, 0, 10);
     if (count($tranx) == 1) {
         $tranx = $tranx[0];
         $appserver = new AppInfo();
         echo 'array.push(' . $tranx->amount . ');';
         echo 'array.push("Hoàn lại ' . $tranx->amount . ' Zing Xu cho giao dịch mua ' . $tranx->itemNames . ' game ' . $appserver->getAppName($tranx->agentID) . ' (mã: ' . $array_of_params['tranxid'] . ')");';
         echo 'array.push("' . $tranx->userName . '");';
     } else {
         echo 'array.push(-1);';
         echo 'array.push("Không tồn tại giao dịch");';
     }
     die;
 }
示例#2
0
 public function tranxbyappsummarysubmitAction()
 {
     $array_of_params = $this->_request->getParams();
     if (!isset($array_of_params['fromdate']) || $array_of_params['fromdate'] == '' || !isset($array_of_params['todate']) || $array_of_params['todate'] == '' || !isset($array_of_params['appid'])) {
         $array_of_params['fromdate'] = date('Y-m-d', strtotime("now -1 day"));
         $array_of_params['todate'] = date('Y-m-d', strtotime("now -1 day"));
         $array_of_params['radiogroup'] = 1;
         $array_of_params['appid'] = 0;
     }
     $this->view->param = $array_of_params;
     $fromdate = $array_of_params['fromdate'] . ' 00:00:00';
     $todate = $array_of_params['todate'] . ' 23:59:59';
     $appIDs = array();
     $appserver = new AppInfo();
     if ($array_of_params['appid'] == '0') {
         $appIDs = $this->view->uApps;
     } else {
         $appIDs[$array_of_params['appid'] . ''] = $appserver->getAppName($array_of_params['appid']);
     }
     $reporter = new Reporter();
     $result = array();
     $keys = array_keys($appIDs);
     foreach ($keys as $appID) {
         $subresult = array();
         switch ($array_of_params['radiogroup']) {
             case 1:
                 $subresult = $reporter->summaryDaily($appID, $fromdate, $todate);
                 break;
             case 2:
                 $subresult = $reporter->summary($appID, $fromdate, $todate);
                 break;
         }
         if (count($subresult) > 0 && $subresult[0]['appID'] != null) {
             $result[] = $subresult;
         }
     }
     if ($array_of_params['export'] == 'csv') {
         $this->exportCSV($result);
         die;
     } else {
         $this->view->data = $result;
         $this->view->frmSearch = $this->view->render('index/app_tranxbyapp_summary.phtml');
         $this->view->container = $this->view->render('index/index.phtml');
     }
 }