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


PHP Dropdown::getYesNo方法代码示例

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


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

示例1: pdfMain

 static function pdfMain(PluginPdfSimplePDF $pdf, KnowbaseItem $item)
 {
     global $DB;
     $ID = $item->getField('id');
     if (!Session::haveRight('knowbase', 'r') || !Session::haveRight('faq', 'r')) {
         return false;
     }
     $knowbaseitemcategories_id = $item->getField('knowbaseitemcategories_id');
     $fullcategoryname = Html::clean(getTreeValueCompleteName("glpi_knowbaseitemcategories", $knowbaseitemcategories_id));
     $question = Html::clean(Toolbox::unclean_cross_side_scripting_deep(html_entity_decode($item->getField('name'), ENT_QUOTES, "UTF-8")));
     $answer = Html::clean(Toolbox::unclean_cross_side_scripting_deep(html_entity_decode($item->getField('answer'), ENT_QUOTES, "UTF-8")));
     $pdf->setColumnsSize(100);
     if (Toolbox::strlen($fullcategoryname) > 0) {
         $pdf->displayTitle('<b>' . __('Category name') . '</b>');
         $pdf->displayLine($fullcategoryname);
     }
     if (Toolbox::strlen($question) > 0) {
         $pdf->displayTitle('<b>' . __('Subject') . '</b>');
         $pdf->displayText('', $question, 5);
     } else {
         $pdf->displayTitle('<b>' . __('No question found', 'pdf') . '</b>');
     }
     if (Toolbox::strlen($answer) > 0) {
         $pdf->displayTitle('<b>' . __('Content') . '</b>');
         $pdf->displayText('', $answer, 5);
     } else {
         $pdf->displayTitle('<b>' . __('No answer found') . '</b>');
     }
     $pdf->setColumnsSize(50, 15, 15, 10, 10);
     $pdf->displayTitle(__('Writer'), __('Creation date'), __('Last update'), __('FAQ'), _n('View', 'Views', 2));
     $pdf->displayLine(getUserName($item->fields["users_id"]), Html::convDateTime($item->fields["date"]), Html::convDateTime($item->fields["date_mod"]), Dropdown::getYesNo($item->fields["is_faq"]), $item->fields["view"]);
     $pdf->displaySpace();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:33,代码来源:knowbaseitem.class.php

示例2: getDatasForTemplate

 /**
  * @see NotificationTarget::getDatasForTemplate()
  **/
 function getDatasForTemplate($event, $options = array())
 {
     global $CFG_GLPI;
     $events = $this->getAllEvents();
     $this->datas['##recall.action##'] = $events[$event];
     $this->datas['##recall.itemtype##'] = $this->target_object->getTypeName(1);
     $this->datas['##recall.item.URL##'] = '';
     // For task show parent link
     if ($this->target_object instanceof CommonDBChild || $this->target_object instanceof CommonITILTask) {
         $item2 = $this->target_object->getItem();
         $this->datas['##recall.item.url##'] = urldecode($CFG_GLPI["url_base"] . "/index.php" . "?redirect=" . strtolower($item2->getType()) . "_" . $item2->getID());
     } else {
         $this->datas['##recall.item.url##'] = urldecode($CFG_GLPI["url_base"] . "/index.php" . "?redirect=" . strtolower($this->target_object->getType()) . "_" . $this->target_object->getID());
     }
     $this->datas['##recall.item.name##'] = '';
     if ($this->target_object->isField('name')) {
         $this->datas['##recall.item.name##'] = $this->target_object->getField('name');
     } else {
         if (($item2 = $this->target_object->getItem()) && $item2->isField('name')) {
             $this->datas['##recall.item.name##'] = $item2->getField('name');
         }
     }
     $this->datas['##recall.item.content##'] = '';
     if ($this->target_object->isField('content')) {
         $this->datas['##recall.item.content##'] = $this->target_object->getField('content');
     }
     if ($this->target_object->isField('text')) {
         $this->datas['##recall.item.content##'] = $this->target_object->getField('text');
     }
     $this->datas['##recall.item.private##'] = '';
     if ($this->target_object->isField('is_private')) {
         $this->datas['##recall.item.private##'] = Dropdown::getYesNo($this->target_object->getField('is_private'));
     }
     $this->datas['##recall.item.date_mod##'] = '';
     if ($this->target_object->isField('date_mod')) {
         $this->datas['##recall.item.date_mod##'] = Html::convDateTime($this->target_object->getField('date_mod'));
     }
     $this->datas['##recall.item.user##'] = '';
     $user_tmp = new User();
     if ($user_tmp->getFromDB($this->target_object->getField('users_id'))) {
         $this->datas['##recall.item.user##'] = $user_tmp->getName();
     }
     $this->datas['##recall.planning.state##'] = '';
     if ($this->target_object->isField('state')) {
         $this->datas['##recall.planning.state##'] = Planning::getState($this->target_object->getField('state'));
     }
     $this->datas['##recall.planning.begin##'] = Html::convDateTime($this->target_object->getField('begin'));
     $this->datas['##recall.planning.end##'] = Html::convDateTime($this->target_object->getField('end'));
     $this->getTags();
     foreach ($this->tag_descriptions[NotificationTarget::TAG_LANGUAGE] as $tag => $values) {
         if (!isset($this->datas[$tag])) {
             $this->datas[$tag] = $values['label'];
         }
     }
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:58,代码来源:notificationtargetplanningrecall.class.php

示例3: showTestResults

 function showTestResults($rule, $output, $global_result)
 {
     global $LANG;
     $actions = $rule->getActions();
     echo "<tr><th colspan='4'>" . $LANG['rulesengine'][81] . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td class='center' colspan='4'>" . $LANG['rulesengine'][41] . " : <strong> " . Dropdown::getYesNo($global_result) . "</strong></td>";
     if (isset($output["_ldap_rules"]["rules_entities"])) {
         echo "<tr class='tab_bg_2'>";
         echo "<td class='center' colspan='4'>" . $LANG['rulesengine'][111] . "</td>";
         foreach ($output["_ldap_rules"]["rules_entities"] as $entities) {
             foreach ($entities as $entity) {
                 $this->displayActionByName("entity", $entity[0]);
                 if (isset($entity[1])) {
                     $this->displayActionByName("recursive", $entity[1]);
                 }
             }
         }
     }
     if (isset($output["_ldap_rules"]["rules_rights"])) {
         echo "<tr class='tab_bg_2'>";
         echo "<td colspan='4' class='center'>" . $LANG['rulesengine'][110] . "</td>";
         foreach ($output["_ldap_rules"]["rules_rights"] as $val) {
             $this->displayActionByName("profile", $val[0]);
         }
     }
     if (isset($output["_ldap_rules"]["rules_entities_rights"])) {
         echo "<tr class='tab_bg_2'>";
         echo "<td colspan='4' class='center'>" . $LANG['rulesengine'][112] . "</td>";
         foreach ($output["_ldap_rules"]["rules_entities_rights"] as $val) {
             $this->displayActionByName("entity", $val[0]);
             if (isset($val[1])) {
                 $this->displayActionByName("profile", $val[1]);
             }
             if (isset($val[2])) {
                 $this->displayActionByName("is_recursive", $val[2]);
             }
         }
     }
     if (isset($output["_ldap_rules"])) {
         unset($output["_ldap_rules"]);
     }
     foreach ($output as $criteria => $value) {
         if (isset($actions[$criteria])) {
             // ignore _* fields
             echo "<tr class='tab_bg_2'>";
             echo "<td class='center'>" . $actions[$criteria]["name"] . "</td>";
             echo "<td class='center'>" . $rule->getActionValue($criteria, $value) . "</td></tr>\n";
         }
     }
     echo "</tr>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:52,代码来源:rulerightcollection.class.php

示例4: getFormData

 /**
  * return the display data for a specific device
  *
  * @return array
  **/
 function getFormData()
 {
     global $LANG;
     $data['label'] = $data['value'] = array();
     if ($this->fields["is_atx"]) {
         $data['label'][] = $LANG['device_power'][1];
         $data['value'][] = Dropdown::getYesNo($this->fields["is_atx"]);
     }
     if (!empty($this->fields["power"])) {
         $data['label'][] = $LANG['device_power'][0];
         $data['value'][] = $this->fields["power"];
     }
     return $data;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:19,代码来源:devicepowersupply.class.php

示例5: pdfMain

 static function pdfMain(PluginPdfSimplePDF $pdf, Group $item)
 {
     $ID = $item->getField('id');
     $pdf->setColumnsSize(50, 50);
     $pdf->displayTitle('<b>' . sprintf(__('%1$s %2$s'), __('ID'), $item->fields['id']) . '</b>', sprintf(__('%1$s: %2$s'), __('Last update'), Html::convDateTime($item->fields['date_mod'])));
     $pdf->setColumnsSize(100);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Complete name') . '</i></b>', $item->fields['completename']));
     $pdf->setColumnsSize(50, 50);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Child entities') . '</i></b>', Dropdown::getYesNo($item->fields['is_recursive'])), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Can be notified') . '</i></b>', Dropdown::getYesNo($item->fields['is_notify'])));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), sprintf(__('%1$s - %2$s'), __('Visible in a ticket'), __('Requester')) . '</i></b>', Dropdown::getYesNo($item->fields['is_requester'])), '<b><i>' . sprintf(__('%1$s: %2$s'), sprintf(__('%1$s - %2$s'), _('Visible in a ticket'), __('Assigned to')) . '</i></b>', Dropdown::getYesNo($item->fields['is_assign'])));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), sprintf(__('%1$s - %2$s'), __('Can contain'), _n('Item', 'Items', 2)) . '</i></b>', Dropdown::getYesNo($item->fields['is_itemgroup'])), '<b><i>' . sprintf(__('%1$s: %2$s'), sprintf(__('%1$s - %2$s'), __('Can contain'), _n('User', 'Users', 2)) . '</i></b>', Dropdown::getYesNo($item->fields['is_usergroup'])));
     PluginPdfCommon::mainLine($pdf, $item, 'comment');
     $pdf->displaySpace();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:14,代码来源:group.class.php

