adminerevo/editor/db.inc.php

34 lines
1.4 KiB
PHP
Raw Normal View History

<?php
page_header(lang('Server'), "", false);
2011-01-06 08:30:07 +00:00
if ($adminer->homepage()) {
echo "<form action='' method='post'>\n";
echo "<p>" . lang('Search data in tables') . ": <input type='search' name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
2011-01-06 08:30:07 +00:00
if ($_POST["query"] != "") {
search_tables();
}
2018-10-27 19:20:56 +00:00
echo "<div class='scrollable'>\n";
2018-01-12 12:54:08 +00:00
echo "<table cellspacing='0' class='nowrap checkable'>\n";
2018-01-12 14:27:44 +00:00
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
2018-01-12 16:19:35 +00:00
echo '<thead><tr class="wrap">';
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^tables\[/);", "");
echo '<th>' . lang('Table');
echo '<td>' . lang('Rows');
echo "</thead>\n";
2023-05-21 13:03:36 +00:00
2011-01-06 08:30:07 +00:00
foreach (table_status() as $table => $row) {
$name = $adminer->tableName($row);
if (isset($row["Engine"]) && $name != "") {
2018-02-08 08:30:16 +00:00
echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true));
2011-03-24 01:19:21 +00:00
echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
2014-03-20 04:56:42 +00:00
$val = format_number($row["Rows"]);
2011-01-06 08:30:07 +00:00
echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
}
2010-10-07 14:17:34 +00:00
}
2023-05-21 13:03:36 +00:00
2011-01-06 08:30:07 +00:00
echo "</table>\n";
echo "</div>\n";
2011-01-06 08:30:07 +00:00
echo "</form>\n";
2018-02-06 12:53:15 +00:00
echo script("tableCheck();");
2010-10-07 14:17:34 +00:00
}