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


PHP Dropdown::getDeviceItemTypes方法代码示例

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


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

示例1: title

 function title()
 {
     Dropdown::showItemTypeMenu(_n('Component', 'Components', Session::getPluralNumber()), Dropdown::getDeviceItemTypes(), $this->getSearchURL());
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:4,代码来源:commondevice.class.php

示例2: array

LICENSE

This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::haveRightsOr('device', array(CREATE, UPDATE, PURGE));
Html::header(_n('Component', 'Components', 2), $_SERVER['PHP_SELF'], "config", "commondevice");
echo "<div class='center'>";
$optgroup = Dropdown::getDeviceItemTypes();
Dropdown::showItemTypeMenu(_n('Component', 'Components', 2), $optgroup);
Dropdown::showItemTypeList($optgroup);
echo "</div>";
Html::footer();
开发者ID:jose-martins,项目名称:glpi,代码行数:30,代码来源:device.php

示例3: foreach

    $_REQUEST["dropdown"] = $_REQUEST["dropdown"];
}
if (empty($_REQUEST["dropdown"])) {
    $_REQUEST["dropdown"] = "ComputerType";
}
echo "<div data-role='collapsible' data-collapsed='true'>";
echo "<h2>" . $LANG['buttons'][0] . "</h2>";
echo "<form method='post' name='form' action='/glpi/plugins/mobile/front/stat.location.php'>";
echo "<select name='dropdown'>";
echo "<optgroup label='" . $LANG['setup'][0] . "'>";
echo "<option value='ComputerType' " . ($_REQUEST["dropdown"] == "ComputerType" ? "selected" : "") . ">" . $LANG['common'][17] . "</option>";
echo "<option value='ComputerModel' " . ($_REQUEST["dropdown"] == "ComputerModel" ? "selected" : "") . ">" . $LANG['common'][22] . "</option>";
echo "<option value='OperatingSystem' " . ($_REQUEST["dropdown"] == "OperatingSystem" ? "selected" : "") . ">" . $LANG['computers'][9] . "</option>";
echo "<option value='Location' " . ($_REQUEST["dropdown"] == "Location" ? "selected" : "") . ">" . $LANG['common'][15] . "</option>";
echo "</optgroup>";
$devices = Dropdown::getDeviceItemTypes();
foreach ($devices as $label => $dp) {
    echo "<optgroup label='{$label}'>";
    foreach ($dp as $i => $name) {
        echo "<option value='{$i}' " . ($_REQUEST["dropdown"] == $i ? "selected" : "") . ">{$name}</option>";
    }
    echo "</optgroup>";
}
echo "</select><br /><br />";
echo "<label for='date1'><b>" . $LANG['search'][8] . "&nbsp;:</b></label><br />";
echo "<input type='date' name='date1' id='date1' value='" . $_REQUEST["date1"] . "' /><br /><br />";
echo "<label for='date2'><b>" . $LANG['search'][9] . "&nbsp;:</b></label><br />";
echo "<input type='date' name='date2' id='date2' value='" . $_REQUEST["date2"] . "' /><br /><br />";
echo "<b>" . $LANG['stats'][7] . "&nbsp;:</b><br />";
Dropdown::showYesNo('showgraph', $_REQUEST['showgraph']);
echo "<br /><input type='submit' class='button' name='submit' value='" . $LANG['buttons'][7] . "' data-inline='true' data-theme='a'>";
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:31,代码来源:stat.locationccc.php

示例4: commonHeader


