adminerevo/editor/db.inc.php

32 lines
1.3 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 name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
if ($_POST["query"] != "") {
search_tables();
}
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";
2013-05-02 01:28:04 +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 != "") {
echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');");
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
}
2013-05-02 01:28:04 +00:00
2011-01-06 08:30:07 +00:00
echo "</table>\n";
2018-01-12 14:27:44 +00:00
echo script("tableCheck();");
2011-01-06 08:30:07 +00:00
echo "</form>\n";
2010-10-07 14:17:34 +00:00
}