Simpler URL
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@83 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
f508fca36d
commit
e99f61f0d7
10
index.php
10
index.php
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
// Copyright 2007 Jakub Vrana http://phpminadmin.sourceforge.net, licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
// Copyright 2007 Jakub Vrana http://phpminadmin.sourceforge.net, licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License.
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
error_reporting(E_ALL & ~E_NOTICE);
|
error_reporting(E_ALL & ~E_NOTICE);
|
||||||
|
@ -27,6 +27,12 @@ if (isset($_GET["dump"])) {
|
||||||
$error = (in_array($_POST["token"], (array) $TOKENS) ? "" : lang('Invalid CSRF token. Send the form again.'));
|
$error = (in_array($_POST["token"], (array) $TOKENS) ? "" : lang('Invalid CSRF token. Send the form again.'));
|
||||||
}
|
}
|
||||||
$token = ($_POST && !$error ? $_POST["token"] : token());
|
$token = ($_POST && !$error ? $_POST["token"] : token());
|
||||||
|
if (isset($_GET["default"])) {
|
||||||
|
$_GET["edit"] = $_GET["default"];
|
||||||
|
}
|
||||||
|
if (isset($_GET["callf"])) {
|
||||||
|
$_GET["call"] = $_GET["callf"];
|
||||||
|
}
|
||||||
if (isset($_GET["sql"])) {
|
if (isset($_GET["sql"])) {
|
||||||
include "./sql.inc.php";
|
include "./sql.inc.php";
|
||||||
} elseif (isset($_GET["edit"])) {
|
} elseif (isset($_GET["edit"])) {
|
||||||
|
@ -51,7 +57,7 @@ if (isset($_GET["dump"])) {
|
||||||
while ($row = mysql_fetch_assoc($result)) {
|
while ($row = mysql_fetch_assoc($result)) {
|
||||||
echo "<tr valign='top'>";
|
echo "<tr valign='top'>";
|
||||||
echo "<th>" . htmlspecialchars($row["ROUTINE_TYPE"]) . "</th>";
|
echo "<th>" . htmlspecialchars($row["ROUTINE_TYPE"]) . "</th>";
|
||||||
echo '<td><a href="' . htmlspecialchars($SELF) . 'call=' . urlencode($row["ROUTINE_NAME"]) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? '&type=FUNCTION' : '') . '">' . htmlspecialchars($row["ROUTINE_NAME"]) . '</a></td>';
|
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>" . htmlspecialchars($row["ROUTINE_DEFINITION"]) . "</pre></td>";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ if (!$result) {
|
||||||
|
|
||||||
echo "<p>";
|
echo "<p>";
|
||||||
echo '<a href="' . htmlspecialchars($SELF) . 'create=' . urlencode($_GET["table"]) . '">' . lang('Alter table') . '</a>';
|
echo '<a href="' . htmlspecialchars($SELF) . 'create=' . urlencode($_GET["table"]) . '">' . lang('Alter table') . '</a>';
|
||||||
echo ($auto_increment_only ? '' : ' <a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET["table"]) . '&default=">' . lang('Default values') . '</a>');
|
echo ($auto_increment_only ? '' : ' <a href="' . htmlspecialchars($SELF) . 'default=' . urlencode($_GET["table"]) . '">' . lang('Default values') . '</a>');
|
||||||
echo "</p>\n";
|
echo "</p>\n";
|
||||||
|
|
||||||
echo "<h3>" . lang('Indexes') . "</h3>\n";
|
echo "<h3>" . lang('Indexes') . "</h3>\n";
|
||||||
|
|
Loading…
Reference in a new issue