From 01f528efe52299e911fd82d2fd9984eec7d5b1f5 Mon Sep 17 00:00:00 2001
From: jakubvrana
Date: Mon, 2 Jul 2007 20:21:30 +0000
Subject: [PATCH] Database operations
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@14 7c3ca157-0c34-0410-bff1-cbf682f78f5c
---
connect.inc.php | 6 ++++--
database.inc.php | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
design.inc.php | 3 +--
index.php | 6 ++++--
4 files changed, 65 insertions(+), 6 deletions(-)
create mode 100644 database.inc.php
diff --git a/connect.inc.php b/connect.inc.php
index bc698084..c255449f 100644
--- a/connect.inc.php
+++ b/connect.inc.php
@@ -1,8 +1,10 @@
" . lang('Invalid database.') . "
\n";
+ } else {
+ echo '' . lang('Create new database') . '';
}
page_footer();
exit;
diff --git a/database.inc.php b/database.inc.php
new file mode 100644
index 00000000..0129b7eb
--- /dev/null
+++ b/database.inc.php
@@ -0,0 +1,56 @@
+" . (strlen($_GET["db"]) ? lang('Alter database') . ": " . htmlspecialchars($_GET["db"]) : lang('Create database')) . "\n";
+
+if ($_POST) {
+ echo "" . lang('Unable to operate database') . ": " . htmlspecialchars($error) . "
\n";
+ $name = $_POST["name"];
+ $collate = $_POST["collate"];
+} else {
+ $name = $_GET["db"];
+ $collate = array(); //! take from SHOW CREATE DATABASE
+}
+?>
+
diff --git a/design.inc.php b/design.inc.php
index c1ce957d..23c8fd2e 100644
--- a/design.inc.php
+++ b/design.inc.php
@@ -37,7 +37,6 @@ H2 { font-size: 150%; margin-top: 0; }
" . lang('No tables.') . "\n";
diff --git a/index.php b/index.php
index 7e29592e..58e20085 100644
--- a/index.php
+++ b/index.php
@@ -1,7 +1,7 @@
' . lang('Alter database') . "\n";
$result = mysql_query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = '" . mysql_real_escape_string($_GET["db"]) . "'");
if (mysql_num_rows($result)) {
echo "" . lang('Routines') . "
\n";