本文整理汇总了PHP中Html::header方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::header方法的具体用法?PHP Html::header怎么用?PHP Html::header使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Html
的用法示例。
在下文中一共展示了Html::header方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loggendIn
/**
* HTML for logged in users
*/
private function loggendIn($css, $data)
{
$mail = '';
if (isset($_SESSION['__sessiondata']['email'])) {
$mail = '<span style="font-size:10px;">';
$mail .= $_SESSION['__sessiondata']['email'];
$mail .= '</span>';
}
$twitterUserForm = '';
$shortenerForm = 'URL shortener: ';
if ($data) {
if (isset($data->twitter) && $data->twitter) {
foreach ($data->twitter as $tw) {
$twitterUserForm .= '<input type="checkbox" name="postdata[twitterUser][]" value="' . $tw['username'] . '" style="float:none;" ><span style="margin-right:3px;">' . $tw['username'] . '</span>';
// . '<br />';
}
}
if (isset($data->shortener) && $data->shortener) {
$i = 1;
foreach ($data->shortener as $sh) {
$shortenerForm .= '<input type="radio" name="postdata[shortener]" value="' . $sh['service'] . '|' . $sh['username'] . '" ' . ($i === 1 ? 'checked=checked' : '') . ' style="margin:0;float:left;" /><span style="margin-right:3px;">' . $sh['username'] . ' ' . $sh['service'] . '</span>';
$i++;
}
}
}
// get Header
$html = Html::header($css, $mail);
$html .= <<<HTMLSTUFF
<div id="socialRouter_main">
<form id="socialRouterForm" name="socialRouterForm" accept-charset="utf-8" action="http://sr2.soluch.at/load/delegateMessage/" method="post" target="_blank" >
<textarea id="sr_textarea" name="postdata[message]" cols="35" rows="3" >
{$data->shorturl}
</textarea>
{$shortenerForm}
<div style="float:right;">chars used: <span id="sr_charCount" style="color:#D94432;font-weight:bold;"></span></div>
<hr />
<!--input id="twitteruser" type="text" maxlength="30" name="postdata[twitteruser]" value="php_live" /-->
<a href="http://sr2.soluch.at/twitter/add/" target="_blank" >add a twitter account</a><br />
{$twitterUserForm}
<br />
<hr />
\t<input type="submit" value="Route" id="submitSocial" />
</form>
<div id="otherContent">
</div>
</div>
HTMLSTUFF;
// get Footer
$html .= Html::footer();
return $html;
}
示例2: sprintf
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 show network port by network equipment
*/
include '../inc/includes.php';
Session::checkRight("reports", READ);
// Titre
if (isset($_POST["switch"]) && $_POST["switch"]) {
Html::header(Report::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "tools", "report");
Report::title();
$name = Dropdown::getDropdownName("glpi_networkequipments", $_POST["switch"]);
echo "<div class='center spaced'><h2>" . sprintf(__('Network report by hardware: %s'), $name) . "</h2></div>";
Report::reportForNetworkInformations("`glpi_networkequipments` AS ITEM", "PORT_1.`itemtype` = 'NetworkEquipment'\n AND PORT_1.`items_id` = ITEM.`id`", "ITEM.`id` = '" . $_POST["switch"] . "'");
Html::footer();
} else {
Html::redirect($CFG_GLPI['root_doc'] . "/front/report.networking.php");
}
示例3: define
-------------------------------------------------------------------------
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
* @since version 0.85
*/
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
Session::checkRight("queuedmail", READ);
Html::header(QueuedMail::getTypeName(), $_SERVER['PHP_SELF'], "admin", "queuedmail");
Search::show('QueuedMail');
Html::footer();
示例4: foreach
Html::back();
} else {
if (isset($_POST["test_ldap_replicate"])) {
foreach ($_POST["test_ldap_replicate"] as $replicate_id => $value) {
$replicate = new AuthLdapReplicate();
$replicate->getFromDB($replicate_id);
if (AuthLdap::testLDAPConnection($_POST["id"], $replicate_id)) {
//TRANS: %s is the description of the test
$_SESSION["LDAP_TEST_MESSAGE"] = sprintf(__('Test successful: %s'), sprintf(__('Replicate %s'), $ldap->fields["name"]));
} else {
//TRANS: %s is the description of the test
$_SESSION["LDAP_TEST_MESSAGE"] = sprintf(__('Test failed: %s'), sprintf(__('Replicate %s'), $ldap->fields["name"]));
}
}
Html::back();
} else {
if (isset($_POST["add_replicate"])) {
$replicate = new AuthLdapReplicate();
unset($_POST["next"]);
unset($_POST["id"]);
$replicate->add($_POST);
Html::back();
}
}
}
}
}
}
Html::header(AuthLDAP::getTypeName(1), $_SERVER['PHP_SELF'], 'config', 'extauth', 'ldap');
$config_ldap->showForm($_GET["id"], $_GET);
Html::footer();
示例5: PluginWebservicesClient
@link http://www.glpi-project.org/
@since 2009
--------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Plugin::load('webservices', true);
if (!isset($_GET["id"])) {
$_GET["id"] = "";
}
$webservices = new PluginWebservicesClient();
if (isset($_POST["add"])) {
$webservices->check(-1, CREATE, $_POST);
$webservices->add($_POST);
Html::back();
} else {
if (isset($_POST["update"])) {
$webservices->check($_POST["id"], UPDATE);
$webservices->update($_POST);
Html::back();
} else {
if (isset($_POST["purge"])) {
$webservices->check($_POST["id"], PURGE);
$webservices->delete($_POST);
Html::redirect($CFG_GLPI["root_doc"] . "/plugins/webservices/front/client.php");
} else {
Html::header(__('Web Services', 'webservices'), $_SERVER['PHP_SELF'], "config", "pluginWebservicesClient");
$webservices->display(array('id' => $_GET["id"]));
Html::footer();
}
}
}
示例6: Problem_User
$problem_user = new Problem_User();
$problem_user->check($_POST['id'], 'd');
$problem_user->delete($_POST);
Event::log($_POST['problems_id'], "problem", 4, "maintain", sprintf(__('%s deletes an actor'), $_SESSION["glpiname"]));
Html::redirect($CFG_GLPI["root_doc"] . "/front/problem.form.php?id=" . $_POST['problems_id']);
} else {
if (isset($_POST['delete_group'])) {
$group_problem = new Group_Problem();
$group_problem->check($_POST['id'], 'd');
$group_problem->delete($_POST);
Event::log($_POST['problems_id'], "problem", 4, "maintain", sprintf(__('%s deletes an actor'), $_SESSION["glpiname"]));
Html::redirect($CFG_GLPI["root_doc"] . "/front/problem.form.php?id=" . $_POST['problems_id']);
} else {
if (isset($_POST['delete_supplier'])) {
$problem_supplier = new Problem_Supplier();
$problem_supplier->check($_POST['id'], 'd');
$problem_supplier->delete($_POST);
Event::log($_POST['problems_id'], "problem", 4, "maintain", sprintf(__('%s deletes an actor'), $_SESSION["glpiname"]));
Html::redirect($CFG_GLPI["root_doc"] . "/front/problem.form.php?id=" . $_POST['problems_id']);
} else {
Html::header(Problem::getTypeName(2), $_SERVER['PHP_SELF'], "maintain", "problem");
$problem->showForm($_GET["id"], $_GET);
Html::footer();
}
}
}
}
}
}
}
}
示例7: includeLocales
reports 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 reports. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
$USEDBREPLICATE = 1;
$DBCONNECTION_REQUIRED = 0;
// Not really a big SQL request
include "../../../../inc/includes.php";
includeLocales("equipmentbygroups");
//TRANS: The name of the report = List all devices of a group, ordered by users
Html::header(__('equipmentbygroups_report_title', 'reports'), $_SERVER['PHP_SELF'], "utils", "report");
Report::title();
if (isset($_GET["reset_search"])) {
resetSearch();
}
$_GET = getValues($_GET, $_POST);
displaySearchForm();
$sql = "SELECT `id` AS group_id,\n `name` AS group_name\n FROM `glpi_groups`\n WHERE `entities_id` = " . $_SESSION["glpiactive_entity"] . (isset($_GET["groups_id"]) && $_GET["groups_id"] ? " AND `glpi_groups`.`id` = " . $_GET["groups_id"] : "") . "\n ORDER BY `name`";
$result = $DB->query($sql);
$last_group_id = -1;
while ($datas = $DB->fetch_array($result)) {
if ($last_group_id != $datas["group_id"]) {
echo "<table class='tab_cadre' cellpadding='5'>";
echo "<tr><th>" . sprintf(__('%1$s: %2$s'), __('Group'), $datas['group_name']) . "</th></th></tr>";
$last_group_id = $datas["group_id"];
echo "</table>";
示例8: Copyright
Copyright (C) 2003-2013 by the INDEPNET Development Team.
http://indepnet.net/ http://glpi-project.org
-------------------------------------------------------------------------
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::checkRight("profile", "r");
Html::header(Profile::getTypeName(2), $_SERVER['PHP_SELF'], "admin", "profile");
Search::show('Profile');
Html::footer();
示例9: includeLocales
You should have received a copy of the GNU General Public License
along with reports. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
// Original Author of file: Benoit Machiavello
// ----------------------------------------------------------------------
$USEDBREPLICATE = 1;
$DBCONNECTION_REQUIRED = 1;
// Really a big SQL request
include "../../../../inc/includes.php";
includeLocales("histohard");
plugin_reports_checkRight('reports', "histohard", "r");
$computer = new Computer();
$computer->checkGlobal('r');
//TRANS: The name of the report = History of last hardware's installations
Html::header(__("histohard_report_title", 'reports'), $_SERVER['PHP_SELF'], "utils", "report");
Report::title();
echo "<div class='center'>";
echo "<table class='tab_cadrehov'>\n";
echo "<tr class='tab_bg_1 center'>" . "<th colspan='5'>" . __("History of last hardware's installations", 'reports') . "</th></tr>\n";
echo "<tr><th>" . __('Date of inventory', 'reports') . "</th>" . "<th>" . __('User') . "</th>" . "<th>" . __('Network device') . "</th>" . "<th>" . __(-'Field') . "</th>" . "<th>" . __('Modification', 'reports') . "</th></tr>\n";
$sql = "SELECT `glpi_logs`.`date_mod` AS dat, `linked_action`, `itemtype`, `itemtype_link`,\n `old_value`, `new_value`, `glpi_computers`.`id` AS cid, `name`, `user_name`\n FROM `glpi_logs`\n LEFT JOIN `glpi_computers` ON (`glpi_logs`.`items_id` = `glpi_computers`.`id`)\n WHERE `glpi_logs`.`date_mod` > DATE_SUB(Now(), INTERVAL 21 DAY)\n AND `itemtype` = 'Computer'\n AND `linked_action` IN (" . Log::HISTORY_CONNECT_DEVICE . ",\n " . Log::HISTORY_DISCONNECT_DEVICE . ",\n " . Log::HISTORY_DELETE_DEVICE . ",\n " . Log::HISTORY_UPDATE_DEVICE . ",\n " . Log::HISTORY_ADD_DEVICE . ")\n AND `glpi_computers`.`entities_id` = '" . $_SESSION["glpiactive_entity"] . "'\n ORDER BY `glpi_logs`.`id` DESC\n LIMIT 0,100";
$result = $DB->query($sql);
$prev = "";
$class = "tab_bg_2";
while ($data = $DB->fetch_array($result)) {
if ($prev == $data["dat"] . $data["name"]) {
echo "</td></tr><tr class='" . $prevclass . " top'><td></td><td></td><td></td><td>";
} else {
if (!empty($prev)) {
echo "</td></tr>\n";
示例10: Copyright
Copyright (C) 2003-2013 by the INDEPNET Development Team.
http://indepnet.net/ http://glpi-project.org
-------------------------------------------------------------------------
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::checkRight("budget", "r");
Html::header(Budget::getTypeName(1), $_SERVER['PHP_SELF'], "financial", "budget");
Search::show('Budget');
Html::footer();
示例11: PluginResourcesResource
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Resources 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 Resources. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
//central or helpdesk access
if ($_SESSION['glpiactiveprofile']['interface'] == 'central') {
Html::header(PluginResourcesResource::getTypeName(2), '', "plugins", "resources");
} else {
Html::helpHeader(PluginResourcesResource::getTypeName(2));
}
$resource = new PluginResourcesResource();
if ($resource->canView() || Session::haveRight("config", "w")) {
if (plugin_resources_haveRight("all", "w")) {
//Have right to see all resources
//Have not right to see all resources
echo "<div align='center'><script type='text/javascript'>";
echo "cleanhide('modal_resource_content');";
echo "var account_window=new Ext.Window({\n layout:'fit',\n width:800,\n height:400,\n closeAction:'hide',\n modal: true,\n autoScroll: true,\n title: \"" . __('View by contract type', 'resources') . "\",\n autoLoad: '" . $CFG_GLPI['root_doc'] . "/plugins/resources/ajax/resourcetree.php'\n });";
echo "</script>";
echo "<a onclick='account_window.show();' href='#modal_resource_content' title='" . __('View by contract type', 'resources') . "'>" . __('View by contract type', 'resources') . "</a>";
echo "</div>";
}
示例12: Copyright
You should have received a copy of the GNU Affero General Public License
along with Surveyticket plugin. If not, see <http://www.gnu.org/licenses/>.
------------------------------------------------------------------------
@package Surveyticket plugin
@author David Durieux
@copyright Copyright (c) 2012-2013 Surveyticket plugin team
@license AGPL License 3.0 or (at your option) any later version
http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link https://forge.indepnet.net/projects/surveyticket
@since 2012
------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Html::header("surveyticket", $_SERVER["PHP_SELF"], "plugins", "surveyticket", "surveyquestion");
$psSurveyQuestion = new PluginSurveyticketSurveyQuestion();
if (isset($_POST["add"])) {
if ($_POST['plugin_surveyticket_questions_id'] > 0) {
$psSurveyQuestion->add($_POST);
}
Html::back();
} else {
if (isset($_POST["delete"])) {
$psSurveyQuestion->delete($_POST);
Html::back();
}
}
Html::footer();
示例13: SLA
$_GET["id"] = "";
}
$sla = new SLA();
if (isset($_POST["add"])) {
$sla->check(-1, CREATE);
if ($newID = $sla->add($_POST)) {
Event::log($newID, "slas", 4, "setup", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $_POST["name"]));
if ($_SESSION['glpibackcreated']) {
Html::redirect($sla->getFormURL() . "?id=" . $newID);
}
}
Html::redirect($CFG_GLPI["root_doc"] . "/front/sla.php");
} else {
if (isset($_POST["purge"])) {
$sla->check($_POST["id"], PURGE);
$sla->delete($_POST, 1);
Event::log($_POST["id"], "slas", 4, "setup", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
$sla->redirectToList();
} else {
if (isset($_POST["update"])) {
$sla->check($_POST["id"], UPDATE);
$sla->update($_POST);
Event::log($_POST["id"], "slas", 4, "setup", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
Html::back();
} else {
Html::header(SLA::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "config", "sla");
$sla->display(array('id' => $_GET["id"]));
Html::footer();
}
}
}
示例14: plugin_ocsinventoryng_checkRight
Ocsinventoryng plugin 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.
Ocsinventoryng plugin 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 ocsinventoryng. If not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------------------------------------------------------------------------------- */
include '../../../inc/includes.php';
plugin_ocsinventoryng_checkRight("ocsng", "w");
Html::header('OCS Inventory NG', "", "plugins", "ocsinventoryng", "link");
$CFG_GLPI["use_ajax"] = 1;
//First time this screen is displayed : set the import mode to 'basic'
if (!isset($_SESSION["change_import_mode"])) {
$_SESSION["change_import_mode"] = false;
}
//Changing the import mode
if (isset($_POST["change_import_mode"])) {
if ('id' == "false") {
$_SESSION["change_import_mode"] = false;
} else {
$_SESSION["change_import_mode"] = true;
}
}
if (isset($_SESSION["ocs_link"])) {
if ($count = count($_SESSION["ocs_link"])) {
示例15: Transfer
(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';
Html::header(__('Transfer'), '', 'admin', 'rule', 'transfer');
$transfer = new Transfer();
$transfer->checkGlobal(READ);
if (isset($_POST['transfer'])) {
if (isset($_SESSION['glpitransfer_list'])) {
if (!Session::haveAccessToEntity($_POST['to_entity'])) {
Html::displayRightError();
}
$transfer->moveItems($_SESSION['glpitransfer_list'], $_POST['to_entity'], $_POST);
unset($_SESSION['glpitransfer_list']);
echo "<div class='b center'>" . __('Operation successful') . "<br>";
echo "<a href='central.php'>" . __('Back') . "</a></div>";
Html::footer();
exit;
}
} else {