Beispiel #1
0
 public function adjustUser($userID, $adjustMoney, $adminSig, $reason)
 {
     try {
         $this->connect();
         $this->transport->open();
         $list = $this->client->adjustUser($userID, $adjustMoney, $adminSig, $reason, AdminHandle::getClientIP(), time());
         $this->transport->close();
     } catch (Exception $e) {
         $this->transport->close();
         throw $e;
     }
     return $list;
 }
Beispiel #2
0
 public function useradjustsubmitAction()
 {
     if (!$this->isValidUserAdjust()) {
         $this->_forward('useradjust', null, null, array('validate' => $this->emptyField));
         return;
     }
     try {
         $array_of_params = $this->_request->getParams();
         $appserver = new AdminHandle();
         $response = $appserver->adjustUser($this->getUserFromParam($array_of_params), $array_of_params['balance'], $this->adminSig, $array_of_params['reason']);
         if ($response == '0') {
             $messages = 'Chỉnh sửa số ZingXu thành công cho "' . $this->view->username . '" với số Xu đã chỉnh sửa là: ' . $array_of_params['balance'];
         } else {
             $messages = 'Chỉnh sửa ZingXu thất bại với mã lỗi = ' . $response;
         }
         $this->_forward('useradjust', null, null, array('messages' => $messages));
     } catch (Exception $e) {
         var_dump($e);
         die;
     }
 }