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


PHP Profile::getFormURL方法代码示例

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


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

示例1: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         $profile = new Profile();
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     if ($profile->getField('interface') == 'central') {
         $rights = $this->getAllRights();
         $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('General')));
     }
     echo "<table class='tab_cadre_fixehov'>";
     echo "<tr class='tab_bg_1'><th colspan='4'>" . __('Helpdesk') . "</th></tr>\n";
     $effective_rights = ProfileRight::getProfileRights($profiles_id, array('plugin_racks_open_ticket'));
     echo "<tr class='tab_bg_2'>";
     echo "<td width='20%'>" . __('Associable items to a ticket') . "</td>";
     echo "<td colspan='5'>";
     Html::showCheckbox(array('name' => '_plugin_racks_open_ticket', 'checked' => $effective_rights['plugin_racks_open_ticket']));
     echo "</td></tr>\n";
     echo "</table>";
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:39,代码来源:profile.class.php

示例2: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         $profile = new Profile();
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     $rights = array(array('itemtype' => 'PluginAddressingAddressing', 'label' => __('Generate reports', 'addressing'), 'field' => 'plugin_addressing'));
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('General')));
     echo "<table class='tab_cadre_fixehov'>";
     $effective_rights = ProfileRight::getProfileRights($profiles_id, array('plugin_addressing_use_ping_in_equipment'));
     echo "<tr class='tab_bg_2'>";
     echo "<td width='20%'>" . __('Use ping on equipment form', 'addressing') . "</td>";
     echo "<td colspan='5'>";
     Html::showCheckbox(array('name' => '_plugin_addressing_use_ping_in_equipment[1_0]', 'checked' => $effective_rights['plugin_addressing_use_ping_in_equipment']));
     echo "</td></tr>\n";
     echo "</table>";
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:36,代码来源:profile.class.php

示例3: showForm

 function showForm($ID, $options = array())
 {
     global $LANG;
     if (!Profile::canView()) {
         return false;
     }
     $canedit = self::canUpdate();
     $profile = new Profile();
     if ($ID) {
         //$this->getFromDBByProfile($ID);
         $profile->getFromDB($ID);
     }
     if ($canedit) {
         echo "<form action='" . $profile->getFormURL() . "' method='post'>";
     }
     $rights = $this->getAllRights();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2'));
     if ($canedit) {
         echo "<div class='center'>";
         echo "<input type='hidden' name='id' value=" . $ID . ">";
         echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
         echo "</div>";
     }
     Html::closeForm();
     $this->showLegend();
 }
开发者ID:jelacote,项目名称:simcard,代码行数:26,代码来源:profile.class.php

示例4: showForProfile

 /**
  * @param $prof   Profile object
  **/
 static function showForProfile(Profile $prof)
 {
     global $DB;
     $canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE));
     if ($canedit) {
         echo "<form method='post' action='" . $prof->getFormURL() . "'>";
     }
     $rights = self::getAllRights();
     $prof->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('Rights management by profil', 'reports')));
     if ($canedit) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $prof->getField('id')));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:21,代码来源:profile.class.php

示例5: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     $profile = new Profile();
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $profile->getFromDB($profiles_id);
     $rights = $this->getAllRights();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('Reforme', 'reforme')));
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         echo Html::closeForm(false);
     }
     echo "</div>";
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:27,代码来源:profile.class.php

示例6: showForm

 function showForm($ID, $options = array())
 {
     global $DB;
     $profile = new Profile();
     if ($ID) {
         $this->getFromDB($ID);
         $profile->getFromDB($ID);
     } else {
         $this->getEmpty();
     }
     if ($canedit = self::canUpdate()) {
         $options['colspan'] = 1;
         $options['target'] = $profile->getFormURL();
         $this->fields["id"] = $ID;
         $this->showFormHeader($options);
     }
     $rights = $this->getGeneralRights();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2'));
     if ($canedit) {
         $options['candel'] = false;
         $this->showFormButtons($options);
     }
 }
开发者ID:pluginsGLPI,项目名称:uninstall,代码行数:23,代码来源:profile.class.php

示例7: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         $profile = new Profile();
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     $rights = $this->getRightsGeneral();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('General', 'fusioninventory')));
     $rights = $this->getRightsRules();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => _n('Rule', 'Rules', 2)));
     $rights = $this->getRightsInventory();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('Inventory', 'fusioninventory')));
     $rights = $this->getRightsDeploy();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('Software deployment', 'fusioninventory')));
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
     $this->showLegend();
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:35,代码来源:profile.class.php

