/**
  * @see WOTAPIAction::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     $this->userID = intval($this->data['userid']);
     $this->username = WOTAPIUtil::escape($this->data['username']);
     $this->email = WOTAPIUtil::escape($this->data['username']);
 }
 /**
  * @see WOTAPIAction::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     $this->userID = intval($this->data['userid']);
     if (isset($this->data['coordchanges'])) {
         echo '#', StringUtil::trim(WOTAPIUtil::unescape($this->data['coordchanges'])), '#';
         $this->coordChanges = unserialize(StringUtil::trim(WOTAPIUtil::unescape($this->data['coordchanges'])));
     }
     if (isset($this->data['send'])) {
         $this->send = (bool) $this->data['send'];
     }
 }
 /**
  * @see WOTAPIAction::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     //$this->pbuID = intval($this->data['pbuid']);
     $this->userID = intval($this->data['userid']);
     $this->serverID = intval($this->data['serverid']);
     $this->time = intval($this->data['time']);
     $this->pbuStr = WOTAPIUtil::unescape($this->data['pbustr']);
     if (isset($this->data['recover'])) {
         $this->recover = (bool) $this->data['recover'];
     }
 }
 /**
  * @see WOTAPIAction::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     $this->user = unserialize(gzuncompress(StringUtil::trim(WOTAPIUtil::unescape($this->data['user']))));
     $this->user_option_value = unserialize(gzuncompress(StringUtil::trim(WOTAPIUtil::unescape($this->data['user_option_value']))));
     $this->user_to_groups = unserialize(gzuncompress(StringUtil::trim(WOTAPIUtil::unescape($this->data['user_to_groups']))));
     if (isset($this->data['delete'])) {
         $this->delete = (bool) intval(StringUtil::trim($this->data['delete']));
     }
     if (isset($this->data['useridsstr'])) {
         $this->userIDsStr = StringUtil::trim(WOTAPIUtil::unescape($this->data['useridsstr']));
     }
     $this->userCount = intval($this->data['userscount']);
     $this->userValid = StringUtil::trim($this->data['usersvalid']);
 }
 /**
  * Sends the output and closes the connection.
  * 
  * @param	string	message
  * @param	int		state
  * @param	array	data
  */
 public function send($message = 'OK', $state = 100, $data = array())
 {
     $output = "";
     $output .= $this->crypter->encryptToText("STATE: " . WOTAPIUtil::escape($state)) . "\n";
     $output .= $this->crypter->encryptToText("MESSAGE: " . WOTAPIUtil::escape($message)) . "\n";
     foreach ($data as $name => $date) {
         $output .= $this->crypter->encryptToText("DATA_" . StringUtil::toUpperCase($name) . ":" . WOTAPIUtil::escape($date)) . "\n";
         echo $this->crypter->encryptToText("DATA_" . StringUtil::toUpperCase($name) . ":" . WOTAPIUtil::escape($date)) . "\n";
     }
     $output .= "\n";
     $this->write($output);
     echo $output;
     //echo $this->read_buffer;
     flush();
     if ($this->connection == 'Close') {
         // write() will close for us
         echo 'closed';
     }
 }
 /**
  * Sends the output and closes the connection.
  * 
  * @param	string	message
  * @param	int		state
  * @param	array	data
  */
 public function send($message = 'OK', $state = 100, $data = array())
 {
     $output = "";
     foreach ($data as $name => $date) {
         $output .= "DATA_" . StringUtil::toUpperCase($name) . ":" . WOTAPIUtil::escape($date) . "\n";
     }
     $output .= "STATE: " . WOTAPIUtil::escape($state) . "\n";
     $output .= "MESSAGE: " . WOTAPIUtil::escape($message) . "\n";
     $output .= "\n";
     $this->write($output);
     echo $output;
     //echo $this->read_buffer;
     flush();
     if ($this->connection == 'Close') {
         // close connection
         /*$this->close();
         		$this->disconnected = true;
         		$this->socket = intval($this->socket);
         		
         		// execute event handler
         		$this->onDisconnect();*/
         echo 'closed';
     }
 }
 /**
  * @see WOTAPIAction::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     $this->userIDsStr = WOTAPIUtil::escape($this->data['useridsstr']);
 }