Separate dump

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@36 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2007-07-05 10:45:23 +00:00
parent a5a6d3b381
commit aeee74d7c7
2 changed files with 35 additions and 37 deletions

View file

@ -53,6 +53,3 @@ if (strlen($_GET["db"])) {
} }
mysql_free_result($result); mysql_free_result($result);
} }
exit;

View file

@ -10,42 +10,43 @@ include "./design.inc.php";
include "./auth.inc.php"; include "./auth.inc.php";
include "./connect.inc.php"; include "./connect.inc.php";
if (isset($_GET["sql"])) { if (isset($_GET["dump"])) {
include "./sql.inc.php";
} elseif (isset($_GET["table"])) {
include "./table.inc.php";
} elseif (isset($_GET["select"])) {
include "./select.inc.php";
} elseif (isset($_GET["edit"])) {
include "./edit.inc.php";
} elseif (isset($_GET["create"])) {
include "./create.inc.php";
} elseif (isset($_GET["indexes"])) {
include "./indexes.inc.php";
} elseif (isset($_GET["dump"])) {
include "./dump.inc.php"; include "./dump.inc.php";
} elseif (isset($_GET["view"])) {
include "./view.inc.php";
} elseif (isset($_GET["database"])) {
include "./database.inc.php";
} else { } else {
page_header(htmlspecialchars(lang('Database') . ": " . $_GET["db"])); if (isset($_GET["sql"])) {
echo '<p><a href="' . htmlspecialchars($SELF) . 'database=">' . lang('Alter database') . "</a></p>\n"; include "./sql.inc.php";
$result = mysql_query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = '" . mysql_real_escape_string($_GET["db"]) . "'"); } elseif (isset($_GET["table"])) {
if (mysql_num_rows($result)) { include "./table.inc.php";
echo "<h2>" . lang('Routines') . "</h2>\n"; } elseif (isset($_GET["select"])) {
echo "<table border='1' cellspacing='0' cellpadding='2'>\n"; include "./select.inc.php";
while ($row = mysql_fetch_assoc($result)) { } elseif (isset($_GET["edit"])) {
echo "<tr>"; include "./edit.inc.php";
echo "<td>" . htmlspecialchars($row["ROUTINE_TYPE"]) . "</td>"; } elseif (isset($_GET["create"])) {
echo "<th>" . htmlspecialchars($row["ROUTINE_NAME"]) . "</th>"; //! parameters from SHOW CREATE {PROCEDURE|FUNCTION} include "./create.inc.php";
echo "<td>" . nl2br(htmlspecialchars($row["ROUTINE_DEFINITION"])) . "</td>"; } elseif (isset($_GET["indexes"])) {
echo "</tr>\n"; include "./indexes.inc.php";
//! call, drop, replace } elseif (isset($_GET["view"])) {
include "./view.inc.php";
} elseif (isset($_GET["database"])) {
include "./database.inc.php";
} else {
page_header(htmlspecialchars(lang('Database') . ": " . $_GET["db"]));
echo '<p><a href="' . htmlspecialchars($SELF) . 'database=">' . lang('Alter database') . "</a></p>\n";
$result = mysql_query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = '" . mysql_real_escape_string($_GET["db"]) . "'");
if (mysql_num_rows($result)) {
echo "<h2>" . lang('Routines') . "</h2>\n";
echo "<table border='1' cellspacing='0' cellpadding='2'>\n";
while ($row = mysql_fetch_assoc($result)) {
echo "<tr>";
echo "<td>" . htmlspecialchars($row["ROUTINE_TYPE"]) . "</td>";
echo "<th>" . htmlspecialchars($row["ROUTINE_NAME"]) . "</th>"; //! parameters from SHOW CREATE {PROCEDURE|FUNCTION}
echo "<td>" . nl2br(htmlspecialchars($row["ROUTINE_DEFINITION"])) . "</td>";
echo "</tr>\n";
//! call, drop, replace
}
echo "</table>\n";
} }
echo "</table>\n"; mysql_free_result($result);
} }
mysql_free_result($result); page_footer();
} }
page_footer();