mirror of
https://github.com/vrana/adminer.git
synced 2026-01-03 06:10:50 +01:00
File upload on same URL
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@99 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -38,12 +38,12 @@ if ($_POST && $error) {
|
||||
if ($empty) {
|
||||
echo "<p class='message'>" . lang('No commands to execute.') . "</p>\n";
|
||||
}
|
||||
} elseif ($_GET["sql"] == "upload") {
|
||||
} elseif ($_POST) {
|
||||
echo "<p class='error'>" . lang('Unable to upload a file.') . "</p>\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="<?php echo htmlspecialchars($SELF); ?>sql=" method="post">
|
||||
<form action="" method="post">
|
||||
<p><textarea name="query" rows="20" cols="80"><?php echo htmlspecialchars($_POST["query"]); ?></textarea></p>
|
||||
<p><input type="hidden" name="token" value="<?php echo $token; ?>" /><input type="submit" value="<?php echo lang('Execute'); ?>" /></p>
|
||||
</form>
|
||||
@@ -52,7 +52,7 @@ if ($_POST && $error) {
|
||||
if (!ini_get("file_uploads")) {
|
||||
echo "<p>" . lang('File uploads are disabled.') . "</p>\n";
|
||||
} else { ?>
|
||||
<form action="<?php echo htmlspecialchars($SELF); ?>sql=upload" method="post" enctype="multipart/form-data">
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<p>
|
||||
<?php echo lang('File upload'); ?>: <input type="file" name="sql_file" />
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>" />
|
||||
|
||||
Reference in New Issue
Block a user