本文整理汇总了PHP中support函数的典型用法代码示例。如果您正苦于以下问题:PHP support函数的具体用法?PHP support怎么用?PHP support使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了support函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: connect_error
function connect_error()
{
global $connection, $token, $error, $drivers;
$databases = array();
if (DB != "") {
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
} else {
if ($_POST["db"] && !$error) {
queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
}
page_header(lang('Select database'), $error, false);
echo "<p><a href='" . h(ME) . "database='>" . lang('Create new database') . "</a>\n";
foreach (array('privileges' => lang('Privileges'), 'processlist' => lang('Process list'), 'variables' => lang('Variables'), 'status' => lang('Status')) as $key => $val) {
if (support($key)) {
echo "<a href='" . h(ME) . "{$key}='>{$val}</a>\n";
}
}
echo "<p>" . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>{$connection->server_info}</b>", "<b>{$connection->extension}</b>") . "\n";
echo "<p>" . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
if ($_GET["refresh"]) {
set_session("dbs", null);
}
$databases = get_databases();
if ($databases) {
$scheme = support("scheme");
$collations = collations();
echo "<form action='' method='post'>\n";
echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);'>\n";
echo "<thead><tr><td> <th>" . lang('Database') . "<td>" . lang('Collation') . "<td>" . lang('Tables') . "</thead>\n";
foreach ($databases as $db) {
$root = h(ME) . "db=" . urlencode($db);
echo "<tr" . odd() . "><td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]));
echo "<th><a href='{$root}'>" . h($db) . "</a>";
echo "<td><a href='{$root}" . ($scheme ? "&ns=" : "") . "&database=' title='" . lang('Alter database') . "'>" . nbsp(db_collation($db, $collations)) . "</a>";
echo "<td align='right'><a href='{$root}&schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>?</a>";
echo "\n";
}
echo "</table>\n";
echo "<script type='text/javascript'>tableCheck();</script>\n";
echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)", 1) . ">\n";
// 1 - eventStop
echo "<input type='hidden' name='token' value='{$token}'>\n";
echo "<a href='" . h(ME) . "refresh=1' onclick='eventStop(event);'>" . lang('Refresh') . "</a>\n";
echo "</form>\n";
}
}
page_footer("db");
if ($databases) {
echo "<script type='text/javascript'>ajaxSetHtml('" . js_adminer_escape(ME) . "script=connect');</script>\n";
}
}
开发者ID:nishant368,项目名称:newlifeoffice-new,代码行数:51,代码来源:connect.inc.php
示例2: connect_error
function connect_error()
{
global $adminer, $connection, $token, $error, $drivers;
if (DB != "") {
header("HTTP/1.1 404 Not Found");
page_header(lang('Database') . ": " . h(DB), lang('Invalid database.'), true);
} else {
if ($_POST["db"] && !$error) {
queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
}
//Encabezado y botones de la parte superior en la seleccion de bases de datos
page_header(lang('Select database'), $error, false);
echo "<p>\n";
foreach (array('database' => lang('Create new database'), 'privileges' => lang('Privileges'), 'processlist' => lang('Process list'), 'variables' => lang('Variables'), 'status' => lang('Status')) as $key => $val) {
if (support($key)) {
echo "<a class='btn btn-xs btn-primary' href='" . h(ME) . "{$key}='>{$val}</a>\n";
}
}
//Presenta informacion de la conexion
echo "<p><i class='fa fa-exchange fa-fw'></i> " . lang('%s version: %s through PHP extension %s', $drivers[DRIVER], "<b>" . h($connection->server_info) . "</b>", "<b>{$connection->extension}</b>") . "\n";
echo "<p><i class='fa fa-user fa-fw'></i> " . lang('Logged as: %s', "<b>" . h(logged_user()) . "</b>") . "\n";
//Presenta la lista de bases de datos existentes y los encabezados
$databases = $adminer->databases();
if ($databases) {
$scheme = support("scheme");
$collations = collations();
echo "<form action='' method='post'>\n";
echo "<table cellspacing='0' class='checkable table table-condensed table-responsive table-hover' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
echo "<thead><tr>" . (support("database") ? "<th> " : "") . "<th>" . lang('Database') . " - <a class='btn btn-default btn-xs' href='" . h(ME) . "refresh=1'><i class='fa fa-refresh fa-fw'></i> " . lang('Refresh') . "</a>" . "<th>" . lang('Collation') . "<th>" . lang('Tables') . "<th>" . lang('Size') . " - <a class='btn btn-default btn-xs' href='" . h(ME) . "dbsize=1' onclick=\"return !ajaxSetHtml('" . js_escape(ME) . "script=connect');\">" . lang('Compute') . "</a>" . "</thead>\n";
//Presenta la lista de bases de datos
$databases = $_GET["dbsize"] ? count_tables($databases) : array_flip($databases);
foreach ($databases as $db => $tables) {
$root = h(ME) . "db=" . urlencode($db);
echo "<tr" . odd() . ">" . (support("database") ? "\n\t\t\t\t\t<td align=center>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : "");
echo "<th><a href='{$root}'>" . h($db) . "</a>";
$collation = nbsp(db_collation($db, $collations));
echo "<td>" . (support("database") ? "<a href='{$root}" . ($scheme ? "&ns=" : "") . "&database=' title='" . lang('Alter database') . "'>{$collation}</a>" : $collation);
echo "<td align='right'><a href='{$root}&schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
echo "<td align='right' id='size-" . h($db) . "'>" . ($_GET["dbsize"] ? db_size($db) : "?");
echo "\n";
}
echo "</table>\n";
//Agrega boton de eliminar
echo support("database") ? "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n" . "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^db/));\">\n" . "<input class='btn btn-xs btn-danger' type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n" . "</div></fieldset>\n" : "";
echo "<script type='text/javascript'>tableCheck();</script>\n";
echo "<input type='hidden' name='token' value='{$token}'>\n";
echo "</form>\n";
}
}
page_footer("db");
}
开发者ID:unix4you2,项目名称:pmydb,代码行数:51,代码来源:connect.inc.php
示例3: foreach
<p id="tags" class="tags">
</p>
<table id="demos">
<thead>
<tr>
<th>Demo</th>
<th>Support</th>
<th>Technology</th>
</tr>
</thead>
<tbody>
<?php foreach ($demos as $demo) :?>
<tr>
<td class="demo"><a href="<?=$demo->url?>"><?=$demo->desc?></a><?php if (isset($demo->note)) { echo ' <small>' . $demo->note . '</small>'; }?></td>
<td class="support"><?=support($demo->support, $demo->url)?></td>
<td class="tags"><?=spans($demo->tags)?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<p>All content, code, video and audio is <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Share Alike 2.0</a></p>
</article>
<a id="html5badge" href="http://www.w3.org/html/logo/">
<img src="http://www.w3.org/html/logo/badge/html5-badge-h-connectivity-device-graphics-multimedia-performance-semantics-storage.png" width="325" height="64" alt="HTML5 Powered with Connectivity / Realtime, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage" title="HTML5 Powered with Connectivity / Realtime, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage">
</a>
<footer><a id="built" href="http://twitter.com/rem">@rem built this</a></footer>
</section>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
开发者ID:nitzan,项目名称:html5demos,代码行数:31,代码来源:index.php
示例4: page_header
/** Print HTML header
* @param string used in title, breadcrumb and heading, should be HTML escaped
* @param string
* @param mixed array("key" => "link", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server
* @param string used after colon in title and heading, should be HTML escaped
* @return null
*/
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "")
{
global $LANG, $VERSION, $adminer, $drivers, $jush;
page_headers();
$title_all = $title . ($title2 != "" ? ": {$title2}" : "");
$title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
?>
<!DOCTYPE html>
<html lang="<?php
echo $LANG;
?>
" dir="<?php
echo lang('ltr');
?>
">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
<title><?php
echo $title_page;
?>
</title>
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
<script type="text/javascript" src="../adminer/static/functions.js"></script>
<script type="text/javascript" src="static/editing.js"></script>
<?php
if ($adminer->head()) {
?>
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
<link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
<?php
if (file_exists("adminer.css")) {
?>
<link rel="stylesheet" type="text/css" href="adminer.css">
<?php
}
}
?>
<body class="<?php
echo lang('ltr');
?>
nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);">
<script type="text/javascript">
document.body.className = document.body.className.replace(/ nojs/, ' js');
</script>
<div id="help" class="jush-<?php
echo $jush;
?>
jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div>
<div id="content">
<?php
if ($breadcrumb !== null) {
$link = substr(preg_replace('~\\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> » ';
$link = substr(preg_replace('~\\b(db|ns)=[^&]*&~', '', ME), 0, -1);
$server = SERVER != "" ? h(SERVER) : lang('Server');
if ($breadcrumb === false) {
echo "{$server}\n";
} else {
echo "<a href='" . ($link ? h($link) : ".") . "' accesskey='1' title='Alt+Shift+1'>{$server}</a> » ";
if ($_GET["ns"] != "" || DB != "" && is_array($breadcrumb)) {
echo '<a href="' . h($link . "&db=" . urlencode(DB) . (support("scheme") ? "&ns=" : "")) . '">' . h(DB) . '</a> » ';
}
if (is_array($breadcrumb)) {
if ($_GET["ns"] != "") {
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
}
foreach ($breadcrumb as $key => $val) {
$desc = is_array($val) ? $val[1] : h($val);
if ($desc != "") {
echo "<a href='" . h(ME . "{$key}=") . urlencode(is_array($val) ? $val[0] : $val) . "'>{$desc}</a> » ";
}
}
}
echo "{$title}\n";
}
}
echo "<h2>{$title_all}</h2>\n";
restart_session();
page_messages($error);
$databases =& get_session("dbs");
if (DB != "" && $databases && !in_array(DB, $databases, true)) {
$databases = null;
}
stop_session();
define("PAGE_HEADER", 1);
}
开发者ID:umairriaz90,项目名称:Daschug1,代码行数:97,代码来源:design.inc.php
示例5: preg_match
$default = $regs[1];
}
}
$value = $row !== null ? $row[$name] != "" && $jush == "sql" && preg_match("~enum|set~", $field["type"]) ? is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name] : $row[$name] : (!$update && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : $default));
if (!$_POST["save"] && is_string($value)) {
$value = $adminer->editVal($value, $field);
}
$function = $_POST["save"] ? (string) $_POST["function"][$name] : ($update && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : ($value !== null ? '' : 'NULL')));
if (preg_match("~time~", $field["type"]) && $value == "CURRENT_TIMESTAMP") {
$value = "";
$function = "now";
}
input($field, $value, $function);
echo "\n";
}
if (!support("table")) {
echo "<tr>" . "<th><input name='field_keys[]' value='" . h($_POST["field_keys"][0]) . "'>" . "<td class='function'>" . html_select("field_funs[]", $adminer->editFunctions(array()), $_POST["field_funs"][0]) . "<td><input name='field_vals[]' value='" . h($_POST["field_vals"][0]) . "'>" . "\n";
}
echo "</table>\n";
}
?>
<p>
<?php
if ($fields) {
echo "<input type='submit' value='" . lang('Save') . "'>\n";
if (!isset($_GET["select"])) {
echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Saving') . '...", this)' : lang('Save and insert next')) . "' title='Ctrl+Shift+Enter'>\n";
}
}
echo $update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'" . confirm() . ">\n" : ($_POST || !$fields ? "" : "<script type='text/javascript'>focus(document.getElementById('form').getElementsByTagName('td')[1].firstChild);</script>\n");
if (isset($_GET["select"])) {
开发者ID:amit0773,项目名称:manaslake,代码行数:31,代码来源:edit.inc.php
示例6: support
?>
<tr>
<td class="demo"><a href="<?php
echo $demo->url;
?>
"><?php
echo $demo->desc;
?>
</a><?php
if (isset($demo->note)) {
echo ' <small>' . $demo->note . '</small>';
}
?>
</td>
<td class="support"><?php
echo support($demo->support);
?>
</td>
<td class="tags"><?php
echo spans($demo->tags);
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<!-- <section>
<a href="http://full-frontal.org" id="ffad" title="JavaScript Conference: Full Frontal, 20th November">
开发者ID:Wrenbjor,项目名称:html5demos,代码行数:31,代码来源:index.php
示例7: lang
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
$foreign_keys = foreign_keys($TABLE);
if ($foreign_keys) {
echo "<table cellspacing='0'>\n";
echo "<thead><tr><th>" . lang('Source') . "<td>" . lang('Target') . "<td>" . lang('ON DELETE') . "<td>" . lang('ON UPDATE') . "<td> </thead>\n";
foreach ($foreign_keys as $name => $foreign_key) {
echo "<tr title='" . h($name) . "'>";
echo "<th><i>" . implode("</i>, <i>", array_map('h', $foreign_key["source"])) . "</i>";
echo "<td><a href='" . h($foreign_key["db"] != "" ? preg_replace('~db=[^&]*~', "db=" . urlencode($foreign_key["db"]), ME) : ($foreign_key["ns"] != "" ? preg_replace('~ns=[^&]*~', "ns=" . urlencode($foreign_key["ns"]), ME) : ME)) . "table=" . urlencode($foreign_key["table"]) . "'>" . ($foreign_key["db"] != "" ? "<b>" . h($foreign_key["db"]) . "</b>." : "") . ($foreign_key["ns"] != "" ? "<b>" . h($foreign_key["ns"]) . "</b>." : "") . h($foreign_key["table"]) . "</a>";
echo "(<i>" . implode("</i>, <i>", array_map('h', $foreign_key["target"])) . "</i>)";
echo "<td>" . nbsp($foreign_key["on_delete"]) . "\n";
echo "<td>" . nbsp($foreign_key["on_update"]) . "\n";
echo '<td><a href="' . h(ME . 'foreign=' . urlencode($TABLE) . '&name=' . urlencode($name)) . '">' . lang('Alter') . '</a>';
}
echo "</table>\n";
}
echo '<p class="links"><a href="' . h(ME) . 'foreign=' . urlencode($TABLE) . '">' . lang('Add foreign key') . "</a>\n";
}
}
if (support(is_view($table_status) ? "view_trigger" : "trigger")) {
echo "<h3 id='triggers'>" . lang('Triggers') . "</h3>\n";
$triggers = triggers($TABLE);
if ($triggers) {
echo "<table cellspacing='0'>\n";
foreach ($triggers as $key => $val) {
echo "<tr valign='top'><td>" . h($val[0]) . "<td>" . h($val[1]) . "<th>" . h($key) . "<td><a href='" . h(ME . 'trigger=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>\n";
}
echo "</table>\n";
}
echo '<p class="links"><a href="' . h(ME) . 'trigger=' . urlencode($TABLE) . '">' . lang('Add trigger') . "</a>\n";
}
开发者ID:umairriaz90,项目名称:Daschug1,代码行数:31,代码来源:table.inc.php
示例8: edit_form
/** Print edit data form
* @param string
* @param array
* @param mixed
* @param bool
* @return null
*/
function edit_form($TABLE, $fields, $row, $update)
{
global $adminer, $jush, $token, $error;
$table_name = $adminer->tableName(table_status1($TABLE, true));
page_header($update ? lang('Edit') : lang('Insert'), $error, array("select" => array($TABLE, $table_name)), $table_name);
if ($row === false) {
echo "<p class='error'>" . lang('No rows.') . "\n";
}
?>
<form action="" method="post" enctype="multipart/form-data" id="form">
<?php
if (!$fields) {
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
} else {
echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";
foreach ($fields as $name => $field) {
echo "<tr><th>" . $adminer->fieldName($field);
$default = $_GET["set"][bracket_escape($name)];
if ($default === null) {
$default = $field["default"];
if ($field["type"] == "bit" && preg_match("~^b'([01]*)'\$~", $default, $regs)) {
$default = $regs[1];
}
}
$value = $row !== null ? $row[$name] != "" && $jush == "sql" && preg_match("~enum|set~", $field["type"]) ? is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name] : $row[$name] : (!$update && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : $default));
if (!$_POST["save"] && is_string($value)) {
$value = $adminer->editVal($value, $field);
}
$function = $_POST["save"] ? (string) $_POST["function"][$name] : ($update && $field["on_update"] == "CURRENT_TIMESTAMP" ? "now" : ($value === false ? null : ($value !== null ? '' : 'NULL')));
if (preg_match("~time~", $field["type"]) && $value == "CURRENT_TIMESTAMP") {
$value = "";
$function = "now";
}
input($field, $value, $function);
echo "\n";
}
if (!support("table")) {
echo "<tr>" . "<th><input name='field_keys[]' onkeyup='keyupChange.call(this);' onchange='fieldChange(this);' value=''>" . "<td class='function'>" . html_select("field_funs[]", $adminer->editFunctions(array("null" => isset($_GET["select"])))) . "<td><input name='field_vals[]'>" . "\n";
}
echo "</table>\n";
}
echo "<p>\n";
if ($fields) {
echo "<input type='submit' value='" . lang('Save') . "'>\n";
if (!isset($_GET["select"])) {
echo "<input type='submit' name='insert' value='" . ($update ? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Saving') . '...", this)' : lang('Save and insert next')) . "' title='Ctrl+Shift+Enter'>\n";
}
}
echo $update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'" . confirm() . ">\n" : ($_POST || !$fields ? "" : "<script type='text/javascript'>focus(document.getElementById('form').getElementsByTagName('td')[1].firstChild);</script>\n");
if (isset($_GET["select"])) {
hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
}
?>
<input type="hidden" name="referer" value="<?php
echo h(isset($_POST["referer"]) ? $_POST["referer"] : $_SERVER["HTTP_REFERER"]);
?>
">
<input type="hidden" name="save" value="1">
<input type="hidden" name="token" value="<?php
echo $token;
?>
">
</form>
<?php
}
开发者ID:K0n24d,项目名称:adminer,代码行数:72,代码来源:functions.inc.php
示例9: lang
<?php
}
?>
<?php
if ($TABLE != "") {
?>
<input type="submit" name="drop" value="<?php
echo lang('Drop');
?>
"<?php
echo confirm();
?>
><?php
}
if (support("partitioning")) {
$partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
?>
<p>
<?php
echo "<select name='partition_by' onchange='partitionByChange(this);'" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . ">" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>";
?>
(<input name="partition" value="<?php
echo h($row["partition"]);
?>
">)
<?php
echo lang('Partitions');
?>
: <input type="number" name="partitions" class="size<?php
开发者ID:gigikiri,项目名称:WordPress,代码行数:31,代码来源:create.inc.php
示例10: page_headers
page_headers();
ob_start();
} else {
page_header(lang('Select') . ": {$table_name}", $error);
}
$set = null;
if (isset($rights["insert"]) || !support("table")) {
$set = "";
foreach ((array) $_GET["where"] as $val) {
if (count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "=" || !$val["op"] && !preg_match('~[_%]~', $val["val"]))) {
$set .= "&set" . urlencode("[" . bracket_escape($val["col"]) . "]") . "=" . urlencode($val["val"]);
}
}
}
$adminer->selectLinks($table_status, $set);
if (!$columns && support("table")) {
echo "<p class='error'>" . lang('Unable to select the table') . ($fields ? "." : ": " . error()) . "\n";
} else {
echo "<form action='' id='form'>\n";
echo "<div style='display: none;'>";
hidden_fields_get();
echo DB != "" ? '<input type="hidden" name="db" value="' . h(DB) . '">' . (isset($_GET["ns"]) ? '<input type="hidden" name="ns" value="' . h($_GET["ns"]) . '">' : "") : "";
// not used in Editor
echo '<input type="hidden" name="select" value="' . h($TABLE) . '">';
echo "</div>\n";
$adminer->selectColumnsPrint($select, $columns);
$adminer->selectSearchPrint($where, $columns, $indexes);
$adminer->selectOrderPrint($order, $columns, $indexes);
$adminer->selectLimitPrint($limit);
$adminer->selectLengthPrint($text_length);
$adminer->selectActionPrint($indexes);
开发者ID:gigikiri,项目名称:WordPress,代码行数:31,代码来源:select.inc.php
示例11: page_header
/** Print HTML header
* @param string used in title, breadcrumb and heading, should be HTML escaped
* @param string
* @param mixed array("key" => "link=desc", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server
* @param string used after colon in title and heading, will be HTML escaped
* @return null
*/
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "")
{
global $LANG, $adminer, $connection, $drivers;
header("Content-Type: text/html; charset=utf-8");
if ($adminer->headers()) {
header("X-XSS-Protection: 0");
// prevents introducing XSS in IE8 by removing safe parts of the page
}
$title_all = $title . ($title2 != "" ? ": " . h($title2) : "");
$title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="<?php
echo $LANG;
?>
" dir="<?php
echo lang('ltr');
?>
">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
<title><?php
echo $title_page;
?>
</title>
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
<script type="text/javascript" src="../adminer/static/functions.js"></script>
<script type="text/javascript" src="static/editing.js"></script>
<?php
if ($adminer->head()) {
?>
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico" id="favicon">
<?php
if (file_exists("adminer.css")) {
?>
<link rel="stylesheet" type="text/css" href="adminer.css">
<?php
}
}
?>
<body class="<?php
echo lang('ltr');
?>
nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);" onload="bodyLoad('<?php
echo is_object($connection) ? substr($connection->server_info, 0, 3) : "";
?>
');">
<script type="text/javascript">
document.body.className = document.body.className.replace(/ nojs/, ' js');
</script>
<div id="content">
<?php
if ($breadcrumb !== null) {
$link = substr(preg_replace('~(username|db|ns)=[^&]*&~', '', ME), 0, -1);
echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> » ';
$link = substr(preg_replace('~(db|ns)=[^&]*&~', '', ME), 0, -1);
$server = SERVER != "" ? h(SERVER) : lang('Server');
if ($breadcrumb === false) {
echo "{$server}\n";
} else {
echo "<a href='" . ($link ? h($link) : ".") . "' accesskey='1' title='Alt+Shift+1'>{$server}</a> » ";
if ($_GET["ns"] != "" || DB != "" && is_array($breadcrumb)) {
echo '<a href="' . h($link . "&db=" . urlencode(DB) . (support("scheme") ? "&ns=" : "")) . '">' . h(DB) . '</a> » ';
}
if (is_array($breadcrumb)) {
if ($_GET["ns"] != "") {
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
}
foreach ($breadcrumb as $key => $val) {
$desc = is_array($val) ? $val[1] : $val;
if ($desc != "") {
echo '<a href="' . h(ME . "{$key}=") . urlencode(is_array($val) ? $val[0] : $val) . '">' . h($desc) . '</a> » ';
}
}
}
echo "{$title}\n";
}
}
echo "<h2>{$title_all}</h2>\n";
restart_session();
$uri = preg_replace('~^[^?]*~', '', $_SERVER["REQUEST_URI"]);
$messages = $_SESSION["messages"][$uri];
if ($messages) {
echo "<div class='message'>" . implode("</div>\n<div class='message'>", $messages) . "</div>\n";
unset($_SESSION["messages"][$uri]);
}
$databases =& get_session("dbs");
if (DB != "" && $databases && !in_array(DB, $databases, true)) {
$databases = null;
}
//.........这里部分代码省略.........
开发者ID:dewavi,项目名称:occupysandy.net,代码行数:101,代码来源:design.inc.php
示例12: support
</tr>
</table>
</td>
</tr>
<tr>
<td id="ma" align="left" valign="top" style="border-bottom:1px solid #6E2500; border-left:1px solid #6E2500; border-right:1px solid #6E2500; padding:1px;">
<table width="100%" style="height:100%; background-color:#101010; border:1px solid #2E2E2E; " border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<div style="padding-left:5px; padding-right:10px; padding-top:5px; padding-bottom:10px" class="style2"><font class="content">
<font class="option1">
<?php
support();
?>
ICQ 000-000
Tel.1234567
</font></font></div>
</td>
</tr>
<tr>
<td width="230"><img src="image/spacer.gif" alt="" width="145" height="1"></td>
</tr>
</table>
</td>
</tr>
开发者ID:bumasa,项目名称:casino,代码行数:31,代码来源:left.php
示例13: template
function template($content_tile_name, $data)
{
require_once dirname(__FILE__) . '/../tiles/' . $content_tile_name . '.php';
before($content_tile_name);
?>
<div id="header" class="right"><div class="right-inner">
<?php
top();
?>
</div></div>
<div id="content" class="right"><div class="right-inner" style="float:_left">
<?php
content($content_tile_name, $data);
?>
</div></div>
<div id="homelink" class="left"><div class="left-inner">
<a href="./" title="на главную" id="home"></a>
</div></div>
<div id="timeleft" class="left"><div class="left-inner">
<?php
timeleft($content_tile_name);
?>
</div></div>
<?php
if ('standing' != $content_tile_name && 'table' != $content_tile_name) {
?>
<div id="control" class="left"><div class="left-inner">
<?php
menu($content_tile_name);
?>
</div></div>
<?php
}
?>
<div id="stuff" class="right"><div class="right-inner">
<?php
stuff($content_tile_name);
?>
</div></div>
<div id="toolbar">
<?php
toolbar($content_tile_name);
?>
</div>
<div id="support" class="left"><div class="left-inner">
<?php
support();
?>
</div></div>
<div id="contacts" class="right"><div class="right-inner">
<?php
contacts();
?>
</div></div>
<script type="text/javascript">
(function($) {
var
menuWidth = $('#menu').width()
, on = false
;
$(document.body).mousemove(function(e) {
if ($(document.body).hasClass('noleft')) {
if (!on) {
defMargin(true);
}
if ($(e.target).closest('#control').size() && !on) {
on = true;
$('#control').animate(
{ 'marginLeft': defMargin() + menuWidth + 'px' }
, 200
);
} if (!$(e.target).closest('#control').size() && on) {
on = false;
$('#control').animate(
{ 'marginLeft': defMargin() + 'px' }
, 200
);
}
} else {
defMargin(true);
}
});
})(jQuery);
</script>
<?php
after();
die;
}
开发者ID:bearf,项目名称:xicl-web-interface,代码行数:89,代码来源:template.php
示例14: foreach
<p id="tags" class="tags">
</p>
<table id="demos">
<thead>
<tr>
<th>Demo</th>
<th>Support</th>
<th>Technology</th>
</tr>
</thead>
<tbody>
<?php foreach ($demos as $demo) :?>
<tr>
<td class="demo"><a href="<?=$demo->url?>"><?=$demo->desc?></a><?php if (isset($demo->note)) { echo ' <small>' . $demo->note . '</small>'; }?></td>
<td class="support"><?=support($demo->support)?></td>
<td class="tags"><?=spans($demo->tags)?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
<p>All content, code, video and audio is <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Share Alike 2.0</a></p>
</article>
<a id="html5badge" href="http://www.w3.org/html/logo/">
<img src="http://www.w3.org/html/logo/badge/html5-badge-h-connectivity-device-graphics-multimedia-performance-semantics-storage.png" width="325" height="64" alt="HTML5 Powered with Connectivity / Realtime, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage" title="HTML5 Powered with Connectivity / Realtime, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage">
</a>
<footer><a id="built" href="http://twitter.com/rem">@rem built this</a></footer>
</section>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
开发者ID:nemo97,项目名称:html5demos,代码行数:31,代码来源:index.php
示例15: page_header
/** Print HTML header
* @param string used in title, breadcrumb and heading, should be HTML escaped
* @param string
* @param mixed array("key" => "link", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server
* @param string used after colon in title and heading, should be HTML escaped
* @return null
*/
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "")
{
global $LANG, $VERSION, $adminer, $drivers, $jush;
page_headers();
if (is_ajax() && $error) {
page_messages($error);
exit;
}
$title_all = $title . ($title2 != "" ? ": {$title2}" : "");
$title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
?>
<!DOCTYPE html>
<html lang="<?php
echo $LANG;
?>
" dir="<?php
echo lang('ltr');
?>
">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
<meta name="referrer" content="origin-when-crossorigin">
<title><?php
echo $title_page;
?>
</title>
<!-- Latest compiled and minified CSS -->
<link rel=
|
请发表评论