echo '<p><a href="' . htmlspecialchars($SELF) . 'database=">' . lang('Create new database') . "</a></p>\n";
echo '<p><a href="' . htmlspecialchars($SELF) . 'privileges=">' . lang('Privileges') . "</a></p>\n";
echo '<p><a href="' . htmlspecialchars($SELF) . 'processlist=">' . lang('Process list') . "</a></p>\n";
+ echo '<p><a href="' . htmlspecialchars($SELF) . 'variables=">' . lang('Variables') . "</a></p>\n";
echo "<p>" . lang('MySQL version: %s through PHP extension %s', "<b" . ($dbh->server_info < 4.1 ? " class='binary'" : "") . ">$dbh->server_info</b>", "<b>$dbh->extension</b>") . "</p>\n";
echo "<p>" . lang('Logged as: %s', "<b>" . htmlspecialchars($dbh->result($dbh->query("SELECT USER()"))) . "</b>") . "</p>\n";
}
}
$dbh->query("SET SQL_QUOTE_SHOW_CREATE=1");
-if (!(strlen($_GET["db"]) ? $dbh->select_db($_GET["db"]) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]))) {
+if (!(strlen($_GET["db"]) ? $dbh->select_db($_GET["db"]) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]))) {
if (strlen($_GET["db"])) {
unset($_SESSION["databases"][$_GET["server"]]);
}
include "./processlist.inc.php";
} elseif (isset($_GET["select"])) {
include "./select.inc.php";
+ } elseif (isset($_GET["variables"])) {
+ include "./variables.inc.php";
} else {
include "./db.inc.php";
}
'(anywhere)' => '(kdekoliv)',
'%.3f s' => '%.3f s',
'History' => 'Historie',
+ 'Variables' => 'Proměnné',
);
--- /dev/null
+<?php
+page_header(lang('Variables'));
+
+echo "<table cellspacing='0'>\n";
+$result = $dbh->query("SHOW VARIABLES");
+while ($row = $result->fetch_assoc()) {
+ echo "<tr>";
+ echo "<th><code class='jush-sql_set'>" . htmlspecialchars($row["Variable_name"]) . "</code></th>";
+ echo "<td>" . (strlen(trim($row["Value"])) ? htmlspecialchars($row["Value"]) : " ") . "</td>";
+ echo "</tr>\n";
+}
+$result->free();
+echo "</table>\n";
Relative date and time functions
Version checker
Save queries to history and display it on SQL page
+Display MySQL variables
Ability to select all rows on current page of select
Separate JavaScript functions
Always use the default style before the external one