adminerevo/editor/db.inc.php

28 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";
echo "<script>mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});</script>\n";
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck.call(this, /^tables\[/);" class="jsonly"><th>' . lang('Table') . '<td>' . lang('Rows') . "</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";
echo "<script>tableCheck();</script>\n";
2011-01-06 08:30:07 +00:00
echo "</form>\n";
2010-10-07 14:17:34 +00:00
}