mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 19:44:00 +02:00
Function verify_version doesn't use version parameter
Don't preselect first option in foreign key edit Prefill insert by foreign key searches REQUEST_URI is used earlier Change variable $SELF to constant ME Denote required fields in Editor git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@944 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -35,12 +35,12 @@ if ($tables_views && !$error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
query_redirect(queries(), substr($SELF, 0, -1), $message, $result, false, !$result);
|
||||
query_redirect(queries(), substr(ME, 0, -1), $message, $result, false, !$result);
|
||||
}
|
||||
|
||||
page_header(lang('Database') . ": " . h($_GET["db"]), $error, false);
|
||||
echo '<p><a href="' . h($SELF) . 'database=">' . lang('Alter database') . "</a>\n";
|
||||
echo '<p><a href="' . h($SELF) . 'schema=">' . lang('Database schema') . "</a>\n";
|
||||
echo '<p><a href="' . h(ME) . 'database=">' . lang('Alter database') . "</a>\n";
|
||||
echo '<p><a href="' . h(ME) . 'schema=">' . lang('Database schema') . "</a>\n";
|
||||
|
||||
echo "<h3>" . lang('Tables and views') . "</h3>\n";
|
||||
$table_status = table_status();
|
||||
@@ -54,16 +54,16 @@ if (!$table_status) {
|
||||
$name = $row["Name"];
|
||||
table_comment($row);
|
||||
echo '<tr' . odd() . '><td><input type="checkbox" name="' . (isset($row["Rows"]) ? 'tables' : 'views') . '[]" value="' . h($name) . '"' . (in_array($name, $tables_views, true) ? ' checked' : '') . ' onclick="form_uncheck(\'check-all\');">';
|
||||
echo '<th><a href="' . h($SELF) . 'table=' . urlencode($name) . '">' . h($name) . '</a>';
|
||||
echo '<th><a href="' . h(ME) . 'table=' . urlencode($name) . '">' . h($name) . '</a>';
|
||||
if (isset($row["Rows"])) {
|
||||
echo "<td>$row[Engine]<td>$row[Collation]";
|
||||
foreach (array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create", "Rows" => "select") as $key => $link) {
|
||||
$val = number_format($row[$key], 0, '.', lang(','));
|
||||
echo '<td align="right">' . (strlen($row[$key]) ? '<a href="' . h("$SELF$link=") . urlencode($name) . '">' . str_replace(" ", " ", ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val)) . '</a>' : ' ');
|
||||
echo '<td align="right">' . (strlen($row[$key]) ? '<a href="' . h(ME . "$link=") . urlencode($name) . '">' . str_replace(" ", " ", ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val)) . '</a>' : ' ');
|
||||
}
|
||||
echo "<td>" . (strlen(trim($row["Comment"])) ? h($row["Comment"]) : " ");
|
||||
} else {
|
||||
echo '<td colspan="8"><a href="' . h($SELF) . "select=" . urlencode($name) . '">' . lang('View') . '</a>';
|
||||
echo '<td colspan="8"><a href="' . h(ME) . "select=" . urlencode($name) . '">' . lang('View') . '</a>';
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
@@ -77,7 +77,7 @@ if (!$table_status) {
|
||||
}
|
||||
|
||||
if ($dbh->server_info >= 5) {
|
||||
echo '<p><a href="' . h($SELF) . 'view=">' . lang('Create view') . "</a>\n";
|
||||
echo '<p><a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n";
|
||||
echo "<h3>" . lang('Routines') . "</h3>\n";
|
||||
$result = $dbh->query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . $dbh->quote($_GET["db"]));
|
||||
if ($result->num_rows) {
|
||||
@@ -85,13 +85,13 @@ if ($dbh->server_info >= 5) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
echo "<td>" . h($row["ROUTINE_TYPE"]);
|
||||
echo '<th><a href="' . h($SELF) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'callf=' : 'call=') . urlencode($row["ROUTINE_NAME"]) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
|
||||
echo '<td><a href="' . h($SELF) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'function=' : 'procedure=') . urlencode($row["ROUTINE_NAME"]) . '">' . lang('Alter') . "</a>";
|
||||
echo '<th><a href="' . h(ME) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'callf=' : 'call=') . urlencode($row["ROUTINE_NAME"]) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
|
||||
echo '<td><a href="' . h(ME) . ($row["ROUTINE_TYPE"] == "FUNCTION" ? 'function=' : 'procedure=') . urlencode($row["ROUTINE_NAME"]) . '">' . lang('Alter') . "</a>";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
$result->free();
|
||||
echo '<p><a href="' . h($SELF) . 'procedure=">' . lang('Create procedure') . '</a> <a href="' . h($SELF) . 'function=">' . lang('Create function') . "</a>\n";
|
||||
echo '<p><a href="' . h(ME) . 'procedure=">' . lang('Create procedure') . '</a> <a href="' . h(ME) . 'function=">' . lang('Create function') . "</a>\n";
|
||||
}
|
||||
|
||||
if ($dbh->server_info >= 5.1 && ($result = $dbh->query("SHOW EVENTS"))) {
|
||||
@@ -101,12 +101,12 @@ if ($dbh->server_info >= 5.1 && ($result = $dbh->query("SHOW EVENTS"))) {
|
||||
echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "</thead>\n";
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo "<tr>";
|
||||
echo '<th><a href="' . h($SELF) . 'event=' . urlencode($row["Name"]) . '">' . h($row["Name"]) . "</a>";
|
||||
echo '<th><a href="' . h(ME) . 'event=' . urlencode($row["Name"]) . '">' . h($row["Name"]) . "</a>";
|
||||
echo "<td>" . ($row["Execute at"] ? lang('At given time') . "<td>" . $row["Execute at"] : lang('Every') . " " . $row["Interval value"] . " " . $row["Interval field"] . "<td>$row[Starts]");
|
||||
echo "<td>$row[Ends]";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
$result->free();
|
||||
echo '<p><a href="' . h($SELF) . 'event=">' . lang('Create event') . "</a>\n";
|
||||
echo '<p><a href="' . h(ME) . 'event=">' . lang('Create event') . "</a>\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user