示例6: getFormData

 /**
  * return the display data for a specific device
  *
  * @return array
  **/
 function getFormData()
 {
     global $LANG;
     $data['label'] = $data['value'] = array();
     if ($this->fields["is_raid"]) {
         $data['label'][] = $LANG['device_control'][0];
         $data['value'][] = Dropdown::getYesNo($this->fields["is_raid"]);
     }
     if ($this->fields["interfacetypes_id"]) {
         $data['label'][] = $LANG['common'][65];
         $data['value'][] = Dropdown::getDropdownName("glpi_interfacetypes", $this->fields["interfacetypes_id"]);
     }
     return $data;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:19,代码来源:devicecontrol.class.php

示例7: showCacheRuleDetail

 function showCacheRuleDetail($fields)
 {
     global $LANG;
     echo "<td class='tab_bg_2'>" . $fields["old_value"] . "</td>";
     echo "<td class='tab_bg_2'>" . $fields["manufacturer"] . "</td>";
     echo "<td class='tab_bg_2'>" . ($fields["new_value"] != '' ? $fields["new_value"] : $LANG['rulesengine'][106]) . "</td>";
     echo "<td class='tab_bg_2'>" . ($fields["is_global"] != '' ? Dropdown::getGlobalSwitch($fields["is_global"]) : $LANG['rulesengine'][106]) . "</td>";
     echo "<td class='tab_bg_2'>" . (isset($fields["new_manufacturer"]) && $fields["new_manufacturer"] != '' ? Dropdown::getDropdownName("glpi_manufacturers", $fields["new_manufacturer"]) : $LANG['rulesengine'][106]) . "</td>";
     echo "<td class='tab_bg_2'>";
     if ($fields["ignore_ocs_import"] == '') {
         echo "&nbsp;";
     } else {
         echo Dropdown::getYesNo($fields["ignore_ocs_import"]);
     }
     echo "</td>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:16,代码来源:ruledictionnaryprinter.class.php

示例8: getHTMLTableCellForItem

 /**
  * @since version 0.84
  *
  * @see CommonDevice::getHTMLTableCellForItem()
  **/
 function getHTMLTableCellForItem(HTMLTableRow $row = NULL, CommonDBTM $item = NULL, HTMLTableCell $father = NULL, array $options = array())
 {
     $column = parent::getHTMLTableCellForItem($row, $item, $father, $options);
     if ($column == $father) {
         return $father;
     }
     switch ($item->getType()) {
         case 'Computer':
             Manufacturer::getHTMLTableCellsForItem($row, $this, NULL, $options);
             if ($this->fields["assettag"]) {
                 $row->addCell($row->getHeaderByName('devicebiosdata_tag'), Dropdown::getYesNo($this->fields["assettag"]), $father);
             }
             if ($this->fields["date"]) {
                 $row->addCell($row->getHeaderByName('devicebiosdata_date'), $this->fields["date"], $father);
             }
     }
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:22,代码来源:devicebiosdata.class.php

示例9: pdfForGroup

 static function pdfForGroup(PluginPdfSimplePDF $pdf, Group $group, $tree)
 {
     global $DB, $CFG_GLPI;
     $used = array();
     $ids = array();
     // Retrieve member list
     $entityrestrict = Group_User::getDataForGroup($group, $used, $ids, '', $tree);
     $title = "<b>" . sprintf(__('%1$s (%2$s)'), _n('User', 'Users', 2) . "</b>", __('D=Dynamic'));
     $number = count($used);
     if ($number > $_SESSION['glpilist_limit']) {
         $title = sprintf(__('%1$s (%2$s)'), $title, $_SESSION['glpilist_limit'] . "/" . $number);
     } else {
         $title = sprintf(__('%1$s (%2$s)'), $title, $number);
     }
     $pdf->setColumnsSize(100);
     $pdf->displayTitle($title);
     if ($number) {
         $user = new User();
         $group = new Group();
         if ($tree) {
             $pdf->setColumnsSize(35, 45, 10, 10);
             $pdf->displayTitle(User::getTypeName(1), Group::getTypeName(1), __('Manager'), __('Delegatee'));
         } else {
             $pdf->setColumnsSize(60, 20, 20);
             $pdf->displayTitle(User::getTypeName(1), __('Manager'), __('Delegatee'));
         }
         for ($i = 0; $i < $number && $i < $_SESSION['glpilist_limit']; $i++) {
             $data = $used[$i];
             $name = Html::clean(getUserName($data["id"]));
             if ($data["is_dynamic"]) {
                 $name = sprintf(__('%1$s (%2$s)'), $name, '<b>' . __('D') . '</b>');
             }
             if ($tree) {
                 $group->getFromDB($data["groups_id"]);
                 $pdf->displayLine($name, $group->getName(), Dropdown::getYesNo($data['is_manager']), Dropdown::getYesNo($data['is_userdelegate']));
             } else {
                 $pdf->displayLine($name, Dropdown::getYesNo($data['is_manager']), Dropdown::getYesNo($data['is_userdelegate']));
             }
         }
     } else {
         $pdf->setColumnsAlign('center');
         $pdf->displayLine(__('No item found'));
     }
     $pdf->displaySpace();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:45,代码来源:group_user.class.php

示例10: getFormData

 /**
  * return the display data for a specific device
  *
  * @return array
  **/
 function getFormData()
 {
     global $LANG;
     $data['label'] = $data['value'] = array();
     if ($this->fields["is_writer"]) {
         $data['label'][] = $LANG['device_drive'][0];
         $data['value'][] = Dropdown::getYesNo($this->fields["is_writer"]);
     }
     if (!empty($this->fields["speed"])) {
         $data['label'][] = $LANG['device_drive'][1];
         $data['value'][] = $this->fields["speed"];
     }
     if ($this->fields["interfacetypes_id"]) {
         $data['label'][] = $LANG['common'][65];
         $data['value'][] = Dropdown::getDropdownName("glpi_interfacetypes", $this->fields["interfacetypes_id"]);
     }
     return $data;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:23,代码来源:devicedrive.class.php

示例11: pdfMain

 static function pdfMain(PluginPdfSimplePDF $pdf, Phone $item)
 {
     PluginPdfCommon::mainTitle($pdf, $item);
     PluginPdfCommon::mainLine($pdf, $item, 'name-status');
     PluginPdfCommon::mainLine($pdf, $item, 'location-type');
     PluginPdfCommon::mainLine($pdf, $item, 'tech-manufacturer');
     PluginPdfCommon::mainLine($pdf, $item, 'group-model');
     PluginPdfCommon::mainLine($pdf, $item, 'contactnum-serial');
     PluginPdfCommon::mainLine($pdf, $item, 'contact-otherserial');
     PluginPdfCommon::mainLine($pdf, $item, 'user-management');
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Group') . '</i></b>', Html::clean(Dropdown::getDropdownName('glpi_groups', $item->fields['groups_id']))), '<b><i>' . sprintf(__('%1$s: %2$s'), __('Power supply') . '</i></b>', Dropdown::getYesNo($item->fields['phonepowersupplies_id'])));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Brand') . '</i></b>', $item->fields['brand']), '<b><i>' . sprintf(__('%1$s: %2$s'), _x('quantity', 'Number of lines') . '</i></b>', $item->fields['number_line']));
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), _n('Firmware', 'Firmwares', 1) . '</i></b>', $item->fields['firmware']));
     $opts = array('have_headset' => __('Headset'), 'have_hp' => __('Speaker'));
     foreach ($opts as $key => $val) {
         if (!$item->fields[$key]) {
             unset($opts[$key]);
         }
     }
     $pdf->setColumnsSize(100);
     $pdf->displayLine('<b><i>' . sprintf(__('%1$s: %2$s'), __('Flags') . '</i></b>', count($opts) ? implode(', ', $opts) : __('None')));
     PluginPdfCommon::mainLine($pdf, $item, 'comment');
     $pdf->displaySpace();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:24,代码来源:phone.class.php

