Пример #1
0
 public function tranxbyappbksubmitAction()
 {
     $array_of_params = $this->_request->getParams();
     $this->view->param = $array_of_params;
     if (!isset($array_of_params['fromdate']) || $array_of_params['fromdate'] == '' || !isset($array_of_params['todate']) || $array_of_params['todate'] == '') {
         echo 'from date and to date must be picked';
     } else {
         try {
             $fromdate = $array_of_params['fromdate'] . ' 00:00:00';
             $todate = $array_of_params['todate'] . ' 23:59:59';
             if (!isset($array_of_params['page']) || $array_of_params['page'] == '' || intval($array_of_params['page']) < 1) {
                 $array_of_params['page'] = 1;
             }
             $appIDs = array();
             $appserver = new AppInfo();
             if ($array_of_params['appid'] == '0') {
                 $allApps = $appserver->getAllAppInfo();
                 $allApps = $this->sortAppByID($allApps);
                 foreach ($allApps as $app) {
                     $appIDs['' . $app->appID] = $app->appName;
                 }
             } else {
                 $appIDs[$array_of_params['appid'] . ''] = $appserver->getAppName($array_of_params['appid']);
             }
             $count = 100;
             $index = intval($array_of_params['page']) * $count - $count;
             $reporter = new Reporter();
             $result = array();
             $keys = array_keys($appIDs);
             foreach ($keys as $appID) {
                 $result[] = $reporter->getTransByApp($appID, $fromdate, $todate, $index, $count);
             }
             $this->view->param = $array_of_params;
             $this->view->tranxs = $result;
         } catch (Exception $e) {
             var_dump($e);
             die;
         }
     }
     $appserver = new AppInfo();
     $allApps = $appserver->getAllAppInfo();
     $allApps = $this->sortAppByID($allApps);
     $this->view->allApps = $allApps;
     $this->view->frmSearch = $this->view->render('index/app_tranxbyapp_bk.phtml');
     $this->view->container = $this->view->render('index/index.phtml');
 }
Пример #2
0
 public function tranxbyappsubmitAction()
 {
     $array_of_params = $this->_request->getParams();
     $this->view->param = $array_of_params;
     if (!isset($array_of_params['fromdate']) || $array_of_params['fromdate'] == '' || !isset($array_of_params['todate']) || $array_of_params['todate'] == '') {
         $array_of_params['fromdate'] = date('Y-m-d', strtotime("now -1 day"));
         $array_of_params['todate'] = date('Y-m-d', strtotime("now -1 day"));
     }
     try {
         $fromdate = $array_of_params['fromdate'] . ' 00:00:00';
         $todate = $array_of_params['todate'] . ' 23:59:59';
         if (!isset($array_of_params['page']) || $array_of_params['page'] == '' || intval($array_of_params['page']) < 1) {
             $array_of_params['page'] = 1;
         }
         $count = 100;
         $index = intval($array_of_params['page']) * $count - $count;
         $reporter = new Reporter();
         $this->view->param = $array_of_params;
         $tranxs = $reporter->getTransByApp(self::getAppID(), $fromdate, $todate, $index, $count);
         $this->view->tranxs = $tranxs;
     } catch (Exception $e) {
         var_dump($e);
         die;
     }
     $this->view->frmSearch = $this->view->render('index/app_tranxbyapp.phtml');
     $this->view->container = $this->view->render('index/index.phtml');
 }