//.........这里部分代码省略.........
        $menu['admin']['content']['log']['title'] = $LANG['Menu'][30];
        $menu['admin']['content']['log']['shortcut'] = 'l';
        $menu['admin']['content']['log']['page'] = '/front/event.php';
    }
    /// CONFIG
    $config = array();
    $addconfig = array();
    $menu['config']['title'] = $LANG['common'][12];
    if (haveRight("dropdown", "r") || haveRight("entity_dropdown", "r")) {
        $menu['config']['content']['dropdowns']['title'] = $LANG['setup'][0];
        $menu['config']['content']['dropdowns']['page'] = '/front/dropdown.php';
        $menu['config']['default'] = '/front/dropdown.php';
        if ($item == "dropdowns") {
            $dps = Dropdown::getStandardDropdownItemTypes();
            foreach ($dps as $tab) {
                foreach ($tab as $key => $val) {
                    if ($key == $option) {
                        $tmp = new $key();
                        $menu['config']['content']['dropdowns']['options'][$option]['title'] = $val;
                        $menu['config']['content']['dropdowns']['options'][$option]['page'] = $tmp->getSearchURL(false);
                        $menu['config']['content']['dropdowns']['options'][$option]['links']['search'] = $tmp->getSearchURL(false);
                        if ($tmp->canCreate()) {
                            $menu['config']['content']['dropdowns']['options'][$option]['links']['add'] = $tmp->getFormURL(false);
                        }
                    }
                }
            }
        }
    }
    if (haveRight("device", "w")) {
        $menu['config']['content']['device']['title'] = $LANG['title'][30];
        $menu['config']['content']['device']['page'] = '/front/device.php';
        if ($item == "device") {
            $dps = Dropdown::getDeviceItemTypes();
            foreach ($dps as $tab) {
                foreach ($tab as $key => $val) {
                    if ($key == $option) {
                        $tmp = new $key();
                        $menu['config']['content']['device']['options'][$option]['title'] = $val;
                        $menu['config']['content']['device']['options'][$option]['page'] = $tmp->getSearchURL(false);
                        $menu['config']['content']['device']['options'][$option]['links']['search'] = $tmp->getSearchURL(false);
                        if ($tmp->canCreate()) {
                            $menu['config']['content']['device']['options'][$option]['links']['add'] = $tmp->getFormURL(false);
                        }
                    }
                }
            }
        }
    }
    if ($CFG_GLPI['use_mailing'] && haveRight("notification", "r") || haveRight("config", "w")) {
        $menu['config']['content']['mailing']['title'] = $LANG['setup'][704];
        $menu['config']['content']['mailing']['page'] = '/front/setup.notification.php';
        $menu['config']['content']['mailing']['options']['notification']['title'] = $LANG['setup'][704];
        $menu['config']['content']['mailing']['options']['notification']['page'] = '/front/notification.php';
        $menu['config']['content']['mailing']['options']['notification']['links']['add'] = '/front/notification.form.php';
        $menu['config']['content']['mailing']['options']['notification']['links']['search'] = '/front/notification.php';
    }
    if (haveRight("sla", "r")) {
        $menu['config']['content']['sla']['title'] = $LANG['Menu'][43];
        $menu['config']['content']['sla']['page'] = '/front/sla.php';
        $menu['config']['content']['sla']['links']['search'] = "/front/sla.php";
        if (haveRight("sla", "w")) {
            $menu['config']['content']['sla']['links']['add'] = "/front/sla.form.php";
        }
    }
    if (haveRight("config", "w")) {
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:67,代码来源:display.function.php

示例5: title

 function title()
 {
     global $LANG;
     Dropdown::showItemTypeMenu($LANG['title'][30], Dropdown::getDeviceItemTypes(), $this->getSearchUrl());
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:5,代码来源:commondevice.class.php

示例6: header


//.........这里部分代码省略.........
         $menu['admin']['content']['log']['page'] = '/front/event.php';
     }
     /// CONFIG
     $config = array();
     $addconfig = array();
     $menu['config']['title'] = __('Setup');
     if (Session::haveRight("dropdown", "r") || Session::haveRight("entity_dropdown", "r") || Session::haveRight("internet", "r")) {
         $menu['config']['content']['dropdowns']['title'] = _n('Dropdown', 'Dropdowns', 2);
         $menu['config']['content']['dropdowns']['shortcut'] = 'n';
         $menu['config']['content']['dropdowns']['page'] = '/front/dropdown.php';
         $menu['config']['default'] = '/front/dropdown.php';
         if ($item == "dropdowns") {
             $dps = Dropdown::getStandardDropdownItemTypes();
             foreach ($dps as $tab) {
                 foreach ($tab as $key => $val) {
                     if ($key == $option) {
                         if ($tmp = getItemForItemtype($key)) {
                             $menu['config']['content']['dropdowns']['options'][$option]['title'] = $val;
                             $menu['config']['content']['dropdowns']['options'][$option]['page'] = $tmp->getSearchURL(false);
                             $menu['config']['content']['dropdowns']['options'][$option]['links']['search'] = $tmp->getSearchURL(false);
                             if ($tmp->canCreate()) {
                                 $menu['config']['content']['dropdowns']['options'][$option]['links']['add'] = $tmp->getFormURL(false);
                             }
                         }
                     }
                 }
             }
         }
     }
     if (Session::haveRight("device", "w")) {
         $menu['config']['content']['device']['title'] = _n('Component', 'Components', 2);
         $menu['config']['content']['device']['page'] = '/front/device.php';
         if ($item == "device") {
             $dps = Dropdown::getDeviceItemTypes();
             foreach ($dps as $tab) {
                 foreach ($tab as $key => $val) {
                     if ($key == $option) {
                         if ($tmp = getItemForItemtype($key)) {
                             $menu['config']['content']['device']['options'][$option]['title'] = $val;
                             $menu['config']['content']['device']['options'][$option]['page'] = $tmp->getSearchURL(false);
                             $menu['config']['content']['device']['options'][$option]['links']['search'] = $tmp->getSearchURL(false);
                             if ($tmp->canCreate()) {
                                 $menu['config']['content']['device']['options'][$option]['links']['add'] = $tmp->getFormURL(false);
                             }
                         }
                     }
                 }
             }
         }
     }
     if ($CFG_GLPI['use_mailing'] && Session::haveRight("notification", "r") || Session::haveRight("config", "w")) {
         $menu['config']['content']['mailing']['title'] = _n('Notification', 'Notifications', 2);
         $menu['config']['content']['mailing']['page'] = '/front/setup.notification.php';
         $menu['config']['content']['mailing']['options']['notification']['title'] = _n('Notification', 'Notifications', 2);
         $menu['config']['content']['mailing']['options']['notification']['page'] = '/front/notification.php';
         $menu['config']['content']['mailing']['options']['notification']['links']['add'] = '/front/notification.form.php';
         $menu['config']['content']['mailing']['options']['notification']['links']['search'] = '/front/notification.php';
     }
     if (Session::haveRight("sla", "r")) {
         $menu['config']['content']['sla']['title'] = _n('SLA', 'SLA', 2);
         $menu['config']['content']['sla']['page'] = '/front/sla.php';
         $menu['config']['content']['sla']['links']['search'] = "/front/sla.php";
         if (Session::haveRight("sla", "w")) {
             $menu['config']['content']['sla']['links']['add'] = "/front/sla.form.php";
         }
     }
开发者ID:geldarr,项目名称:hack-space,代码行数:67,代码来源:html.class.php


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