Use JUSH highlighter
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@95 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
be38f7a22d
commit
4df1572bff
|
@ -21,9 +21,11 @@ PRE { margin: 0; margin: .12em 0; }
|
|||
#menu { position: absolute; top: 8px; left: 8px; width: 15em; overflow: auto; white-space: nowrap; }
|
||||
#content { margin-left: 16em; }
|
||||
</style>
|
||||
<style type="text/css">@import url(http://jush.info/jush.css);</style>
|
||||
<script type="text/javascript" src="http://jush.info/jush.js" defer="defer"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="jush.highlight_tag('pre');">
|
||||
|
||||
<div id="content">
|
||||
<?php
|
||||
|
|
|
@ -193,6 +193,7 @@ function select($result) {
|
|||
$blobs = array();
|
||||
for ($j=0; $j < count($row); $j++) {
|
||||
$field = mysql_fetch_field($result, $j);
|
||||
//! table and column aliases
|
||||
if (strlen($field->table) && $field->primary_key) {
|
||||
$links[$j] = $field->table;
|
||||
if (!isset($indexes[$field->table])) {
|
||||
|
|
|
@ -5,8 +5,8 @@ session_start();
|
|||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
$SELF = preg_replace('~^[^?]*/([^?]*).*~', '\\1?', $_SERVER["REQUEST_URI"]) . (strlen($_GET["server"]) ? 'server=' . urlencode($_GET["server"]) . '&' : '') . (strlen($_GET["db"]) ? 'db=' . urlencode($_GET["db"]) . '&' : '');
|
||||
$TOKENS = &$_SESSION["tokens"][$_GET["server"]][preg_replace('~([?&]sql=)upload~', '\\1', $_SERVER["REQUEST_URI"])];
|
||||
include "./lang.inc.php";
|
||||
include "./functions.inc.php";
|
||||
include "./lang.inc.php";
|
||||
include "./design.inc.php";
|
||||
include "./auth.inc.php";
|
||||
include "./connect.inc.php";
|
||||
|
@ -58,7 +58,7 @@ if (isset($_GET["dump"])) {
|
|||
echo "<tr valign='top'>";
|
||||
echo "<th>" . htmlspecialchars($row["ROUTINE_TYPE"]) . "</th>";
|
||||
echo '<td><a href="' . htmlspecialchars($SELF) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'callf' : 'call') . '=' . urlencode($row["ROUTINE_NAME"]) . '">' . htmlspecialchars($row["ROUTINE_NAME"]) . '</a></td>';
|
||||
echo "<td><pre>" . htmlspecialchars($row["ROUTINE_DEFINITION"]) . "</pre></td>";
|
||||
echo "<td><pre class='jush-sql'>" . htmlspecialchars($row["ROUTINE_DEFINITION"]) . "</pre></td>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
|
|
@ -17,7 +17,7 @@ if ($_POST && $error) {
|
|||
$offset = $match[0][1] + strlen($match[0][0]);
|
||||
} else {
|
||||
$empty = false;
|
||||
echo "<pre>" . htmlspecialchars(substr($query, 0, $match[0][1])) . "</pre>\n";
|
||||
echo "<pre class='jush-sql'>" . htmlspecialchars(substr($query, 0, $match[0][1])) . "</pre>\n";
|
||||
$result = mysql_query(substr($query, 0, $match[0][1]));
|
||||
$query = substr($query, $match[0][1] + strlen($match[0][0]));
|
||||
$offset = 0;
|
||||
|
|
|
@ -50,7 +50,7 @@ if (mysql_get_server_info() >= 5) {
|
|||
echo "<h3>" . lang('Triggers') . "</h3>\n";
|
||||
echo "<table border='0' cellspacing='0' cellpadding='2'>\n";
|
||||
while ($row = mysql_fetch_assoc($result)) {
|
||||
echo "<tr valign='top'><th>$row[Timing]</th><th>$row[Event]</th><td><pre>" . htmlspecialchars($row["Statement"]) . "</pre></td></tr>\n";
|
||||
echo "<tr valign='top'><th>$row[Timing]</th><th>$row[Event]</th><td><pre class='jush-sql'>" . htmlspecialchars($row["Statement"]) . "</pre></td></tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
page_header(lang('View') . ": " . htmlspecialchars($_GET["view"]));
|
||||
echo "<pre>" . htmlspecialchars(preg_replace('~^.* AS ~U', '', mysql_result(mysql_query("SHOW CREATE VIEW " . idf_escape($_GET["view"])), 0, 1))) . "</pre>\n";
|
||||
echo "<pre class='jush-sql'>" . htmlspecialchars(preg_replace('~^.* AS ~U', '', mysql_result(mysql_query("SHOW CREATE VIEW " . idf_escape($_GET["view"])), 0, 1))) . "</pre>\n";
|
||||
|
|
Loading…
Reference in a new issue