adminerevo/editor/db.inc.php

27 lines
1.2 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();
}
2011-08-11 11:48:27 +00:00
echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);'>\n";
2011-01-06 08:30:07 +00:00
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^tables\[/);"><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>";
2011-01-06 08:30:07 +00:00
$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>";
}
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";
2011-08-11 11:48:27 +00:00
echo "<script type='text/javascript'>tableCheck();</script>\n";
2011-01-06 08:30:07 +00:00
echo "</form>\n";
2010-10-07 14:17:34 +00:00
}