示例8: showForm

 public function showForm($profiles_id, $options = array())
 {
     global $LANG;
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     if ($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) {
         echo "<form action='" . $profile->getFormURL() . "' method='post'>";
     }
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     $rights = $this->getAllRights();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => $LANG['plugin_news']['title']));
     if ($canedit) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     HTML::closeForm();
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:21,代码来源:profile.class.php

示例9: showForm

 /**
  * Show profile form
  *
  * @param $items_id integer id of the profile
  * @param $target value url of target
  *
  * @return nothing
  **/
 function showForm($profiles_id = 0, $openform = TRUE, $closeform = TRUE)
 {
     global $DB, $CFG_GLPI;
     $profile = new Profile();
     $profile->getFromDB($profiles_id);
     echo "<div class='firstbloc'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         echo "<form action='" . $CFG_GLPI['root_doc'] . "/plugins/ocsinventoryng/front/profile.form.php' method='post'>";
     }
     //Delegating
     $effective_rights = ProfileRight::getProfileRights($profiles_id, array('plugin_ocsinventoryng'));
     echo "<table class='tab_cadre_fixehov'>";
     echo "<tr><th colspan='4' class='center b'>" . sprintf(__('%1$s - %2$s'), 'OcsinventoryNG', $profile->fields["name"]) . "</th>";
     echo "</tr>";
     $used = array();
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . sprintf(__('%1$s : %2$s'), _n('Allowed OCSNG server', 'Allowed OCSNG servers', 2, 'ocsinventoryng'), "&nbsp;");
     //$profile = $this->fields['id'];
     $crit = array('profiles_id' => $profiles_id);
     foreach ($DB->request("glpi_plugin_ocsinventoryng_ocsservers_profiles", $crit) as $data) {
         $used[$data['plugin_ocsinventoryng_ocsservers_id']] = $data['plugin_ocsinventoryng_ocsservers_id'];
         $configid[$data['plugin_ocsinventoryng_ocsservers_id']] = $data['id'];
     }
     if (Session::haveRight("profile", UPDATE)) {
         Dropdown::show('PluginOcsinventoryngOcsServer', array('width' => '50%', 'used' => $used, 'value' => '', 'condition' => "is_active = 1"));
         echo "&nbsp;&nbsp;<input type='hidden' name='profile' value='{$profiles_id}'>";
         echo "&nbsp;&nbsp;<input type='submit' name='addocsserver' value=\"" . _sx('button', 'Add') . "\" class='submit' >";
     }
     echo "</td><td>";
     echo "<table width='100%'><tr class='tab_bg_1'><td>";
     $nbservers = countElementsInTable('glpi_plugin_ocsinventoryng_ocsservers_profiles', "`profiles_id` = " . $profiles_id);
     $query = "SELECT `glpi_plugin_ocsinventoryng_ocsservers`.`id`,\n                       `glpi_plugin_ocsinventoryng_ocsservers`.`name`\n                FROM `glpi_plugin_ocsinventoryng_ocsservers_profiles`\n                LEFT JOIN `glpi_plugin_ocsinventoryng_ocsservers`\n                   ON `glpi_plugin_ocsinventoryng_ocsservers_profiles`.`plugin_ocsinventoryng_ocsservers_id` = `glpi_plugin_ocsinventoryng_ocsservers`.`id`\n                WHERE `profiles_id`= " . $_SESSION["glpiactiveprofile"]['id'] . "\n                ORDER BY `name` ASC";
     $result = $DB->query($query);
     if ($data = $DB->fetch_assoc($result)) {
         $ocsserver = new PluginOcsinventoryngOcsServer();
         foreach ($used as $id) {
             if ($ocsserver->getFromDB($id)) {
                 echo "<br>";
                 if (Session::haveRight("profile", UPDATE)) {
                     echo "<input type='checkbox' name='item[" . $configid[$id] . "]' value='1'>";
                 }
                 if ($data['id'] == $id) {
                     echo $ocsserver->getLink();
                 } else {
                     echo $ocsserver->getName();
                 }
             }
         }
     }
     if (!$nbservers) {
         _e('None');
     }
     echo "</td></tr>";
     if ($nbservers && Session::haveRight("profile", UPDATE)) {
         echo "<tr class='tab_bg_1 center'><td>";
         echo "<input type='submit' name='delete' value='Supprimer' class='submit' >";
         echo "</td></tr>";
     }
     echo "</table>";
     echo "</td></tr>";
     echo "</table>";
     Html::closeForm();
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         echo "<form method='post' action='" . $profile->getFormURL() . "'>";
     }
     $rights = $this->getAllRights();
     $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, 'default_class' => 'tab_bg_2', 'title' => __('General')));
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo Html::hidden('id', array('value' => $profiles_id));
         echo Html::submit(_sx('button', 'Save'), array('name' => 'update'));
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:84,代码来源:profile.class.php


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