當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Neuron_Core_Tools::getConfirmLink方法代碼示例

本文整理匯總了PHP中Neuron_Core_Tools::getConfirmLink方法的典型用法代碼示例。如果您正苦於以下問題:PHP Neuron_Core_Tools::getConfirmLink方法的具體用法?PHP Neuron_Core_Tools::getConfirmLink怎麽用?PHP Neuron_Core_Tools::getConfirmLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Neuron_Core_Tools的用法示例。


在下文中一共展示了Neuron_Core_Tools::getConfirmLink方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getStartVacation

 private function getStartVacation()
 {
     $myself = Neuron_GameServer::getPlayer();
     $input = $this->getInputData();
     $page = new Neuron_Core_Template();
     if (isset($input['confirm']) && Neuron_Core_Tools::checkConfirmLink($input['confirm'])) {
         if ($myself->startVacationMode()) {
             $page->set('done', true);
         } else {
             $page->set('done', false);
             $page->set('error', $myself->getError());
         }
     } else {
         $page->set('done', false);
     }
     $page->set('checkkey', Neuron_Core_Tools::getConfirmLink());
     return $page->parse('gameserver/account/vacationMode.phpt');
 }
開發者ID:catlabinteractive,項目名稱:dolumar-engine,代碼行數:18,代碼來源:Vacation.php

示例2: getUpgradeTechnology

 public function getUpgradeTechnology($input)
 {
     $s_technology = $input['technology'];
     $technologies = $this->getTechnologyUpgrades();
     $text = Neuron_Core_Text::__getInstance();
     $text->setFile('building');
     $text->setSection('technology');
     $page = new Neuron_Core_Template();
     $page->set('title', $text->get('technology'));
     $village = $this->getVillage();
     if (in_array($s_technology, $technologies) && !$village->hasTechnology($s_technology, true)) {
         $technology = Dolumar_Technology_Technology::getTechnology($s_technology);
         $showForm = true;
         if ($technology->canResearch($this)) {
             if (isset($input['confirm']) && Neuron_Core_Tools::checkConfirmLink($input['confirm'])) {
                 $cost = $technology->getResearchCost();
                 if (isset($cost['runeId']) && $cost['runeId'] == 'random' && isset($input['runeSelection'])) {
                     $cost['runeId'] = $input['runeSelection'];
                 }
                 if ($village->resources->takeResourcesAndRunes($cost)) {
                     if ($village->trainTechnology($technology)) {
                         $showForm = false;
                         $page->set('done', $text->get('done'));
                         reloadStatusCounters();
                     } else {
                         $page->set('error', 'Error: couldn\'t start the research.');
                     }
                 } else {
                     $page->set('error', $text->get('notEnoughResources'));
                 }
             }
             if ($showForm) {
                 $page->set('youSure', Neuron_Core_Tools::putIntoText($text->get('youSure'), array(Neuron_Core_Tools::output_varchar($technology->getName()))));
                 $page->set('description', Neuron_Core_Tools::output_varchar($technology->getDescription()));
                 $page->set('cost', Neuron_Core_Tools::putIntoText($text->get('costTime'), array($this->resourceToText($technology->getResearchCost(), true, true, false, $this->getBuildingId()))));
                 $page->set('duration', Neuron_Core_Tools::putIntoText($text->get('duration'), array(Neuron_Core_Tools::getDuration($technology->getDuration()))));
                 $page->set('confirm', $text->getClickto($text->get('toConfirm')));
                 $page->set('technology', $s_technology);
                 $page->set('confirmation', Neuron_Core_Tools::getConfirmLink());
             }
         } else {
             return '<p>Invalid input: technology not researchable.</p>';
         }
     } else {
         $page->set('notFound', $text->get('notFound'));
     }
     $page->set('return', $text->getClickto($text->get('toReturn')));
     return $page->parse('buildings/general_tech.tpl');
 }
開發者ID:Toxicat,項目名稱:dolumar,代碼行數:49,代碼來源:Building.php


注:本文中的Neuron_Core_Tools::getConfirmLink方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。