diff --git a/functions.inc.php b/functions.inc.php index 5c35da89..64fc9c5d 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -135,6 +135,7 @@ function routine($name, $type) { "unsigned" => strtolower(preg_replace('~\\s+~', ' ', trim("$match[7] $match[6]"))), "null" => true, "inout" => strtoupper($match[1]), + //! detect character set ); $params[$i] = $field; } @@ -360,16 +361,17 @@ function process_input($name, $field) { } } -function edit_fields($fields, $collations, $type = "table") { - global $types, $unsigned; +function edit_fields($fields, $collations, $type = "TABLE") { + global $types, $unsigned, $inout; ?> + - + @@ -382,11 +384,12 @@ foreach ($fields as $i => $field) { $i++; ?> + - + diff --git a/index.php b/index.php index 2e38fcc1..2002f57f 100644 --- a/index.php +++ b/index.php @@ -49,6 +49,9 @@ if (isset($_GET["dump"])) { if (isset($_GET["callf"])) { $_GET["call"] = $_GET["callf"]; } + if (isset($_GET["createf"])) { + $_GET["createp"] = $_GET["createf"]; + } if (isset($_GET["sql"])) { include "./sql.inc.php"; } elseif (isset($_GET["edit"])) { @@ -65,6 +68,8 @@ if (isset($_GET["dump"])) { include "./foreign.inc.php"; } elseif (isset($_GET["createv"])) { include "./createv.inc.php"; + } elseif (isset($_GET["createp"])) { + include "./createp.inc.php"; } elseif (isset($_GET["processlist"])) { include "./processlist.inc.php"; } else { @@ -72,20 +77,21 @@ if (isset($_GET["dump"])) { page_header(htmlspecialchars(lang('Database') . ": " . $_GET["db"])); echo '

' . lang('Alter database') . "

\n"; if ($mysql->server_info >= 5) { + echo "

" . lang('Routines') . "

\n"; $result = $mysql->query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = '" . $mysql->escape_string($_GET["db"]) . "'"); if ($result->num_rows) { - echo "

" . lang('Routines') . "

\n"; echo "
" />" maxlength="64" /> " size="3" /> checked="checked" /> checked="checked" /> " maxlength="255" />
\n"; while ($row = $result->fetch_assoc()) { - echo ""; + echo ""; echo ""; echo ''; - echo ""; + echo '\n"; echo "\n"; } echo "
" . htmlspecialchars($row["ROUTINE_TYPE"]) . "' . htmlspecialchars($row["ROUTINE_NAME"]) . '
" . htmlspecialchars($row["ROUTINE_DEFINITION"]) . "
' . lang('Alter') . "
\n"; } $result->free(); + echo '

' . lang('Create procedure') . ' ' . lang('Create function') . "

\n"; echo '

' . lang('Create view') . "

\n"; } }