当前位置: 首页>>代码示例>>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;未经允许,请勿转载。