本文整理汇总了PHP中Html::closeForm方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::closeForm方法的具体用法?PHP Html::closeForm怎么用?PHP Html::closeForm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Html
的用法示例。
在下文中一共展示了Html::closeForm方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
echo "<form name='notificationtargets_form' id='notificationtargets_form'\n method='post' action=' ";
echo Toolbox::getItemTypeFormURL(__CLASS__) . "'>";
echo "<table class ='tab_cadre_fixe'>";
echo '<tr><th colspan="2">' . __('Access type', 'formcreator') . '</th></tr>';
echo '<td>' . __('Access', 'formcreator') . '</td>';
echo '<td>';
Dropdown::showFromArray('access_rights', array(PluginFormcreatorForm::ACCESS_PUBLIC => __('Public access', 'formcreator'), PluginFormcreatorForm::ACCESS_PRIVATE => __('Private access', 'formcreator'), PluginFormcreatorForm::ACCESS_RESTRICTED => __('Restricted access', 'formcreator')), array('value' => isset($item->fields["access_rights"]) ? $item->fields["access_rights"] : 1));
echo '</td>';
if ($item->fields["access_rights"] == PluginFormcreatorForm::ACCESS_RESTRICTED) {
echo '<tr><th colspan="2">' . self::getTypeName(2) . '</th></tr>';
$table = getTableForItemType(__CLASS__);
$table_profile = getTableForItemType('Profile');
$query = "SELECT p.`id`, p.`name`, IF(f.`plugin_formcreator_profiles_id` IS NOT NULL, 1, 0) AS `profile`\n FROM {$table_profile} p\n LEFT JOIN {$table} f\n ON p.`id` = f.`plugin_formcreator_profiles_id`\n AND f.`plugin_formcreator_forms_id` = " . (int) $item->fields['id'];
$result = $GLOBALS['DB']->query($query);
while (list($id, $name, $profile) = $GLOBALS['DB']->fetch_array($result)) {
$checked = $profile ? ' checked' : '';
echo '<tr><td colspan="2"><label>';
echo '<input type="checkbox" name="profiles_id[]" value="' . $id . '" ' . $checked . '> ';
echo $name;
echo '</label></td></tr>';
}
}
echo '<tr>';
echo '<td class="center" colspan="2">';
echo '<input type="hidden" name="profiles_id[]" value="0" />';
echo '<input type="hidden" name="form_id" value="' . (int) $item->fields['id'] . '" />';
echo '<input type="submit" name="update" value="' . __('Save') . '" class="submit" />';
echo "</td>";
echo "</tr>";
echo "</table>";
Html::closeForm();
}
示例2: showForm
/**
* Show form
*
* @global type $CFG_GLPI
* @param type $ID
* @param type $options
*/
function showForm($ID = 0, $options = array())
{
global $CFG_GLPI;
echo "<div class='center first-bloc'>";
echo "<form name='field_form' method='post' action='" . Toolbox::getItemTypeFormURL(__CLASS__) . "'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_1'>";
echo "<th>" . self::getTypeName() . "</th>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td class='tab_bg_2 center'>";
echo PluginShellcommandsCommandGroup::getTypeName(1) . " ";
Dropdown::show('PluginShellcommandsCommandGroup', array('entity' => $_SESSION['glpiactive_entity'], 'width' => 200));
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td class='tab_bg_2 center'>";
$this->getEditValue();
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td class='tab_bg_2 center'>";
echo "<input type='button' class='submit' onclick='shellcommand_advanced_execution(\"" . $CFG_GLPI['root_doc'] . "\",\"field_form\", \"advanced_execution_result\");' name='advanced_execution' value='" . __('Execute') . "'/>";
echo "</td>";
echo "</tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
echo "<div class='spaced' id='advanced_execution_result'></div>";
}
示例3: showForm
function showForm()
{
$this->getfromDB(1);
$target = self::getFormURL();
echo "<div align='center'><form method='post' action=\"{$target}\">";
echo "<table class='tab_cadre' cellpadding='5'><tr ><th colspan='2'>";
echo self::getTypeName(0) . "</th></tr>";
echo "<tr class='tab_bg_1'><td>";
echo "<select name=\"unit\" size=\"1\"> ";
echo "<option ";
if ($this->isMetricUnit()) {
echo "selected ";
}
echo "value='" . self::METRIC_UNIT . "'>" . __('metric', 'racks') . "</option>";
echo "<option ";
if (!$this->isMetricUnit()) {
echo "selected ";
}
echo "value='" . self::NON_METRIC_UNIT . "'>" . __('English', 'racks') . "</option>";
echo "</select> ";
echo "</td>";
echo "<td>";
echo Html::hidden('id', array('value' => 1));
echo Html::submit(_sx('button', 'Post'), array('name' => 'update'));
echo "</table>";
Html::closeForm();
echo "</div>";
}
示例4: showFormAlerts
static function showFormAlerts($target)
{
$self = new self();
$self->getFromDB(1);
echo "<form action='{$target}' method='post'>";
echo "<input type='hidden' name='id' value='1'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_2'>";
echo "<td>" . __('Reminders frequency', 'additionalalerts') . " " . PluginAdditionalalertsInfocomAlert::getTypeName(2) . "</td><td>";
Alert::dropdownYesNo(array('name' => "use_infocom_alert", 'value' => $self->fields["use_infocom_alert"]));
echo "</td></tr>";
echo "<tr class='tab_bg_2'>";
echo "<td >" . __('Reminders frequency', 'additionalalerts') . " " . __('New imported computers from OCS-NG', 'additionalalerts') . "</td><td>";
Alert::dropdownYesNo(array('name' => "use_newocs_alert", 'value' => $self->fields["use_newocs_alert"]));
echo "</td></tr>";
echo "<tr class='tab_bg_2'><td >" . __('OCS-NG Synchronization alerts', 'additionalalerts') . "</td><td>";
Alert::dropdownIntegerNever('delay_ocs', $self->fields["delay_ocs"], array('max' => 99));
echo " " . _n('Day', 'Days', 2) . "</td></tr>";
echo "</td></tr>";
echo "<tr class='tab_bg_2'><td class='center' colspan='2'>";
echo "<input type='hidden' name='id' value='1'>";
echo "<input class='submit' type='submit' name='update' value='" . _sx('button', 'Save') . "'>";
echo "</td></tr>";
echo "</table>";
Html::closeForm();
}
示例5: showDetails
function showDetails($perfdatas_id) {
global $CFG_GLPI;
$a_details = $this->find("`plugin_monitoring_perfdatas_id`='".$perfdatas_id."'", "position");
echo "<table class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_1'>";
echo "<th>";
echo __('Name');
echo "</th>";
echo "<th>";
echo __('Is name dynamic', 'monitoring');
echo "</th>";
echo "<th>";
echo __('Position', 'monitoring');
echo "</th>";
for ($i=1; $i<9; $i++) {
echo "<th>";
echo __('Value', 'monitoring').' '.$i;
echo "</th>";
}
echo "<th>";
echo "</th>";
echo "</tr>";
foreach ($a_details as $a_detail) {
echo "<form name='form' method='post'
action='".$CFG_GLPI['root_doc']."/plugins/monitoring/front/perfdatadetail.form.php'>";
$this->showDetail($a_detail['id']);
Html::closeForm();
}
echo "</table>";
}
示例6: showForDocumentCategory
static function showForDocumentCategory($item)
{
$documentCategory = new self();
if (!$documentCategory->getFromDBByQuery(" WHERE `documentcategories_id` = " . $item->fields['id'])) {
$documentCategory->getEmpty();
}
echo "<form name='form' method='post' action='" . Toolbox::getItemTypeFormURL($documentCategory->getType()) . "'>";
echo "<div align='center'><table class='tab_cadre_fixe'>";
echo "<tr><th colspan='2'>" . __('Document category prefix', 'order') . "</th></tr>";
echo "<tr class='tab_bg_1'>";
// Dropdown group
echo "<td>";
echo __('Document category prefix', 'order');
echo "</td>";
echo "<td>";
echo "<input type='text' name='documentcategories_prefix' value='" . $documentCategory->fields['documentcategories_prefix'] . "'>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td class='tab_bg_2 center' colspan='6'>";
echo "<input type='submit' name='update' class='submit' value='" . _sx('button', 'Save') . "' >";
echo "<input type='hidden' name='documentcategories_id' class='submit' value='" . $item->fields['id'] . "' >";
echo "</td>";
echo "</tr>";
echo "</table></div>";
Html::closeForm();
}
示例7: 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();
}
示例8: 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>";
}
示例9: showForm
function showForm($target)
{
$this->GetfromDB(1);
echo "<div align='center'><form method='post' action=\"{$target}\">";
echo "<table class='tab_cadre' cellpadding='5'><tr ><th colspan='2'>";
echo self::getTypeName(0) . "</th></tr>";
echo "<tr class='tab_bg_1'><td>";
echo "<select name=\"unit\" size=\"1\"> ";
echo "<option ";
if ($this->fields["unit"] == '1') {
echo "selected ";
}
echo "value=\"1\">" . __('metric', 'racks') . "</option>";
echo "<option ";
if ($this->fields["unit"] == '2') {
echo "selected ";
}
echo "value=\"2\">" . __('English', 'racks') . "</option>";
echo "</select> ";
echo "</td>";
echo "<td>";
echo "<div align='center'><input type='hidden' name='id' value='1'>";
echo "<input type='submit' name='update' value=\"" . _sx('button', 'Post') . "\" class='submit'></div></td></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
}
示例10: 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();
}
示例11: showForm
function showForm($target)
{
global $DB;
$rand = mt_rand();
$query = "SELECT *\n FROM `" . $this->getTable() . "`\n ORDER BY `states_id` ASC ";
if ($result = $DB->query($query)) {
$number = $DB->numrows($result);
if ($number != 0) {
echo "<div align='center'><form method='post' name='massiveaction_form{$rand}' id='massiveaction_form{$rand}' action=\"{$target}\">";
echo "<table class='tab_cadre_fixe' cellpadding='5'>";
echo "<tr>";
echo "<th></th><th>" . _n('Status', 'Statuses', 2) . "</th>";
echo "</tr>";
while ($ligne = $DB->fetch_array($result)) {
$ID = $ligne["id"];
echo "<tr class='tab_bg_1'>";
echo "<td width='10' class='center'>";
echo "<input type='hidden' name='id' value='{$ID}'>";
echo "<input type='checkbox' name='item[{$ID}]' value='1'>";
echo "</td>";
echo "<td>" . Dropdown::getDropdownName("glpi_states", $ligne["states_id"]) . "</td>";
echo "</tr>";
}
Html::openArrowMassives("massiveaction_form{$rand}", true);
Html::closeArrowMassives(array('delete_state' => __('Delete permanently')));
echo "</table>";
Html::closeForm();
echo "</div>";
}
}
}
示例12: showForm
/**
* Display form for import XML
*
* @return bool TRUE if form is ok
*
**/
function showForm()
{
global $CFG_GLPI;
$target = $CFG_GLPI['root_doc'] . '/plugins/fusioninventory/front/inventorycomputerimportxml.php';
echo "<form action='" . $target . "' method='post' enctype='multipart/form-data'>";
echo "<br>";
echo "<table class='tab_cadre' cellpadding='1' width='600'>";
echo "<tr>";
echo "<th>";
echo __('Import XML file from an Agent', 'fusioninventory') . " :";
echo "</th>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>";
echo __('You can use this menu to upload XML generated by an agent. ' . 'The file must have .xml or .ocs extension. ' . 'It\'s also possible to upload <b>ZIP</b> archive directly with a ' . 'collection of XML files. ' . 'Read you agent documentation to see how to generate such XML ' . 'file', 'fusioninventory');
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td align='center'>";
echo "<input type='file' name='importfile' value=''/>";
echo " <input type='submit' value='" . __('Import') . "' class='submit'/>";
echo "</td>";
echo "</tr>";
echo "</table>";
Html::closeForm();
return TRUE;
}
示例13: showForGroup
static function showForGroup(Group $group)
{
global $DB;
$ID = $group->getField('id');
if (!$group->can($ID, READ)) {
return false;
}
$canedit = $group->can($ID, UPDATE);
if ($canedit) {
// Get data
$item = new self();
if (!$item->getFromDB($ID)) {
$item->getEmpty();
}
$rand = mt_rand();
echo "<form name='group_level_form{$rand}' id='group_level_form{$rand}' method='post'\n action='" . Toolbox::getItemTypeFormURL(__CLASS__) . "'>";
echo "<input type='hidden' name='" . self::$items_id . "' value='{$ID}' />";
echo "<div class='spaced'>";
echo "<table class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_1'><th>" . __('Level attribution', 'itilcategorygroups') . "</th></tr>";
echo "<tr class='tab_bg_2'><td class='center'>";
Dropdown::showFromArray('lvl', array(NULL => "---", 1 => __('Level 1', 'itilcategorygroups'), 2 => __('Level 2', 'itilcategorygroups'), 3 => __('Level 3', 'itilcategorygroups'), 4 => __('Level 4', 'itilcategorygroups')), array('value' => $item->fields['lvl']));
echo "</td></tr>";
echo "</td><td class='center'>";
if ($item->fields["id"]) {
echo "<input type='hidden' name='id' value='" . $item->fields["id"] . "'>";
echo "<input type='submit' name='update' value=\"" . __('Save') . "\"\n class='submit'>";
} else {
echo "<input type='submit' name='add' value=\"" . __('Save') . "\" class='submit'>";
}
echo "</td></tr>";
echo "</table></div>";
Html::closeForm();
}
}
示例14: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
return;
$profile = new Profile();
$found_profiles = $profile->find("`interface` = 'central'");
$tab_profile = new self();
$found_tab_profiles = $tab_profile->find("`plugin_custom_tabs_id` = " . $item->getID());
echo "<form method='POST' action='tabprofile.form.php' />";
echo "<table class='tab_cadre_fixe'>";
echo "<tr><th colspan='4'>" . __("Visibility") . "</th></tr>";
$odd = 0;
foreach ($found_profiles as $profiles_id => $profile_fields) {
if ($odd % 2 === 0) {
echo "<tr>";
}
echo "<td>" . $profile_fields['name'] . "</td>";
echo "<td>";
Dropdown::showYesNo("tab_profile[{$profiles_id}]", 0);
echo "</td>";
if ($odd % 2 === 1) {
echo "</tr>";
}
$odd++;
}
if ($odd % 2 === 0) {
echo "</tr>";
}
echo "<tr><td colspan='4'><div class='center'>";
echo "<input type='submit' name='update' value=\"" . _sx('button', 'Post') . "\" class='submit'>";
echo "</div></td></tr>";
echo "</table>";
Html::closeForm();
return true;
}
示例15: showForm
function showForm($target, $ID)
{
$this->getFromDB($ID);
$delay_expired = $this->fields["delay_expired"];
$delay_whichexpire = $this->fields["delay_whichexpire"];
echo "<div align='center'>";
echo "<form method='post' action=\"{$target}\">";
echo "<table class='tab_cadre_fixe' cellpadding='5'><tr><th>";
echo __('Time of checking of validity of domains', 'domains') . "</th></tr>";
echo "<tr class='tab_bg_1'><td><div align='center'>";
$delay_stamp_first = mktime(0, 0, 0, date("m"), date("d") - $delay_expired, date("y"));
$delay_stamp_next = mktime(0, 0, 0, date("m"), date("d") + $delay_whichexpire, date("y"));
$date_first = date("Y-m-d", $delay_stamp_first);
$date_next = date("Y-m-d", $delay_stamp_next);
echo "<tr class='tab_bg_1'><td><div align='left'>";
_e('Domains expired since more', 'domains');
echo " <input type='text' size='5' name='delay_expired' value=\"{$delay_expired}\">";
echo " " . _n('Day', 'Days', 2);
echo " ( >" . Html::convdate($date_first) . ")<br>";
_e('Domains expiring in less than', 'domains');
echo " <input type='text' size='5' name='delay_whichexpire' value=\"{$delay_whichexpire}\">";
echo " " . _n('Day', 'Days', 2);
echo " ( <" . Html::convdate($date_next) . ")";
echo "</td>";
echo "</tr>";
echo "<tr><th>";
echo "<input type='hidden' name='id' value='" . $ID . "'>";
echo "<div align='center'>";
echo "<input type='submit' name='update' value=\"" . __s('Post') . "\" class='submit' >";
echo "</div></th></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
}