]> git.joonet.de Git - adminer.git/commitdiff
Use JUSH highlighter
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 10 Jul 2007 06:30:04 +0000 (06:30 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 10 Jul 2007 06:30:04 +0000 (06:30 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@95 7c3ca157-0c34-0410-bff1-cbf682f78f5c

design.inc.php
functions.inc.php
index.php
sql.inc.php
table.inc.php
view.inc.php

index 99d6c784fb598995df8e77e5795ca24c3ec2f78a..24c8901b6986956d137110058ac794b877e35127 100644 (file)
@@ -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
index e43df2abbdd103a87c7ab0216a4a4abff79da886..ac19d82d03192c811adb4dd02221379453a413c3 100644 (file)
@@ -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])) {
index 8d2fce9f1cc93cbcd65d1338a9be30d848915d72..af6f606be8f36095251778d9d3124a67dc86e52e 100644 (file)
--- a/index.php
+++ b/index.php
@@ -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";
index 3d6d88a1e88cde8a5a5230db03d1ee007553ae87..55ab182529ccaefe79e324b793f2ee97af3a7566 100644 (file)
@@ -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;
index d97eef4bab349bf7801c4ce6ad6562abaeaaa29a..958231e9660667fac51ca581536b91133b227b7d 100644 (file)
@@ -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";
        }
index 601e5058571db076587bc8649e956ded4fff610f..7721dc94a2700f0a788405e663e9bbe9ca97066b 100644 (file)
@@ -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";