Exemplo n.º 1
0
    public function getBody()
    {
        $function = create_function('$data,$title', '
				$query = "";
				foreach ($data as $k => $v)
				{
					$query .= $k . "=" . urlencode ($v) . "&";
				}
				$query = substr ($query, 0, -1);
			
				if (is_array ($title))
				{
					return $title[0].\'<a href="\'.ABSOLUTE_URL.\'admin/messages/?\'.$query.\'">\'.$title[1].\'</a>\'.$title[2];
				}
				else
				{
					return \'<a href="\'.ABSOLUTE_URL.\'admin/messages/?\'.$query.\'">\'.$title.\'</a>\';
				}
			');
        $function2 = create_function('$userid,$title', '			
				return \'<a href="\'.ABSOLUTE_URL.\'admin/user/?id=\'.$userid.\'">\'.$title.\'</a>\';
			');
        $objMessages = new Neuron_Structure_Messages(Neuron_GameServer::getPlayer(), 25);
        $objMessages->setGetUrl($function);
        $objMessages->setUserUrl($function2);
        return $objMessages->getPageHTML($_GET);
    }
Exemplo n.º 2
0
 private function executeAction($data)
 {
     $params = json_decode($data['ma_data'], true);
     $target = false;
     if (isset($params['plid'])) {
         $target = Neuron_GameServer::getPlayer($params['plid']);
     }
     switch ($data['ma_action']) {
         case 'reset':
             $title = $params['title'];
             $message = $params['message'];
             $myself = Neuron_GameServer::getPlayer();
             $msgs = new Neuron_Structure_Messages($myself);
             $msgs->sendMessage($target, $title, $message);
             //customMail ($target->getEmail (), $title, $message);
             $target->execResetAccount();
             break;
     }
 }
Exemplo n.º 3
0
 public function getContent()
 {
     // Fetch thze model
     $login = Neuron_Core_Login::__getInstance();
     $text = Neuron_Core_Text::__getInstance();
     if ($login->isLogin()) {
         $player = Neuron_GameServer::getPlayer();
         if ($player->isBanned('messages')) {
             $end = $player->getBanDuration('messages');
             $duration = Neuron_Core_Tools::getCountdown($end);
             return '<p class="false">' . Neuron_Core_Tools::putIntoText($text->get('banned', 'messages', 'messages'), array('duration' => $duration)) . '</p>';
         } elseif (!$player->isEmailVerified()) {
             return '<p class="false">' . $text->get('validateEmail', 'main', 'account') . '</p>';
         } else {
             $objMessages = new Neuron_Structure_Messages($player);
             return $objMessages->getPageHTML($this->getInputData());
         }
     } else {
         $this->throwError($text->get('noLogin', 'main', 'main'));
     }
 }