本文整理汇总了PHP中__s函数的典型用法代码示例。如果您正苦于以下问题:PHP __s函数的具体用法?PHP __s怎么用?PHP __s使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了__s函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMenuContent
static function getMenuContent()
{
global $CFG_GLPI;
$menu = array();
$menu['title'] = self::getMenuName();
$menu['page'] = '/plugins/datainjection/front/clientinjection.form.php';
if (Session::haveRight(static::$rightname, READ)) {
$image_model = "<img src='" . $CFG_GLPI["root_doc"] . "/pics/rdv.png' title='";
$image_model .= PluginDatainjectionModel::getTypeName();
$image_model .= "' alt='" . PluginDatainjectionModel::getTypeName() . "'>";
$image_import = "<img src='" . $CFG_GLPI["root_doc"] . "/pics/actualiser.png' title='";
$image_import .= __s('Injection of the file', 'datainjection');
$image_import .= "' alt='" . __s('Injection of the file', 'datainjection') . "'>";
$menu['options']['client']['title'] = self::getMenuName();
$menu['options']['client']['page'] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
$menu['options']['client']['links']['search'] = '/plugins/datainjection/front/clientinjection.form.php';
if (Session::haveRight('plugin_datainjection_model', READ)) {
$menu['options']['model']['title'] = PluginDatainjectionModel::getTypeName();
$menu['options']['model']['page'] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
$menu['options']['model']['links']['search'] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
$menu['options']['client']['links'][$image_model] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
}
//$menu['options']['client']['links'][$image_model] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
$menu['options']['model']['links'][$image_import] = '/plugins/datainjection/front/clientinjection.form.php';
if (Session::haveRight('plugin_datainjection_model', UPDATE) || Session::haveRight('plugin_datainjection_model', CREATE)) {
$menu['options']['model']['links']['add'] = Toolbox::getItemTypeFormUrl('PluginDatainjectionModel', false);
$menu['options']['client']['links'][$image_model] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
}
}
return $menu;
}
示例2: ExecPhp_Admin
function ExecPhp_Admin(&$cache)
{
$this->m_cache =& $cache;
if (!is_admin()) {
return;
}
global $wp_version;
if (version_compare($wp_version, '2.6.dev') >= 0) {
load_plugin_textdomain(ExecPhp_PLUGIN_ID, false, ExecPhp_HOMEDIR . '/languages');
} else {
load_plugin_textdomain(ExecPhp_PLUGIN_ID, ExecPhp_PLUGINDIR . '/' . ExecPhp_HOMEDIR . '/languages');
}
$this->m_common_l10n = array('messageContainer' => ExecPhp_ID_MESSAGE);
$this->m_common_script =& new ExecPhp_Script(ExecPhp_ID_SCRIPT_COMMON, ExecPhp_ID_L10N_COMMON, $this->m_common_l10n, '/js/common.js', array());
$this->m_write_ui =& new ExecPhp_WriteUi($this->m_cache, $this->m_common_script);
$this->m_user_ui =& new ExecPhp_UserUi($this->m_cache);
add_action('admin_notices', array(&$this, 'action_admin_notices'), 5);
if (version_compare($wp_version, '2.1.dev') < 0) {
return;
}
$this->m_style =& new ExecPhp_Style();
$this->m_config_ui =& new ExecPhp_ConfigUi($this->m_cache, $this->m_common_script);
if (current_user_can(ExecPhp_CAPABILITY_EDIT_PLUGINS) || current_user_can(ExecPhp_CAPABILITY_EDIT_USERS)) {
$this->m_admin_l10n = array('noUserFound' => escape_dquote(__s('No user matching the query.', ExecPhp_PLUGIN_ID)), 'securityAlertHeading' => escape_dquote(__s('Exec-PHP Security Alert.', ExecPhp_PLUGIN_ID)), 'securityAlertText' => escape_dquote(__s('The Exec-PHP plugin found a security hole with the configured user rights of this blog. For further information consult the plugin configuration menu or contact your blog administrator.', ExecPhp_PLUGIN_ID)), 'requestFile' => get_option('siteurl') . '/wp-admin/admin-ajax.php', 'ajaxError' => escape_dquote(__s("Exec-PHP AJAX HTTP error when receiving data: ", ExecPhp_PLUGIN_ID)), 'action' => ExecPhp_ACTION_REQUEST_USERS, 'executeArticlesContainer' => ExecPhp_ID_INFO_EXECUTE_ARTICLES, 'widgetsContainer' => ExecPhp_ID_INFO_WIDGETS, 'securityHoleContainer' => ExecPhp_ID_INFO_SECURITY_HOLE);
$this->m_admin_script =& new ExecPhp_Script(ExecPhp_ID_SCRIPT_ADMIN, ExecPhp_ID_L10N_ADMIN, $this->m_admin_l10n, '/js/admin.js', array('sack'));
add_action('admin_footer', array(&$this, 'action_admin_footer'));
}
}
示例3: 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>";
}
示例4: showconfigForm
function showconfigForm()
{
global $CFG_GLPI;
echo "<form name='form' method='post' action='" . $CFG_GLPI["root_doc"] . "/plugins/immobilizationsheets/front/config.form.php'>";
echo "<div align=\"center\">";
echo "<table class=\"tab_cadre_fixe\" cellspacing=\"2\" cellpadding=\"2\">";
echo "<tr><th colspan=\"2\">" . __('Options', 'immobilizationsheets') . "</th></tr>";
echo "<tr class='tab_bg_1 top'>";
echo "<td>" . __('Save sheets in GLPI', 'immobilizationsheets') . ": </td>";
echo "<td>";
Dropdown::showYesNo("use_backup", $this->fields["use_backup"]);
echo "</td>";
echo "<tr class='tab_bg_1 top'><td>";
echo __('Default Heading for sheets', 'immobilizationsheets') . ": </td>";
echo "<td>";
Dropdown::show('DocumentCategory', array('name' => "documentcategories_id", 'value' => $this->fields["documentcategories_id"]));
echo "</td>";
echo "<tr><th colspan='2'>";
echo "<input type='hidden' name='id' value='1'>";
echo "<input type=\"submit\" name=\"update_config\" class=\"submit\" value=\"" . __s('Post') . "\" >";
echo "</th></tr>";
echo "</table></div>";
Html::closeForm();
echo "<br>";
}
示例5: showForm
function showForm($ID, $options = array())
{
global $DB, $CFG_GLPI;
$obj = $options['obj'];
//Html::printCleanArray($obj);
$itemtype = getItemTypeForTable($obj->getTable());
$list_ip = array();
$total_ip = 0;
if ($itemtype == 'NetworkEquipment') {
$query = "SELECT `ip`\n FROM `glpi_networkequipments`\n WHERE `id` = '" . $obj->fields['id'] . "'";
$res = $DB->query($query);
while ($row = $DB->fetch_array($res)) {
if ($row['ip'] != '') {
$list_ip[$row['ip']] = $row['ip'];
}
}
}
$tmp = array_values($list_ip);
if (count($tmp) > 0 && $tmp[0] == '') {
array_pop($list_ip);
}
$query = "SELECT `glpi_networknames`.`name`, `glpi_ipaddresses`.`name` as ip, `glpi_networkports`.`items_id`\n FROM `glpi_networkports` \n LEFT JOIN `" . $obj->getTable() . "` ON (`glpi_networkports`.`items_id` = `" . $obj->getTable() . "`.`id`\n AND `glpi_networkports`.`itemtype` = '" . $itemtype . "')\n LEFT JOIN `glpi_networknames` ON (`glpi_networkports`.`id` = `glpi_networknames`.`items_id`)\n LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)\n WHERE `" . $obj->getTable() . "`.`id` = '" . $obj->fields['id'] . "'";
$res = $DB->query($query);
while ($row = $DB->fetch_array($res)) {
if ($row['ip'] != '') {
$port = $row['ip'];
if ($row['name'] != '') {
$port = $row['name'] . " ({$port})";
}
$list_ip[$row['ip']] = $port;
}
}
echo "<table class='tab_cadre_fixe'><tr class='tab_bg_2 left'>";
echo "<tr><th colspan='4'>" . __('IP ping', 'addressing') . "</th></tr>";
if (count($list_ip) > 0) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('IP') . " : </td>";
echo "<td colspan='3'>";
echo "<select id='ip'>";
echo "<option>" . Dropdown::EMPTY_VALUE . "</option>";
foreach ($list_ip as $ip => $name) {
echo "<option value='{$ip}'>{$name}</option>";
}
echo "</select>";
echo " <input class='submit' type='button' value='" . __s('Ping', 'addressing') . "' onclick='pingIp();'>";
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Result', 'addressing') . " : </td>";
echo "<td colspan='3'>";
echo "<div id='ping_response' class='plugin_addressing_ping_equipment'></div>";
echo "</td></tr>";
}
echo "</table>";
echo "\n <script type='text/javascript'>\n function pingIp() {\n var ip = Ext.get('ip').dom.options[Ext.get('ip').dom.selectedIndex].value;\n var ping_response = Ext.get('ping_response');\n\n Ext.Ajax.request({\n url : '" . $CFG_GLPI["root_doc"] . "/plugins/addressing/ajax/ping.php' ,\n params : { ip : ip },\n method: 'POST',\n success: function ( result, request ) {\n ping_response.insertHtml('afterBegin', '<hr>'+result.responseText);\n }\n });\n }\n </script>\n ";
if (count($list_ip) == 0) {
echo __('No IP for this equipment', 'addressing');
}
}
示例6: action_sidebar_admin_page
function action_sidebar_admin_page()
{
if ($this->rtfm_widget()) {
$heading = __s('Exec-PHP Widget Conversion Warning.', ExecPhp_PLUGIN_ID);
$text = __s('Saving the widgets will render all contained PHP code permanently unuseful. Ignore this warning in case the text widgets do not contain PHP code. <a href="%s">Read the Exec-PHP documentation if you are unsure what to do next</a>.', ExecPhp_PLUGIN_ID, ExecPhp_HOME_URL . '/docs/' . __s('readme.html', ExecPhp_PLUGIN_ID) . '#execute_php');
$this->m_script->print_message($heading, $text);
}
}
示例7: getAdditionalMenuLinks
/**
* @see CommonGLPI::getAdditionalMenuLinks()
**/
static function getAdditionalMenuLinks()
{
global $CFG_GLPI;
$links = array();
$links['config'] = '/plugins/example/index.php';
$links["<img src='" . $CFG_GLPI["root_doc"] . "/pics/menu_showall.png' title='" . __s('Show all') . "' alt='" . __s('Show all') . "'>"] = '/plugins/example/index.php';
$links[__s('Test link', 'example')] = '/plugins/example/index.php';
return $links;
}
示例8: showAddForm
function showAddForm($target)
{
echo "<div align='center'><form method='post' action=\"{$target}\">";
echo "<table class='tab_cadre_fixe' cellpadding='5'><tr ><th colspan='2'>";
echo __('add not-used status in expiration mail', 'certificates') . "</th></tr>";
echo "<tr class='tab_bg_1'><td>";
Dropdown::show('PluginCertificatesCertificateState', array('name' => "plugin_certificates_certificatestates_id"));
echo "</td>";
echo "<td>";
echo "<div align='center'><input type='submit' name='add' value=\"" . __s('Post') . "\" class='submit' ></div></td></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
}
示例9: showForm
function showForm()
{
$this->getFromDB('1');
echo "<div align='center'>";
echo "<form method='post' action=\"./config.form.php\">";
echo "<table class='tab_cadre' cellpadding='5'>";
echo "<tr>";
echo "<th colspan='2'>" . __('Identification parameters of inventory number', 'financialreports') . "</th>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Computer', 'Computers', 2) . "</td>";
echo "<td><input type='text' name='computers_otherserial' value='" . $this->fields["computers_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Notebook', 'Notebooks', 2, 'financialreports') . "</td>";
echo "<td><input type='text' name='notebooks_otherserial' value='" . $this->fields["notebooks_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Server', 'Servers', 2, 'financialreports') . "</td>";
echo "<td><input type='text' name='servers_otherserial' value='" . $this->fields["servers_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Monitor', 'Monitors', 2) . "</td>";
echo "<td><input type='text' name='monitors_otherserial' value='" . $this->fields["monitors_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Printer', 'Printers', 2) . "</td>";
echo "<td><input type='text' name='printers_otherserial' value='" . $this->fields["printers_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Device', 'Devices', 2) . "</td>";
echo "<td><input type='text' name='peripherals_otherserial' value='" . $this->fields["peripherals_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Network device', 'Network devices', 2) . "</td>";
echo "<td><input type='text' name='networkequipments_otherserial' value='" . $this->fields["networkequipments_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . _n('Phone', 'Phones', 2) . "</td>";
echo "<td><input type='text' name='phones_otherserial' value='" . $this->fields["phones_otherserial"] . "'>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan='2' class='center'>";
echo "<input type='hidden' name='id' value='" . $this->fields["id"] . "'>";
echo "<input type='submit' name='update_parameters' value='" . __s('Post') . "' class='submit' >";
echo "</td></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
}
示例10: plugin_talk_MassiveActionsDisplay
function plugin_talk_MassiveActionsDisplay($options = array())
{
switch ($options['itemtype']) {
case 'Profile':
switch ($options['action']) {
case "plugin_talk_edit_profile":
echo _sx('button', 'Enable') . " : ";
Dropdown::showYesNo("is_active", 1);
echo " <input type='submit' name='massiveaction' class='submit' value='" . __s('Post') . "'>";
break;
}
break;
}
return "";
}
示例11: getMenuContent
static function getMenuContent()
{
global $CFG_GLPI;
$menu = array();
$menu['title'] = self::getMenuName();
$menu['page'] = "/plugins/ocsinventoryng/front/ocsng.php";
$menu['links']['search'] = "/plugins/ocsinventoryng/front/ocsng.php";
if (Session::haveRight(static::$rightname, UPDATE) || Session::haveRight("config", UPDATE)) {
//Entry icon in breadcrumb
$menu['links']['config'] = PluginOcsinventoryngConfig::getSearchURL(false);
//Link to config page in admin plugins list
$menu['config_page'] = PluginOcsinventoryngConfig::getSearchURL(false);
}
// Ocsserver
$menu['options']['ocsserver']['title'] = __s("Configuration of OCSNG server", 'ocsinventoryng');
$menu['options']['ocsserver']['page'] = '/plugins/ocsinventoryng/front/ocsserver.php';
$menu['options']['ocsserver']['links']['add'] = '/plugins/ocsinventoryng/front/ocsserver.form.php';
$menu['options']['ocsserver']['links']['search'] = '/plugins/ocsinventoryng/front/ocsserver.php';
// Import
$menu['options']['import']['title'] = __s('Import new computers', 'ocsinventoryng');
$menu['options']['import']['page'] = '/plugins/ocsinventoryng/front/ocsng.import.php';
// Sync
$menu['options']['sync']['title'] = __s('Synchronize computers already imported', 'ocsinventoryng');
$menu['options']['sync']['page'] = '/plugins/ocsinventoryng/front/ocsng.sync.php';
// Link
$menu['options']['link']['title'] = __s('Link new OCSNG computers to existing GLPI computers', 'ocsinventoryng');
$menu['options']['link']['page'] = '/plugins/ocsinventoryng/front/ocsng.link.php';
// Thread
$menu['options']['thread']['title'] = __s('Scripts execution of automatic actions', 'ocsinventoryng');
$menu['options']['thread']['page'] = '/plugins/ocsinventoryng/front/thread.php';
// Detail
$menu['options']['detail']['title'] = __('Computers imported by automatic actions', 'ocsinventoryng');
$menu['options']['detail']['page'] = '/plugins/ocsinventoryng/front/detail.php';
// Notimported
$menu['options']['notimported']['title'] = __s('Computers not imported by automatic actions', 'ocsinventoryng');
$menu['options']['notimported']['page'] = '/plugins/ocsinventoryng/front/notimportedcomputer.php';
if (Session::haveRight("plugin_ocsinventoryng_clean", READ)) {
// Deleted_equiv
$menu['options']['deleted_equiv']['title'] = __s('Clean OCSNG deleted computers', 'ocsinventoryng');
$menu['options']['deleted_equiv']['page'] = '/plugins/ocsinventoryng/front/deleted_equiv.php';
// Clean
$menu['options']['clean']['title'] = __s('Clean links between GLPI and OCSNG', 'ocsinventoryng');
$menu['options']['clean']['page'] = '/plugins/ocsinventoryng/front/ocsng.clean.php';
}
return $menu;
}
示例12: showForm
function showForm($target)
{
global $CFG_GLPI;
$categories = getAllDatasFromTable($this->getTable());
if (!empty($categories)) {
echo "<div align='center'>";
$rand = mt_rand();
echo "<form method='post' name='massiveaction_form_ticket{$rand}' \n id='massiveaction_form_ticket{$rand}' action='" . $target . "'>";
echo "<table class='tab_cadre_fixe' cellpadding='5'>";
echo "<tr>";
echo "<th></th><th>" . __('Category of created tickets', 'resources') . "</th>";
echo "</tr>";
foreach ($categories as $categorie) {
$ID = $categorie["id"];
echo "<tr class='tab_bg_1'>";
echo "<td class='center' width='10'>";
echo "<input type='hidden' name='id' value='{$ID}'>";
echo "<input type='checkbox' name='item[{$ID}]' value='1'>";
echo "</td>";
echo "<td>" . Dropdown::getDropdownName("glpi_itilcategories", $categorie["ticketcategories_id"]) . "</td>";
echo "</tr>";
}
Html::openArrowMassives("massiveaction_form_ticket{$rand}", true);
Html::closeArrowMassives(array('delete_ticket' => __s('Delete permanently')));
echo "</table>";
Html::closeForm();
echo "</div>";
} else {
echo "<div align='center'><form method='post' action='" . $target . "'>";
echo "<table class='tab_cadre_fixe' cellpadding='5'><tr ><th colspan='2'>";
echo __('Category of created tickets', 'resources') . "</th></tr>";
echo "<tr class='tab_bg_1'><td>";
Dropdown::show('ITILCategory', array('name' => "ticketcategories_id"));
echo "</td>";
echo "<td>";
echo "<div align='center'>";
echo "<input type='submit' name='add_ticket' value=\"" . _sx('button', 'Add') . "\" \n class='submit'>";
echo "</div></td></tr>";
echo "</table>";
Html::closeForm();
echo "</div>";
}
}
示例13: displaySearchForm
/**
* Display group form
**/
function displaySearchForm()
{
global $_SERVER, $_GET, $CFG_GLPI;
echo "<form action='" . $_SERVER["PHP_SELF"] . "' method='post'>";
echo "<table class='tab_cadre' cellpadding='5'>";
echo "<tr class='tab_bg_1 center'>";
echo "<td>";
echo __('Group') . " ";
Group::dropdown(array('name =>' => "group", 'value' => $_GET["group"], 'entity' => $_SESSION["glpiactive_entity"], 'condition' => "is_itemgroup"));
echo "</td>";
// Display Reset search
echo "<td>";
echo "<a href='" . $CFG_GLPI["root_doc"] . "/plugins/reports/report/equipmentbygroups/equipmentbygroups.php?reset_search=reset_search'>" . "<img title='" . __s('Blank') . "' alt='" . __s('Blank') . "' src='" . $CFG_GLPI["root_doc"] . "/pics/reset.png' class='calendrier'></a>";
echo "</td>";
echo "<td>";
echo "<input type='submit' value='Valider' class='submit' />";
echo "</td>";
echo "</tr></table>";
Html::closeForm();
}
示例14: showGenericSearch
function showGenericSearch($itemtype, $params)
{
global $CFG_GLPI;
// Default values of parameters
$p = array();
$p['link'] = array();
//
$p['field'] = array();
$p['contains'] = array();
$p['searchtype'] = array();
$p['sort'] = '';
$p['is_deleted'] = 0;
$p['link2'] = '';
//
$p['contains2'] = '';
$p['field2'] = '';
$p['itemtype2'] = '';
$p['searchtype2'] = '';
foreach ($params as $key => $val) {
$p[$key] = $val;
}
$options = Search::getCleanedOptions($itemtype);
// $target = Toolbox::getItemTypeSearchURL($itemtype);
// Instanciate an object to access method
$item = NULL;
if ($itemtype != 'States' && class_exists($itemtype)) {
$item = new $itemtype();
}
$linked = Search::getMetaItemtypeAvailable($itemtype);
if (!isset($_GET['id']) || strstr($_SERVER['REQUEST_URI'], 'displayview_rule.form.php')) {
$item->getEmpty();
} else {
$item->getFromDB($_GET['id']);
}
if (strstr($_SERVER['REQUEST_URI'], 'displayview_rule.form.php')) {
echo "<form name='searchform{$itemtype}' method='get' action=\"" . $CFG_GLPI['root_doc'] . "/plugins/monitoring/front/displayview_rule.form.php\">";
} else {
echo "<form name='searchform{$itemtype}' method='get' action=\"" . $CFG_GLPI['root_doc'] . "/plugins/monitoring/front/componentscatalog_rule.form.php\">";
}
$item->showFormHeader();
// echo "<form name='searchform$itemtype' method='get' action=\"".
// $CFG_GLPI['root_doc']."/plugins/monitoring/front/componentscatalog_rule.form.php\">";
// echo "<table class='tab_cadre_fixe'>";
echo "<tr class='tab_bg_1'>";
echo "<td>";
echo __('Name') . " :";
echo "</td>";
echo "<td>";
echo "<input type='text' name='name' value='" . $_GET['name'] . "'/>";
echo "</td>";
echo "<td>";
echo __('Status') . " :";
echo "</td>";
echo "<td>";
echo $_GET['itemtype'];
echo "</td>";
echo "</tr>";
if (isset($_GET['itemtype'])) {
echo "<tr class='tab_bg_1'>";
echo "<td colspan='3'>";
echo "<table>";
// Display normal search parameters
for ($i = 0; $i < $_SESSION["glpisearchcount"][$itemtype]; $i++) {
echo "<tr><td class='left' width='50%'>";
// First line display add / delete images for normal and meta search items
if ($i == 0) {
echo "<input type='hidden' disabled id='add_search_count' name='add_search_count'\n value='1'>";
echo "<a href='#' onClick = \"document.getElementById('add_search_count').disabled=false;\n document.forms['searchform{$itemtype}'].submit();\">";
echo "<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/plus.png\" alt='+' title=\"" . __s('Add a search criterion') . "\"></a> ";
if ($_SESSION["glpisearchcount"][$itemtype] > 1) {
echo "<input type='hidden' disabled id='delete_search_count'\n name='delete_search_count' value='1'>";
echo "<a href='#' onClick = \"document.getElementById('delete_search_count').disabled=false;\n document.forms['searchform{$itemtype}'].submit();\">";
echo "<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/moins.png\" alt='-' title=\"" . __s('Delete a search criterion') . "\"></a> ";
}
if (is_array($linked) && count($linked) > 0) {
echo "<input type='hidden' disabled id='add_search_count2' name='add_search_count2'\n value='1'>";
echo "<a href='#' onClick=\"document.getElementById('add_search_count2').disabled=false;\n document.forms['searchform{$itemtype}'].submit();\">";
echo "<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/meta_plus.png\" alt='+' title=\"" . __s('Add a global search criterion') . "\"></a> ";
if ($_SESSION["glpisearchcount2"][$itemtype] > 0) {
echo "<input type='hidden' disabled id='delete_search_count2'\n name='delete_search_count2' value='1'>";
echo "<a href='#' onClick=\"document.getElementById('delete_search_count2').disabled=false;\n document.forms['searchform{$itemtype}'].submit();\">";
echo "<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/meta_moins.png\" alt='-' title=\"" . __s('Delete a global search criterion') . "\"></a> ";
}
}
// $itemtable = getTableForItemType($itemtype);
// if ($item && $item->maybeDeleted()) {
// echo "<input type='hidden' id='is_deleted' name='is_deleted' value='".
// $p['is_deleted']."'>";
// echo "<a href='#' onClick = \"toogle('is_deleted','','','');
// document.forms['searchform$itemtype'].submit();\">
// <img src=\"".$CFG_GLPI["root_doc"]."/pics/showdeleted".
// (!$p['is_deleted']?'_no':'').".png\" name='img_deleted' alt=\"".
// (!$p['is_deleted']?$LANG['common'][3]:$LANG['common'][81])."\" title=\"".
// (!$p['is_deleted']?$LANG['common'][3]:$LANG['common'][81])."\" ></a>";
// // Dropdown::showYesNo("is_deleted",$p['is_deleted']);
// echo ' ';
// }
}
// Display link item
if ($i > 0) {
//.........这里部分代码省略.........
示例15: prev_form
function prev_form($host, $user, $password)
{
echo "<br><form action='install.php' method='post'>";
echo "<input type='hidden' name='db_host' value='" . $host . "'>";
echo "<input type='hidden' name='db_user' value='" . $user . "'>";
echo " <input type='hidden' name='db_pass' value='" . rawurlencode($password) . "'>";
echo "<input type='hidden' name='update' value='no'>";
echo "<input type='hidden' name='install' value='Etape_2'>";
echo "<p class='submit'><input type='submit' name='submit' class='submit' value='" . __s('Back') . "'></p>";
Html::closeForm();
}