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


PHP Horde_Form::Horde_Form方法代碼示例

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


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

示例1: ServerSettings

 function ServerSettings(&$vars)
 {
     parent::Horde_Form($vars);
     $this->addHidden('', 'actionId', 'text', true);
     $vars->set('actionId', 'serversettings');
     $this->addVariable(_("Server Name"), 'servername', 'text', true);
     $this->addVariable(_("Server Port"), 'port', 'int', false);
     $this->addVariable(_("Player Password"), 'playerpass', 'text', false);
     $this->addVariable(_("DM Password"), 'dmpass', 'text', false);
     $this->addVariable(_("Maximum Clients"), 'maxclients', 'int', true);
     $this->addVariable(_("Minimum Player Level"), 'minlevel', 'int', true);
     $this->addVariable(_("Maximum Player Level"), 'maxlevel', 'int', true);
     $this->addVariable(_("Pause And Play"), 'pauseandplay', 'enum', true, false, null, array(array('0' => 'DM Only', '1' => 'DM and Players')));
     $this->addVariable(_("Player Vs Player"), 'pvp', 'enum', true, false, null, array(array('0' => 'None', '1' => 'Party Only', '2' => 'Free For All')));
     $this->addVariable(_("Server Vault"), 'servervault', 'enum', true, false, null, array(array('0' => 'Local Characters Only', '1' => 'Server Characters Only')));
     $this->addVariable(_("Enforce Legal Characters"), 'elc', 'enum', true, false, null, array(array('1' => 'Enforce Legal Characters', '0' => 'Any Characters')));
     $this->addVariable(_("Item Level Restrictions"), 'ilr', 'enum', true, false, null, array(array('1' => 'Enforce Item Restrictions', '0' => 'Any Items')));
     $this->addVariable(_("Game Type"), 'gametype', 'enum', true, false, null, array(array('0' => 'Action', '1' => 'Story', '2' => 'Story Lite', '3' => 'Role Play', '4' => 'Team', '5' => 'Melee', '6' => 'Arena', '7' => 'Aocial', '8' => 'Alternative', '9' => 'PW Action', '10' => 'PW Story', '11' => 'Solo', '12' => 'Tech Support')));
     $this->addVariable(_("Parties"), 'oneparty', 'enum', true, false, null, array(array('0' => 'One Party', '1' => 'Multiple Parties')));
     $this->addVariable(_("Difficulty"), 'difficulty', 'enum', true, false, null, array(array('1' => 'Easy', '2' => 'Normal', '3' => 'D&D Hardcore', '4' => 'Insane')));
     $this->addVariable(_("Auto Save Interval"), 'autosaveinterval', 'int', true, false, _("In minutes, use 0 to disable"));
     $this->addVariable(_("Persistence"), 'reloadwhenempty', 'enum', true, false, null, array(array('0' => 'Persistent Module', '1' => 'Reload When Empty')));
     $this->addVariable(_("Server Visibility"), 'publicserver', 'enum', true, false, null, array(array('0' => 'Private', '1' => 'Public')));
     $this->setTitle(_("Configure Server Settings"));
     $this->setButtons(_("Update Config"));
 }
開發者ID:penguincoder,項目名稱:nwnadmin,代碼行數:26,代碼來源:ServerForms.php

示例2: NewNWNModule

 function NewNWNModule(&$vars)
 {
     parent::Horde_Form($vars);
     $this->addVariable(_("New Module"), 'module', 'file', true);
     $this->setTitle(_("Upload New Module"));
     $this->setButtons(_("Upload"));
     $this->useToken(true);
 }
開發者ID:penguincoder,項目名稱:nwnadmin,代碼行數:8,代碼來源:ModuleForms.php


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