Whitespace
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@853 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
21c98c49c1
commit
36d6864a10
|
@ -65,7 +65,10 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
|
||||||
$partitions[] = "\nPARTITION " . idf_escape($val) . " VALUES " . ($_POST["partition_by"] == 'RANGE' ? "LESS THAN" : "IN") . (strlen($value) ? " ($value)" : " MAXVALUE"); //! SQL injection
|
$partitions[] = "\nPARTITION " . idf_escape($val) . " VALUES " . ($_POST["partition_by"] == 'RANGE' ? "LESS THAN" : "IN") . (strlen($value) ? " ($value)" : " MAXVALUE"); //! SQL injection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$status .= "\nPARTITION BY $_POST[partition_by]($_POST[partition])" . ($partitions ? " (" . implode(",", $partitions) . "\n)" : ($_POST["partitions"] ? " PARTITIONS " . intval($_POST["partitions"]) : "")); // $_POST["partition"] can be expression, not only column
|
$status .= "\nPARTITION BY $_POST[partition_by]($_POST[partition])" . ($partitions // $_POST["partition"] can be expression, not only column
|
||||||
|
? " (" . implode(",", $partitions) . "\n)"
|
||||||
|
: ($_POST["partitions"] ? " PARTITIONS " . intval($_POST["partitions"]) : "")
|
||||||
|
);
|
||||||
} elseif ($dbh->server_info >= 5.1 && strlen($_GET["create"])) {
|
} elseif ($dbh->server_info >= 5.1 && strlen($_GET["create"])) {
|
||||||
$status .= "\nREMOVE PARTITIONING";
|
$status .= "\nREMOVE PARTITIONING";
|
||||||
}
|
}
|
||||||
|
@ -79,6 +82,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header((strlen($_GET["create"]) ? lang('Alter table') : lang('Create table')), $error, array("table" => $_GET["create"]), $_GET["create"]);
|
page_header((strlen($_GET["create"]) ? lang('Alter table') : lang('Create table')), $error, array("table" => $_GET["create"]), $_GET["create"]);
|
||||||
|
|
||||||
$engines = array();
|
$engines = array();
|
||||||
|
|
|
@ -38,6 +38,7 @@ if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP c
|
||||||
query_redirect("ALTER DATABASE " . idf_escape($_POST["name"]) . " COLLATE " . $dbh->quote($_POST["collation"]), substr($SELF, 0, -1), lang('Database has been altered.'));
|
query_redirect("ALTER DATABASE " . idf_escape($_POST["name"]) . " COLLATE " . $dbh->quote($_POST["collation"]), substr($SELF, 0, -1), lang('Database has been altered.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(strlen($_GET["db"]) ? lang('Alter database') : lang('Create database'), $error, array(), $_GET["db"]);
|
page_header(strlen($_GET["db"]) ? lang('Alter database') : lang('Create database'), $error, array(), $_GET["db"]);
|
||||||
|
|
||||||
$collations = collations();
|
$collations = collations();
|
||||||
|
@ -70,7 +71,10 @@ if ($_POST) {
|
||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<p>
|
<p>
|
||||||
<?php echo ($_POST["add_x"] ? '<textarea name="name" rows="10" cols="40">' . htmlspecialchars($name) . '</textarea><br>' : '<input name="name" value="' . htmlspecialchars($name) . '" maxlength="64">') . "\n"; ?>
|
<?php echo ($_POST["add_x"]
|
||||||
|
? '<textarea name="name" rows="10" cols="40">' . htmlspecialchars($name) . '</textarea><br>'
|
||||||
|
: '<input name="name" value="' . htmlspecialchars($name) . '" maxlength="64">'
|
||||||
|
) . "\n"; ?>
|
||||||
<select name="collation"><option value="">(<?php echo lang('collation'); ?>)<?php echo optionlist($collations, $collate); ?></select>
|
<select name="collation"><option value="">(<?php echo lang('collation'); ?>)<?php echo optionlist($collations, $collate); ?></select>
|
||||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||||
|
|
|
@ -22,6 +22,7 @@ if ($_POST && !$error) {
|
||||||
, substr($SELF, 0, -1), (strlen($_GET["event"]) ? lang('Event has been altered.') : lang('Event has been created.')));
|
, substr($SELF, 0, -1), (strlen($_GET["event"]) ? lang('Event has been altered.') : lang('Event has been created.')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header((strlen($_GET["event"]) ? lang('Alter event') . ": " . htmlspecialchars($_GET["event"]) : lang('Create event')), $error);
|
page_header((strlen($_GET["event"]) ? lang('Alter event') . ": " . htmlspecialchars($_GET["event"]) : lang('Create event')), $error);
|
||||||
|
|
||||||
$row = array();
|
$row = array();
|
||||||
|
|
|
@ -18,6 +18,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
|
||||||
$error = lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exists.') . "<br>$error";
|
$error = lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exists.') . "<br>$error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(lang('Foreign key'), $error, array("table" => $_GET["foreign"]), $_GET["foreign"]);
|
page_header(lang('Foreign key'), $error, array("table" => $_GET["foreign"]), $_GET["foreign"]);
|
||||||
|
|
||||||
if ($_POST) {
|
if ($_POST) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ if ($_POST && !$error && !$_POST["add"]) {
|
||||||
}
|
}
|
||||||
query_redirect("ALTER TABLE " . idf_escape($_GET["indexes"]) . implode(",", $alter), $SELF . "table=" . urlencode($_GET["indexes"]), lang('Indexes has been altered.'));
|
query_redirect("ALTER TABLE " . idf_escape($_GET["indexes"]) . implode(",", $alter), $SELF . "table=" . urlencode($_GET["indexes"]), lang('Indexes has been altered.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(lang('Indexes'), $error, array("table" => $_GET["indexes"]), $_GET["indexes"]);
|
page_header(lang('Indexes'), $error, array("table" => $_GET["indexes"]), $_GET["indexes"]);
|
||||||
|
|
||||||
$fields = array_keys(fields($_GET["indexes"]));
|
$fields = array_keys(fields($_GET["indexes"]));
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
page_header(lang('Privileges'));
|
page_header(lang('Privileges'));
|
||||||
echo '<p><a href="' . htmlspecialchars($SELF) . 'user=">' . lang('Create user') . "</a>";
|
echo '<p><a href="' . htmlspecialchars($SELF) . 'user=">' . lang('Create user') . "</a>";
|
||||||
|
|
||||||
$result = $dbh->query("SELECT User, Host FROM mysql.user ORDER BY Host, User");
|
$result = $dbh->query("SELECT User, Host FROM mysql.user ORDER BY Host, User");
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -22,6 +22,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
|
||||||
, substr($SELF, 0, -1), (strlen($_GET["procedure"]) ? lang('Routine has been altered.') : lang('Routine has been created.')));
|
, substr($SELF, 0, -1), (strlen($_GET["procedure"]) ? lang('Routine has been altered.') : lang('Routine has been created.')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header((strlen($_GET["procedure"]) ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . htmlspecialchars($_GET["procedure"]) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
|
page_header((strlen($_GET["procedure"]) ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . htmlspecialchars($_GET["procedure"]) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
|
||||||
|
|
||||||
$collations = get_vals("SHOW CHARACTER SET");
|
$collations = get_vals("SHOW CHARACTER SET");
|
||||||
|
|
|
@ -8,6 +8,7 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
query_redirect(queries(), $SELF . "processlist=", lang('%d process(es) has been killed.', $killed), $killed || !$_POST["kill"], false, !$killed && $_POST["kill"]);
|
query_redirect(queries(), $SELF . "processlist=", lang('%d process(es) has been killed.', $killed), $killed || !$_POST["kill"], false, !$killed && $_POST["kill"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(lang('Process list'), $error);
|
page_header(lang('Process list'), $error);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ $result = $dbh->query("SHOW COLUMNS FROM " . idf_escape($_GET["table"]));
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$error = htmlspecialchars($dbh->error);
|
$error = htmlspecialchars($dbh->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header(lang('Table') . ": " . htmlspecialchars($_GET["table"]), $error);
|
page_header(lang('Table') . ": " . htmlspecialchars($_GET["table"]), $error);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header((strlen($_GET["name"]) ? lang('Alter trigger') . ": " . htmlspecialchars($_GET["name"]) : lang('Create trigger')), $error, array("table" => $_GET["trigger"]));
|
page_header((strlen($_GET["name"]) ? lang('Alter trigger') . ": " . htmlspecialchars($_GET["name"]) : lang('Create trigger')), $error, array("table" => $_GET["trigger"]));
|
||||||
|
|
||||||
$row = array("Trigger" => "$_GET[trigger]_bi");
|
$row = array("Trigger" => "$_GET[trigger]_bi");
|
||||||
|
|
|
@ -113,6 +113,7 @@ if ($_POST && !$error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
page_header((isset($_GET["host"]) ? lang('Username') . ": " . htmlspecialchars("$_GET[user]@$_GET[host]") : lang('Create user')), $error, array("privileges" => array('', lang('Privileges'))));
|
page_header((isset($_GET["host"]) ? lang('Username') . ": " . htmlspecialchars("$_GET[user]@$_GET[host]") : lang('Create user')), $error, array("privileges" => array('', lang('Privileges'))));
|
||||||
|
|
||||||
if ($_POST) {
|
if ($_POST) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
page_header(lang('View') . ": " . htmlspecialchars($_GET["view"]));
|
page_header(lang('View') . ": " . htmlspecialchars($_GET["view"]));
|
||||||
|
|
||||||
$view = view($_GET["view"]);
|
$view = view($_GET["view"]);
|
||||||
echo "<pre class='jush-sql'>" . htmlspecialchars($view["select"]) . "</pre>\n";
|
echo "<pre class='jush-sql'>" . htmlspecialchars($view["select"]) . "</pre>\n";
|
||||||
echo '<p><a href="' . htmlspecialchars($SELF) . 'createv=' . urlencode($_GET["view"]) . '">' . lang('Alter view') . "</a>\n";
|
echo '<p><a href="' . htmlspecialchars($SELF) . 'createv=' . urlencode($_GET["view"]) . '">' . lang('Alter view') . "</a>\n";
|
||||||
|
|
Loading…
Reference in a new issue