Files
adminer/editor/db.inc.php

36 lines
1.4 KiB
PHP
Raw Normal View History

<?php
2025-03-05 11:28:53 +01:00
namespace Adminer;
page_header(lang('Server'), "", false);
2011-01-06 09:30:07 +01: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 09:30:07 +01:00
if ($_POST["query"] != "") {
search_tables();
}
2018-10-27 21:20:56 +02:00
echo "<div class='scrollable'>\n";
2025-02-23 11:42:05 +01:00
echo "<table class='nowrap checkable odds'>\n";
2018-01-12 15:27:44 +01:00
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
2018-01-12 17:19:35 +01: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";
2025-02-21 13:53:18 +01:00
2011-01-06 09:30:07 +01:00
foreach (table_status() as $table => $row) {
$name = $adminer->tableName($row);
if ($name != "") {
2025-02-21 21:27:41 +01:00
echo '<tr><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true));
2011-03-24 02:19:21 +01:00
echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
2014-03-19 21:56:42 -07:00
$val = format_number($row["Rows"]);
2011-01-06 09:30:07 +01:00
echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
}
2010-10-07 16:17:34 +02:00
}
2025-02-21 13:53:18 +01:00
2011-01-06 09:30:07 +01:00
echo "</table>\n";
echo "</div>\n";
2011-01-06 09:30:07 +01:00
echo "</form>\n";
2018-02-06 13:53:15 +01:00
echo script("tableCheck();");
2010-10-07 16:17:34 +02:00
}