当前位置: 首页>>代码示例>>PHP>>正文


PHP Dropdown::ShowYesNo方法代码示例

本文整理汇总了PHP中Dropdown::ShowYesNo方法的典型用法代码示例。如果您正苦于以下问题:PHP Dropdown::ShowYesNo方法的具体用法?PHP Dropdown::ShowYesNo怎么用?PHP Dropdown::ShowYesNo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dropdown的用法示例。


在下文中一共展示了Dropdown::ShowYesNo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showFormInventory

 /**
  * Print the config form for restrictions
  *
  * @return Nothing (display)
  **/
 function showFormInventory()
 {
     global $DB, $CFG_GLPI;
     if (!self::canView()) {
         return false;
     }
     $canedit = Config::canUpdate();
     if ($canedit) {
         echo "<form name='form' action=\"" . Toolbox::getItemTypeFormURL(__CLASS__) . "\" method='post'>";
     }
     echo "<div class='center' id='tabsbody'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>" . __('Assets') . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td width='30%'>" . __('Enable the financial and administrative information by default') . "</td>";
     echo "<td  width='20%'>";
     Dropdown::ShowYesNo('auto_create_infocoms', $CFG_GLPI["auto_create_infocoms"]);
     echo "</td><td width='20%'> " . __('Restrict monitor management') . "</td>";
     echo "<td width='30%'>";
     $this->dropdownGlobalManagement("monitors_management_restrict", $CFG_GLPI["monitors_management_restrict"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'><td>" . __('Software category deleted by the dictionary rules') . "</td><td>";
     SoftwareCategory::dropdown(array('value' => $CFG_GLPI["softwarecategories_id_ondelete"], 'name' => "softwarecategories_id_ondelete"));
     echo "</td><td> " . __('Restrict device management') . "</td><td>";
     $this->dropdownGlobalManagement("peripherals_management_restrict", $CFG_GLPI["peripherals_management_restrict"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Beginning of fiscal year') . "</td><td>";
     Html::showDateField("date_tax", array('value' => $CFG_GLPI["date_tax"], 'maybeempty' => false, 'canedit' => true, 'min' => '', 'max' => '', 'showyear' => false));
     echo "</td><td> " . __('Restrict phone management') . "</td><td>";
     $this->dropdownGlobalManagement("phones_management_restrict", $CFG_GLPI["phones_management_restrict"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Automatic fields (marked by *)') . "</td><td>";
     $tab = array(0 => __('Global'), 1 => __('By entity'));
     Dropdown::showFromArray('use_autoname_by_entity', $tab, array('value' => $CFG_GLPI["use_autoname_by_entity"]));
     echo "</td><td> " . __('Restrict printer management') . "</td><td>";
     $this->dropdownGlobalManagement("printers_management_restrict", $CFG_GLPI["printers_management_restrict"]);
     echo "</td></tr>";
     echo "</table>";
     if (Session::haveRightsOr("transfer", array(CREATE, UPDATE)) && Session::isMultiEntitiesMode()) {
         echo "<br><table class='tab_cadre_fixe'>";
         echo "<tr><th colspan='2'>" . __('Automatic transfer of computers') . "</th></tr>";
         echo "<tr class='tab_bg_2'>";
         echo "<td>" . __('Template for the automatic transfer of computers in another entity') . "</td><td>";
         Transfer::dropdown(array('value' => $CFG_GLPI["transfers_id_auto"], 'name' => "transfers_id_auto", 'emptylabel' => __('No automatic transfer')));
         echo "</td></tr>";
         echo "</table>";
     }
     echo "<br><table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th colspan='4'>" . __('Automatically update of the elements related to the computers');
     echo "</th><th colspan='2'>" . __('Unit management') . "</th></tr>";
     echo "<tr><th>&nbsp;</th>";
     echo "<th>" . __('Alternate username') . "</th>";
     echo "<th>" . __('User') . "</th>";
     echo "<th>" . __('Group') . "</th>";
     echo "<th>" . __('Location') . "</th>";
     echo "<th>" . __('Status') . "</th>";
     echo "</tr>";
     $fields = array("contact", "user", "group", "location");
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . __('When connecting or updating') . "</td>";
     $values[0] = __('Do not copy');
     $values[1] = __('Copy');
     foreach ($fields as $field) {
         echo "<td>";
         $fieldname = "is_" . $field . "_autoupdate";
         Dropdown::showFromArray($fieldname, $values, array('value' => $CFG_GLPI[$fieldname]));
         echo "</td>";
     }
     echo "<td>";
     State::dropdownBehaviour("state_autoupdate_mode", __('Copy computer status'), $CFG_GLPI["state_autoupdate_mode"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . __('When disconnecting') . "</td>";
     $values[0] = __('Do not delete');
     $values[1] = __('Clear');
     foreach ($fields as $field) {
         echo "<td>";
         $fieldname = "is_" . $field . "_autoclean";
         Dropdown::showFromArray($fieldname, $values, array('value' => $CFG_GLPI[$fieldname]));
         echo "</td>";
     }
     echo "<td>";
     State::dropdownBehaviour("state_autoclean_mode", __('Clear status'), $CFG_GLPI["state_autoclean_mode"]);
     echo "</td></tr>";
     if ($canedit) {
         echo "<tr class='tab_bg_2'>";
         echo "<td colspan='6' class='center'>";
         echo "<input type='submit' name='update' class='submit' value=\"" . _sx('button', 'Save') . "\">";
         echo "</td></tr>";
     }
     echo "</table></div>";
     Html::closeForm();
//.........这里部分代码省略.........
开发者ID:UnidadInformaticaSERVIUVI,项目名称:Administrador-de-Inventario,代码行数:101,代码来源:config.class.php

示例2: showFormInventory

 /**
  * Print the config form for restrictions
  *
  * @return Nothing (display)
  **/
 function showFormInventory()
 {
     global $DB, $LANG, $CFG_GLPI;
     if (!haveRight("config", "w")) {
         return false;
     }
     echo "<form name='form' action=\"" . getItemTypeFormURL(__CLASS__) . "\" method='post'>";
     echo "<div class='center' id='tabsbody'>";
     echo "<input type='hidden' name='id' value='" . $CFG_GLPI["id"] . "'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>" . $LANG['Menu'][38] . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . $LANG['setup'][133] . "&nbsp;:</td><td>";
     Dropdown::showYesNo("use_ocs_mode", $CFG_GLPI["use_ocs_mode"]);
     echo "</td><td> " . $LANG['setup'][271] . "&nbsp;:</td>";
     echo "<td>";
     $this->dropdownGlobalManagement("monitors_management_restrict", $CFG_GLPI["monitors_management_restrict"]);
     echo "</td</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . $LANG['setup'][8] . "&nbsp;:</td><td>";
     Dropdown::ShowYesNo('auto_create_infocoms', $CFG_GLPI["auto_create_infocoms"]);
     echo "</td></td><td> " . $LANG['setup'][272] . "&nbsp;:</td><td>";
     $this->dropdownGlobalManagement("peripherals_management_restrict", $CFG_GLPI["peripherals_management_restrict"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'><td>" . $LANG['rulesengine'][86] . "&nbsp;:</td><td>";
     Dropdown::show('SoftwareCategory', array('value' => $CFG_GLPI["softwarecategories_id_ondelete"], 'name' => "softwarecategories_id_ondelete"));
     echo "</td><td> " . $LANG['setup'][273] . "&nbsp;:</td><td>";
     $this->dropdownGlobalManagement("phones_management_restrict", $CFG_GLPI["phones_management_restrict"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . $LANG['setup'][221] . "&nbsp;:</td><td>";
     showDateFormItem("date_tax", $CFG_GLPI["date_tax"], false, true, '', '', false);
     echo "</td><td> " . $LANG['setup'][275] . "&nbsp;:</td><td>";
     $this->dropdownGlobalManagement("printers_management_restrict", $CFG_GLPI["printers_management_restrict"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . $LANG['setup'][360] . "&nbsp;:</td><td>";
     $tab = array(0 => $LANG['common'][59], 1 => $LANG['entity'][8]);
     Dropdown::showFromArray('use_autoname_by_entity', $tab, array('value' => $CFG_GLPI["use_autoname_by_entity"]));
     echo "</td></td>";
     echo "<td colspan='2'>&nbsp;";
     echo "</td></tr>";
     echo "</table>";
     if (haveRight("transfer", "w") && isMultiEntitiesMode()) {
         echo "<br><table class='tab_cadre_fixe'>";
         echo "<tr><th colspan='2'>" . $LANG['setup'][290] . "</th></tr>";
         echo "<tr class='tab_bg_2'>";
         echo "<td>" . $LANG['setup'][291] . "&nbsp;:</td><td>";
         Dropdown::show('Transfer', array('value' => $CFG_GLPI["transfers_id_auto"], 'name' => "transfers_id_auto", 'emptylabel' => $LANG['setup'][292]));
         echo "</td></td></tr>";
         echo "</table>";
     }
     echo "<br><table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='6'>" . $LANG['setup'][280] . " (" . $LANG['peripherals'][32] . ")</th></tr>";
     echo "<tr><th>&nbsp;</th>";
     echo "<th>" . $LANG['common'][18] . "</th>";
     echo "<th>" . $LANG['common'][34] . "</th>";
     echo "<th>" . $LANG['common'][35] . "</th>";
     echo "<th>" . $LANG['common'][15] . "</th>";
     echo "<th>" . $LANG['state'][0] . "</th>";
     echo "</tr>";
     $fields = array("contact", "group", "location", "user");
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . $LANG['setup'][281] . "&nbsp;:</td>";
     $values[0] = $LANG['setup'][285];
     $values[1] = $LANG['setup'][283];
     foreach ($fields as $field) {
         echo "<td>";
         $fieldname = "is_" . $field . "_autoupdate";
         Dropdown::showFromArray($fieldname, $values, array('value' => $CFG_GLPI[$fieldname]));
         echo "</td>";
     }
     echo "<td>";
     State::dropdownBehaviour("state_autoupdate_mode", $LANG['setup'][197], $CFG_GLPI["state_autoupdate_mode"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td> " . $LANG['setup'][282] . "&nbsp;:</td>";
     $values[0] = $LANG['setup'][286];
     $values[1] = $LANG['setup'][284];
     foreach ($fields as $field) {
         echo "<td>";
         $fieldname = "is_" . $field . "_autoclean";
         Dropdown::showFromArray($fieldname, $values, array('value' => $CFG_GLPI[$fieldname]));
         echo "</td>";
     }
     echo "<td>";
     State::dropdownBehaviour("state_autoclean_mode", $LANG['setup'][196], $CFG_GLPI["state_autoclean_mode"]);
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td colspan='6' class='center'>";
     echo "<input type='submit' name='update' class='submit' value=\"" . $LANG['buttons'][2] . "\">";
     echo "</td></tr>";
     echo "</table></div>";
     echo "</form>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:100,代码来源:config.class.php


注:本文中的Dropdown::ShowYesNo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。