Пример #1
0
 // Start counter
 $pgen = Neuron_Core_PGen::__getInstance();
 $pgen->start();
 // Fetch input
 $output_type = Neuron_Core_Tools::getInput('_REQUEST', 'output', 'varchar', false);
 $output = array();
 $output['request'] = $_GET;
 $output['content'] = array();
 // Requests
 switch ($request) {
     case 'invitation':
         $id = Neuron_Core_Tools::getInput('_REQUEST', 'id', 'int', false);
         $player = Neuron_GameServer::getPlayer($id);
         if ($player->isFound()) {
             $sender = Neuron_GameServer_Player::getFromOpenID(Neuron_Core_Tools::getInput('_REQUEST', 'sender', 'varchar'));
             $receiver = Neuron_GameServer_Player::getFromOpenID(Neuron_Core_Tools::getInput('_REQUEST', 'receiver', 'varchar'));
             if (!$receiver) {
                 // We have to somehow queue it.
             } else {
                 $receiver->invitationGiftReceiver($_REQUEST, $sender);
                 $sender->invitationGiftSender($_REQUEST, $receiver);
             }
         }
         break;
     case 'phpinfo':
         phpinfo();
         exit;
         break;
     case 'getlogs':
         $id = Neuron_Core_Tools::getInput('_GET', 'id', 'int', isset($sInputs[2]) ? $sInputs[2] : 0);
         $start = Neuron_Core_Tools::getInput('_GET', 'start', 'int', 0);