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


PHP Profile::dropdownNoneReadWrite方法代码示例

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


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

示例1: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     $profile = new Profile();
     $found_profiles = $profile->find();
     $fields_profile = new self();
     echo "<form name='form' method='post' action='" . $fields_profile->getFormURL() . "'>";
     echo "<div class='spaced' id='tabsbody'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='2'>" . _n("Profile", "Profiles", 2) . "</th></tr>";
     foreach ($found_profiles as $profile_item) {
         //get right for current profile
         $found = $fields_profile->find("`profiles_id` = '" . $profile_item['id'] . "'\n                         AND `plugin_fields_containers_id` = '" . $item->fields['id'] . "'");
         $first_found = array_shift($found);
         //display right
         echo "<tr>";
         echo "<td>" . $profile_item['name'] . "</td>";
         echo "<td>";
         Profile::dropdownNoneReadWrite("rights[" . $profile_item['id'] . "]", $first_found['right']);
         echo "</td>";
         echo "<tr>";
     }
     echo "<ul>";
     echo "<tr><td class='tab_bg_2 center' colspan='2'>";
     echo "<input type='hidden' name='plugin_fields_containers_id' value='" . $item->fields['id'] . "' />";
     echo "<input type='submit' name='update' value=\"" . _sx("button", "Save") . "\" class='submit'>";
     echo "</td>";
     echo "</tr>";
     echo "</table></div>";
     Html::closeForm();
 }
开发者ID:publik1974,项目名称:fields,代码行数:30,代码来源:profile.class.php

示例2: showForm

 function showForm($ID, $options = array())
 {
     $target = $this->getFormURL();
     if (isset($options['target'])) {
         $target = $options['target'];
     }
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $canedit = Session::haveRight("profile", "w");
     $prof = new Profile();
     if ($ID) {
         $this->getFromDB($ID);
         $prof->getFromDB($ID);
     }
     echo "<form action='" . $target . "' method='post'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='2'>" . sprintf(__('%1$s %2$s'), __('Rights management', 'appliances'), $this->fields["name"]);
     echo "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Appliances', 'appliances') . "</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("appliance", $this->fields["appliance"], 1, 1, 1);
     } else {
         _e('No access');
     }
     echo "</td></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Linkable items to a ticket - Appliances') . "</td><td>";
     if ($prof->fields['create_ticket']) {
         Dropdown::showYesNo("open_ticket", $this->fields["open_ticket"]);
     } else {
         echo Dropdown::getYesNo(0);
     }
     echo "</td></tr>";
     if ($canedit) {
         echo "<tr class='tab_bg_1'>";
         echo "<td class='center' colspan='2'>";
         echo "<input type='hidden' name='id' value='" . $ID . "'>";
         echo "<input type='submit' name='update_user_profile' value=\"" . _sx('button', 'Update') . "\"\n               class='submit'>";
         echo "</td></tr>";
     }
     echo "</table>";
     Html::closeForm();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:45,代码来源:profile.class.php

示例3: plugin_addressing_MassiveActionsDisplay

function plugin_addressing_MassiveActionsDisplay($options = array())
{
    switch ($options['itemtype']) {
        case 'Profile':
            switch ($options['action']) {
                case "plugin_addressing_allow":
                    Profile::dropdownNoneReadWrite('use', '');
                    echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value=\"" . _sx('button', 'Post') . "\" >";
                    break;
            }
            break;
    }
    return "";
}
开发者ID:geldarr,项目名称:hack-space,代码行数:14,代码来源:hook.php