示例12: showTestResults

 /**
  * Show test results for a rule
  *
  * @param $rule rule object
  * @param $output Output data array
  * @param $global_result boolean : global result
  *
  * @return cleaned array
  **/
 function showTestResults($rule, $output, $global_result)
 {
     global $LANG;
     $actions = $rule->getActions();
     echo "<table class='tab_cadrehov'>";
     echo "<tr><th colspan='2'>" . $LANG['rulesengine'][81] . "</th></tr>\n";
     echo "<tr class='tab_bg_1'>";
     echo "<td colspan='2' class='center'>" . $LANG['rulesengine'][41] . "&nbsp;:&nbsp;<strong> " . Dropdown::getYesNo($global_result) . "</strong></td>";
     $output = $this->preProcessPreviewResults($output);
     foreach ($output as $criteria => $value) {
         if (isset($actions[$criteria])) {
             echo "<tr class='tab_bg_2'>";
             echo "<td>" . $actions[$criteria]["name"] . "</td>";
             echo "<td>" . $rule->getActionValue($criteria, $value) . "</td>";
             echo "</tr>\n";
         }
     }
     echo "</tr></table>\n";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:28,代码来源:rulecollection.class.php

示例13: getHTMLTableCellForItem

 /**
  * @since version 0.84
  *
  * @see CommonDevice::getHTMLTableCellForItem()
  **/
 function getHTMLTableCellForItem(HTMLTableRow $row = NULL, CommonDBTM $item = NULL, HTMLTableCell $father = NULL, array $options = array())
 {
     $column = parent::getHTMLTableCellForItem($row, $item, $father, $options);
     if ($column == $father) {
         return $father;
     }
     switch ($item->getType()) {
         case 'Computer':
             Manufacturer::getHTMLTableCellsForItem($row, $this, NULL, $options);
             if ($this->fields["is_writer"]) {
                 $row->addCell($row->getHeaderByName('devicedrive_writer'), Dropdown::getYesNo($this->fields["is_writer"]), $father);
             }
             if ($this->fields["speed"]) {
                 $row->addCell($row->getHeaderByName('devicedrive_speed'), $this->fields["speed"], $father);
             }
             InterfaceType::getHTMLTableCellsForItem($row, $this, NULL, $options);
     }
 }
开发者ID:kipman,项目名称:glpi,代码行数:23,代码来源:devicedrive.class.php

示例14: showForm

 /**
  * Print the rssfeed form
  *
  * @param $ID        integer  Id of the item to print
  * @param $options   array    of possible options:
  *     - target filename : where to go when done.
  **/
 function showForm($ID, $options = array())
 {
     global $CFG_GLPI;
     // Test _rss cache directory. I permission trouble : unable to edit
     if (Toolbox::testWriteAccessToDirectory(GLPI_RSS_DIR) > 0) {
         echo "<div class='center'>";
         printf(__('Check permissions to the directory: %s'), GLPI_RSS_DIR);
         echo "<p class='red b'>" . __('Error') . "</p>";
         echo "</div>";
         return false;
     }
     $this->initForm($ID, $options);
     $canedit = $this->can($ID, UPDATE);
     $this->showFormHeader($options);
     $rowspan = 4;
     if (!$this->isNewID($ID)) {
         // Force getting feed :
         $feed = self::getRSSFeed($this->fields['url'], $this->fields['refresh_rate']);
         if (!$feed || $feed->error()) {
             $this->setError(true);
         } else {
             $this->setError(false);
         }
         echo "<tr class='tab_bg_2'>";
         echo "<td>" . __('Name') . "</td>";
         echo "<td>";
         Html::autocompletionTextField($this, "name", array('entity' => -1, 'user' => $this->fields["users_id"]));
         echo "</td><td colspan ='2'>&nbsp;</td></tr>\n";
     }
     echo "<tr class='tab_bg_1'><td>" . __('URL') . "</td>";
     echo "<td colspan='3'>";
     echo "<input type='text' name='url' size='100' value='" . $this->fields["url"] . "'>";
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('By') . "</td>";
     echo "<td>";
     echo getUserName($this->fields["users_id"]);
     echo "<input type='hidden' name='users_id' value='" . $this->fields['users_id'] . "'>\n";
     echo "</td>";
     echo "<td rowspan='{$rowspan}'>" . __('Comments') . "</td>";
     echo "<td rowspan='{$rowspan}' class='middle'>";
     echo "<textarea cols='45' rows='" . ($rowspan + 3) . "' name='comment' >" . $this->fields["comment"] . "</textarea>";
     echo "</td></tr>\n";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Active') . "</td>";
     echo "<td>";
     Dropdown::showYesNo('is_active', $this->fields['is_active']);
     echo "</td></tr>\n";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Refresh rate') . "</td>";
     echo "<td>";
     Dropdown::showTimeStamp("refresh_rate", array('value' => $this->fields["refresh_rate"], 'min' => HOUR_TIMESTAMP, 'max' => DAY_TIMESTAMP, 'step' => HOUR_TIMESTAMP, 'display_emptychoice' => false, 'toadd' => array(5 * MINUTE_TIMESTAMP, 15 * MINUTE_TIMESTAMP, 30 * MINUTE_TIMESTAMP, 45 * MINUTE_TIMESTAMP)));
     echo "</td></tr>\n";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Number of items displayed') . "</td>";
     echo "<td>";
     Dropdown::showNumber("max_items", array('value' => $this->fields["max_items"], 'min' => 5, 'max' => 100, 'step' => 5, 'toadd' => array(1), 'display_emptychoice' => false));
     echo "</td></tr>\n";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Error retrieving RSS feed') . "</td>";
     echo "<td>";
     echo Dropdown::getYesNo($this->fields['have_error']);
     echo "</td>";
     if ($this->fields['have_error']) {
         echo "<td>" . __('RSS feeds found');
         echo "</td><td>";
         $this->showDiscoveredFeeds();
         echo "</td>\n";
     } else {
         echo "<td colspan='2'>&nbsp;</td>";
     }
     echo "</tr>";
     $this->showFormButtons($options);
     return true;
 }
开发者ID:stweil,项目名称:glpi,代码行数:82,代码来源:rssfeed.class.php

示例15: showUsersAssociated

 /**
  * show tooltip for user notification informations
  *
  * @param $type integer : user type
  * @param $canedit boolean : can edit ?
  *
  * @return nothing display
  **/
 function showUsersAssociated($type, $canedit)
 {
     global $CFG_GLPI, $LANG;
     $showuserlink = 0;
     if (haveRight('user', 'r')) {
         $showuserlink = 2;
     }
     $usericon = self::getActorIcon('user', $type);
     $user = new User();
     if (isset($this->users[$type]) && count($this->users[$type])) {
         foreach ($this->users[$type] as $k => $d) {
             $save_showuserlink = $showuserlink;
             echo "{$usericon}&nbsp;";
             if ($k) {
                 $userdata = getUserName($k, $showuserlink);
             } else {
                 $email = $d['alternative_email'];
                 $userdata = "<a href='mailto:{$email}'>{$email}</a>";
                 $showuserlink = false;
             }
             if ($showuserlink) {
                 echo $userdata['name'] . "&nbsp;" . showToolTip($userdata["comment"], array('link' => $userdata["link"], 'display' => false));
             } else {
                 echo $userdata;
             }
             if ($CFG_GLPI['use_mailing']) {
                 $text = $LANG['job'][19] . "&nbsp;:&nbsp;" . Dropdown::getYesNo($d['use_notification']) . '<br>';
                 if ($d['use_notification']) {
                     $uemail = $d['alternative_email'];
                     if (empty($uemail) && $user->getFromDB($d['users_id'])) {
                         $uemail = $user->getField('email');
                     }
                     $text .= $LANG['mailing'][118] . "&nbsp;:&nbsp;" . $uemail;
                     if (!NotificationMail::isUserAddressValid($uemail)) {
                         $text .= "<span class='red'>" . $LANG['mailing'][110] . "</span>";
                     }
                 }
                 echo "&nbsp;";
                 if ($canedit || $d['users_id'] == getLoginUserID()) {
                     $opt = array('img' => $CFG_GLPI['root_doc'] . '/pics/edit.png', 'popup' => 'edit_user_notification&amp;id=' . $d['id']);
                     showToolTip($text, $opt);
                 }
             }
             if ($canedit) {
                 echo "&nbsp;<a href='" . $CFG_GLPI["root_doc"] . "/front/ticket.form.php?delete_user=delete_user&amp;id=" . $d['id'] . "&amp;tickets_id=" . $this->fields['id'] . "' title=\"" . $LANG['buttons'][6] . "\">\n                     <img src='" . $CFG_GLPI["root_doc"] . "/pics/delete.png'\n                     alt=\"" . $LANG['buttons'][6] . "\" title=\"" . $LANG['buttons'][6] . "\"></a>";
             }
             echo "<br>";
             $showuserlink = $save_showuserlink;
         }
     }
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:59,代码来源:ticket.class.php


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