mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 06:37:33 +02:00
Show tables overview in Editor
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
<?php
|
||||
page_header(lang('Server'), "", false);
|
||||
|
||||
?>
|
||||
<form action=""><p>
|
||||
<?php echo lang('Search data in tables'); ?>:
|
||||
<?php hidden_fields_get(); ?>
|
||||
<input name="where[0][val]" value="<?php echo h($_GET["where"][0]["val"]); ?>">
|
||||
<input type="submit" value="<?php echo lang('Search'); ?>" />
|
||||
</form>
|
||||
<?php
|
||||
if ($_GET["where"][0]["val"] != "") {
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<p>" . lang('Search data in tables') . ": <input name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
|
||||
if ($_POST["query"] != "") {
|
||||
search_tables();
|
||||
}
|
||||
echo "<table cellspacing='0' class='nowrap' onclick='tableClick(event);'>\n";
|
||||
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^tables\[/);"><th>' . lang('Table') . '<td>' . lang('Rows') . "</thead>\n";
|
||||
foreach (table_status() as $table => $row) {
|
||||
$name = $adminer->tableName($row);
|
||||
if (isset($row["Engine"]) && $name != "") {
|
||||
echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');");
|
||||
echo '<th><a href="' . h(ME) . 'select=' . urlencode($table) . '">' . h($name) . '</a>';
|
||||
$val = number_format($row["Rows"], 0, '.', lang(','));
|
||||
echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo "</form>\n";
|
||||
|
Reference in New Issue
Block a user