示例4: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($items_id)
 {
     global $CFG_GLPI;
     if ($items_id > 0 and $this->getFromDB($items_id)) {
     } else {
         $this->getEmpty();
     }
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $canedit = Session::haveRight("profile", "w");
     if ($canedit) {
         echo "<form method='post' action='" . $CFG_GLPI['root_doc'] . "/plugins/surveyticket/front/profile.form.php'>";
         echo '<input type="hidden" name="profiles_id" value="' . $items_id . '"/>';
     }
     echo "<div class='spaced'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th colspan='4'>Survey ticket :</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo __('Setup') . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("config", $this->fields["config"], 1, 1, 1);
     echo "</td>";
     echo "<td>";
     echo "</td>";
     echo "<td>";
     echo "</td>";
     echo "</tr>";
     if ($canedit) {
         echo "<tr>";
         echo "<th colspan='4'>";
         echo "<input type='hidden' name='profile_id' value='" . $items_id . "'/>";
         echo "<input type='submit' name='update' value=\"" . __('Save') . "\" class='submit'>";
         echo "</td>";
         echo "</tr>";
         echo "</table>";
         Html::closeForm();
     } else {
         echo "</table>";
     }
     echo "</div>";
     Html::closeForm();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:55,代码来源:profile.class.php

示例5: showForm

 function showForm($ID, $options = array())
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='2'>" . sprintf(__('%1$s - %2$s'), __('Rights management', 'immobilizationsheets'), $prof->fields["name"]) . "</th>";
     echo "<td>" . __('Generate the immobilization sheet', 'immobilizationsheets') . ":</td><td>";
     Profile::dropdownNoneReadWrite("immobilizationsheets", $this->fields["immobilizationsheets"], 1, 1, 0);
     echo "</td>";
     echo "</tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:21,代码来源:profile.class.php

示例6: showForm

 function showForm($target, $ID)
 {
     global $LANG;
     if (!haveRight("profile", "r")) {
         return false;
     }
     $canedit = haveRight("profile", "w");
     if ($ID) {
         $this->getFromDB($ID);
     }
     echo "<form action='" . $target . "' method='post'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th colspan='4' align='center'>";
     echo $LANG['plugin_fusioninventory']["profile"][0] . " " . $this->fields["name"];
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][16] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_networking", $this->fields["snmp_networking"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][23] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("configuration", $this->fields["configuration"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][18] . " :</td><td>";
     Profile::dropdownNoneReadWrite("snmp_printers", $this->fields["snmp_printers"], 1, 1, 1);
     echo "</td>";
     echo "<th colspan='2'>";
     echo $LANG['plugin_fusioninventory']["profile"][34] . " :";
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][19] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_models", $this->fields["snmp_models"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][29] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("remotecontrol", $this->fields["remotecontrol"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][20] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_authentification", $this->fields["snmp_authentification"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][31] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("deviceinventory", $this->fields["deviceinventory"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][25] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("rangeip", $this->fields["rangeip"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][22] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("netdiscovery", $this->fields["netdiscovery"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][26] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("agents", $this->fields["agents"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][32] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("snmp_query", $this->fields["snmp_query"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][27] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("agentsprocesses", $this->fields["agentsprocesses"], 1, 1, 0);
     echo "</td>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][33] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("wol", $this->fields["wol"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][30] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("unknowndevices", $this->fields["unknowndevices"], 1, 1, 1);
     echo "</td>";
     echo "<td colspan='2'>";
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['plugin_fusioninventory']["profile"][28] . " :</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("reports", $this->fields["reports"], 1, 1, 0);
     echo "</td>";
     echo "<td colspan='2'>";
     echo "</td>";
//.........这里部分代码省略.........
开发者ID:Hawke,项目名称:fusioninventory-for-glpi,代码行数:101,代码来源:profile.class.php

示例7: showForm

 function showForm($ID)
 {
     global $LANG;
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $canedit = Session::haveRight("profile", "w");
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     echo "<form action='" . Toolbox::getItemTypeFormURL(__CLASS__) . "' method='post'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<th colspan='4' align='center'><strong>" . $LANG['plugin_simcard']['profile'][0] . " " . $prof->fields["name"] . "</strong></th>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . $LANG['plugin_simcard']['profile'][1] . ":</td><td>";
     Profile::dropdownNoneReadWrite("simcard", $this->fields["simcard"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . $LANG['setup'][352] . " - " . $LANG['plugin_simcard']['profile'][1] . ":</td><td>";
     if ($prof->fields['create_ticket']) {
         Dropdown::showYesNo("open_ticket", $this->fields["open_ticket"]);
     } else {
         echo Dropdown::getYesNo(0);
     }
     echo "</td>";
     echo "</tr>";
     if ($canedit) {
         echo "<tr class='tab_bg_1'>";
         echo "<td align='center' colspan='2'>";
         echo "<input type='hidden' name='id' value=" . $this->getID() . ">";
         echo "<input type='submit' name='update' value=\"" . $LANG['buttons'][7] . "\" class='submit'>";
         echo "</td></tr>";
     }
     echo "</table>";
     Html::closeForm();
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:39,代码来源:profile.class.php

示例8: showForm

 function showForm($ID, $options = array())
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='2' class='center b'>" . self::getTypeName() . " " . $prof->fields["name"] . "</th>";
     echo "<td>" . PluginShellcommandsShellcommand::getTypeName(2) . ":</td><td>";
     Profile::dropdownNoneReadWrite("shellcommands", $this->fields["shellcommands"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:21,代码来源:profile.class.php

示例9: showForm

 function showForm($ID, $options = array())
 {
     global $LANG, $DB;
     if (!Session::haveRight("profile", READ)) {
         return false;
     }
     $target = $this->getFormURL();
     if (isset($options['target'])) {
         $target = $options['target'];
     }
     // TODO : Should be useless if we can use this->showFormHeader() and $this->ShowFormButtons()
     if (!Session::haveRight("profile", UPDATE)) {
         return false;
     }
     $canedit = Session::haveRight("profile", UPDATE);
     $prof = new Profile();
     if ($ID) {
         $this->getFromDB($ID);
         $prof->getFromDB($ID);
     }
     $itemtype = '';
     $query = "SELECT *\n                FROM `glpi_plugin_customfields_fields`\n                WHERE `restricted` = 1\n                ORDER BY `itemtype`, `sort_order`;";
     if (($result = $DB->query($query)) && $DB->numrows($result)) {
         echo "<form action='" . $target . "' method='post'>";
         echo "<table class='tab_cadre_fixe'>";
         echo "<tr class='tab_bg_2'>";
         echo "<th colspan='4'>" . __('Title', 'customfields') . " " . $prof->fields["name"] . "</th>";
         echo "</tr>";
         while ($data = $DB->fetch_array($result)) {
             if ($data['itemtype'] != $itemtype) {
                 $itemtype = $data['itemtype'];
                 echo "<tr><th colspan='3'>" . __($itemtype) . "</th></tr>";
             }
             $profile_field = $data['itemtype'] . '_' . $data['system_name'];
             echo "<tr class='tab_bg_2'><td>" . $data['label'] . " (" . __($data['data_type'], 'customfields') . "):</td><td>";
             if ($data['data_type'] == 'sectionhead') {
                 Dropdown::showYesNo($profile_field, $this->fields[$profile_field], 1, 1, 1);
             } else {
                 Profile::dropdownNoneReadWrite($profile_field, $this->fields[$profile_field], 1, 1, 1);
             }
             echo "</td></tr>";
         }
         if ($canedit) {
             echo "<tr class='tab_bg_1'>";
             echo "<td class='center' colspan='2'>";
             echo "<input type='hidden' name='id' value={$ID}>";
             echo "<input type='submit' name='update_user_profile' value=\"" . _sx('button', 'Update') . "\" class='submit'>";
             echo "</td></tr>";
         }
         echo "</table>";
         $options['candel'] = false;
         Html::closeForm();
     } else {
         echo __('There is no restricted field', 'customfields');
     }
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:56,代码来源:profile.class.php

示例10: showForm

 function showForm($ID, $options = array())
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='4' align='center'><strong>" . __("Rights assignment") . " " . $prof->fields["name"] . "</strong></th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Orders", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("order", $this->fields["order"], 1, 1, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "<td>" . __("Products references", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("reference", $this->fields["reference"], 1, 1, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Bills", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("bill", $this->fields["bill"], 1, 1, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "<td>" . __("Take item delivery", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("delivery", $this->fields["delivery"], 1, 1, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Order Generation", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("generate_order_odt", $this->fields["generate_order_odt"], 1, 0, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "<td>" . __("Link order to a ticket", "order") . "</td>";
     echo "<td>";
     Dropdown::showYesNo('open_ticket', $this->fields['open_ticket']);
     echo "</td>";
     echo "</tr>";
     echo "<tr align='center'><th colspan='4' >" . __("Validation", "order") . "</th></tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Order validation", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("validation", $this->fields["validation"], 1, 0, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "<td>" . __("Cancel order", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("cancel", $this->fields["cancel"], 1, 0, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __("Edit a validated order", "order") . ":</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("undo_validation", $this->fields["undo_validation"], 1, 0, 1);
     } else {
         echo __("No access");
         // No access;
     }
     echo "</td>";
     echo "<td colspan='2'></td>";
     echo "</tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:98,代码来源:profile.class.php

示例11: showForm

 /**
  * profiles modification
  *
  * @param $ID
  * @param $options   array
  **/
 function showForm($ID, $options = array())
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     //TRANS: %$ is a profile name
     echo "<th colspan='4' class='center b'>" . sprintf(__('%1$s - %2$s'), __('Rights management'), $prof->fields["name"]) . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . _n('OCSNG server', 'OCSNG servers', 2, 'ocsinventoryng') . "</td><td>";
     Profile::dropdownNoneReadWrite("ocsng", $this->fields["ocsng"], 1, 0, 1);
     echo "</td>";
     echo "<td>" . __('Manually synchronization', 'ocsinventoryng') . "</td><td>";
     Profile::dropdownNoneReadWrite("sync_ocsng", $this->fields["sync_ocsng"], 1, 0, 1);
     echo "</td></tr>\n";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('See information', 'ocsinventoryng') . "</td><td>";
     Profile::dropdownNoneReadWrite("view_ocsng", $this->fields["view_ocsng"], 1, 1, 0);
     echo "<td>" . __('Clean links between GLPI and OCSNG', 'ocsinventoryng') . "</td><td>";
     Profile::dropdownNoneReadWrite("clean_ocsng", $this->fields["clean_ocsng"], 1, 1, 1);
     echo "</td></tr>\n";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:38,代码来源:profile.class.php

示例12: showForm

 function showForm($ID, $options = array())
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='4'>" . sprintf(__('%1$s - %2$s'), __('Rights management', 'resources'), $prof->fields["name"]) . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . PluginResourcesResource::getTypeName(2) . "</td><td>";
     Profile::dropdownNoneReadWrite("resources", $this->fields["resources"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . PluginResourcesTask::getTypeName(2) . "</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("task", $this->fields["task"], 1, 1, 1);
     } else {
         _e('No access');
         // No access;
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . PluginResourcesChecklist::getTypeName(2) . "</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("checklist", $this->fields["checklist"], 1, 1, 1);
     } else {
         _e('No access');
         // No access;
     }
     echo "</td>";
     echo "<td>" . PluginResourcesEmployee::getTypeName(2) . "</td><td>";
     Profile::dropdownNoneReadWrite("employee", $this->fields["employee"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('All resources access', 'resources') . "</td><td>";
     Profile::dropdownNoneReadWrite("all", $this->fields["all"], 1, 0, 1);
     echo "</td>";
     echo "<td>" . __('Associable items to a ticket') . " - " . PluginResourcesResource::getTypeName(2) . "</td><td>";
     if ($prof->fields['create_ticket']) {
         Dropdown::showYesNo("open_ticket", $this->fields["open_ticket"]);
     } else {
         echo Dropdown::getYesNo(0);
     }
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='4' class='center b'>" . __('Service company management', 'resources') . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . PluginResourcesResourceResting::getTypeName(2) . "</td><td>";
     Profile::dropdownNoneReadWrite("resting", $this->fields["resting"], 1, 0, 1);
     echo "</td>";
     echo "<td>" . PluginResourcesResourceHoliday::getTypeName(2) . "</td><td>";
     Profile::dropdownNoneReadWrite("holiday", $this->fields["holiday"], 1, 0, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='4' class='center b'>" . __('Public service management', 'resources') . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . PluginResourcesEmployment::getTypeName(2) . "</td><td>";
     Profile::dropdownNoneReadWrite("employment", $this->fields["employment"], 1, 1, 1);
     echo "</td>";
     echo "<td>" . PluginResourcesBudget::getTypeName(2) . ":</td><td>";
     Profile::dropdownNoneReadWrite("budget", $this->fields["budget"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Dropdown management', 'resources') . "</td><td>";
     Profile::dropdownNoneReadWrite("dropdown_public", $this->fields["dropdown_public"], 1, 1, 1);
     echo "</td><td></td><td></td>";
     echo "</tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:83,代码来源:profile.class.php

示例13: showForm

 function showForm($ID, $options = array())
 {
     $target = $this->getFormURL();
     if (isset($options['target'])) {
         $target = $options['target'];
     }
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $canedit = Session::haveRight("profile", "w");
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     echo "<form action='" . $target . "' method='post'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='2'>" . sprintf(__('%1$s - %2$s'), __('Rights management', 'archires'), $prof->fields["name"]) . "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_2'>";
     echo "<td>" . __('Generate graphs', 'archires') . "</td><td>";
     if ($prof->fields['interface'] != 'helpdesk') {
         Profile::dropdownNoneReadWrite("archires", $this->fields["archires"], 1, 1, 1);
     } else {
         _e('No access');
         // No access;
     }
     echo "</td>";
     echo "</tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:34,代码来源:profile.class.php

示例14: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($items_id)
 {
     global $LANG, $CFG_GLPI;
     if ($items_id > 0 and $this->getFromDB($items_id)) {
     } else {
         $this->getEmpty();
     }
     if (!haveRight("profile", "r")) {
         return false;
     }
     $canedit = haveRight("profile", "w");
     if ($canedit) {
         echo "<form method='post' action='" . $CFG_GLPI['root_doc'] . "/plugins/monitoring/front/profile.form.php'>";
         echo '<input type="hidden" name="profiles_id" value="' . $items_id . '"/>';
     }
     echo "<div class='spaced'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr>";
     echo "<th colspan='4'>" . $LANG['plugin_monitoring']['title'][0] . " :</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['display'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("dashboard", $this->fields["dashboard"], 1, 1, 1);
     echo "</td>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['servicescatalog'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("servicescatalog", $this->fields["servicescatalog"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['displayview'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("view", $this->fields["view"], 1, 1, 1);
     echo "</td>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['componentscatalog'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("componentscatalog", $this->fields["componentscatalog"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['displayview'][4] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("viewshomepage", $this->fields["viewshomepage"], 1, 1, 0);
     echo "</td>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['weathermap'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("weathermap", $this->fields["weathermap"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['component'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("component", $this->fields["component"], 1, 1, 1);
     echo "</td>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['command'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("command", $this->fields["command"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>";
     echo $LANG['common'][12] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("config", $this->fields["config"], 1, 1, 1);
     echo "</td>";
     echo "<td>";
     echo $LANG['plugin_monitoring']['check'][0] . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     Profile::dropdownNoneReadWrite("check", $this->fields["check"], 1, 1, 1);
     echo "</td>";
     echo "</tr>";
     if ($canedit) {
         echo "<tr>";
//.........这里部分代码省略.........
开发者ID:RubichonL,项目名称:glpi_monitoring,代码行数:101,代码来源:profile.class.php

示例15: showForm

 function showForm($ID, $options = array())
 {
     $target = $this->getFormURL();
     if (isset($options['target'])) {
         $target = $options['target'];
     }
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     $prof = new Profile();
     if ($ID) {
         $this->getFromDBByProfile($ID);
         $prof->getFromDB($ID);
     }
     $this->showFormHeader($options);
     echo "<tr class='tab_bg_2'>";
     echo "<th colspan='3'>" . __('Themes manager', 'themes') . "</th></tr>\n            <tr class='tab_bg_2'><td colspan='2'>" . __('Choose the default theme', 'themes') . " : </td><td>";
     Profile::dropdownNoneReadWrite("themes", $this->fields["themes"], 1, 1, 1);
     echo "</td></tr>";
     echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">";
     $options['candel'] = false;
     $this->showFormButtons($options);
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:23,代码来源:profile.class.php


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