Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (23 sloc) 1.273 kb
b95f24e Editor: User friendly data editor
jakubvrana authored
1 <?php
3f5b683 Reintegrate sqlite branch
jakubvrana authored
2 page_header(lang('Server'), "", false);
3313f7b Search in all tables
jakubvrana authored
3
7416164 Jakub Vrána Homepage customization
authored
4 if ($adminer->homepage()) {
5 echo "<form action='' method='post'>\n";
6 echo "<p>" . lang('Search data in tables') . ": <input name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
7 if ($_POST["query"] != "") {
8 search_tables();
9 }
023b62a Jakub Vrána Highlight checked rows
authored
10 echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);'>\n";
7416164 Jakub Vrána Homepage customization
authored
11 echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^tables\[/);"><th>' . lang('Table') . '<td>' . lang('Rows') . "</thead>\n";
12 foreach (table_status() as $table => $row) {
13 $name = $adminer->tableName($row);
14 if (isset($row["Engine"]) && $name != "") {
15 echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');");
5ee1407 Jakub Vrána Avoid double escaping
authored
16 echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
7416164 Jakub Vrána Homepage customization
authored
17 $val = number_format($row["Rows"], 0, '.', lang(','));
18 echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
19 }
dfa6cbf Jakub Vrána Show tables overview in Editor
authored
20 }
7416164 Jakub Vrána Homepage customization
authored
21 echo "</table>\n";
023b62a Jakub Vrána Highlight checked rows
authored
22 echo "<script type='text/javascript'>tableCheck();</script>\n";
7416164 Jakub Vrána Homepage customization
authored
23 echo "</form>\n";
dfa6cbf Jakub Vrána Show tables overview in Editor
authored
24 }
Something went wrong with that request. Please try again.