Order rows by clicking on table heading
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@418 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
2d6eed778f
commit
e4089afd4c
|
@ -195,7 +195,11 @@ function add_row(field) {
|
||||||
echo "<table border='1' cellspacing='0' cellpadding='2'>\n";
|
echo "<table border='1' cellspacing='0' cellpadding='2'>\n";
|
||||||
for ($j=0; $row = $result->fetch_assoc(); $j++) {
|
for ($j=0; $row = $result->fetch_assoc(); $j++) {
|
||||||
if (!$j) {
|
if (!$j) {
|
||||||
echo '<thead><tr><td><label><input type="checkbox" name="delete_selected" value="1" onclick="var elems = this.form.elements; for (var i=0; i < elems.length; i++) if (elems[i].name == \'delete[]\') elems[i].checked = this.checked;" />' . lang('all') . '</label></td><th>' . implode("</th><th>", array_map('htmlspecialchars', array_keys($row))) . "</th></tr></thead>\n";
|
echo '<thead><tr><td><label><input type="checkbox" name="delete_selected" value="1" onclick="var elems = this.form.elements; for (var i=0; i < elems.length; i++) if (elems[i].name == \'delete[]\') elems[i].checked = this.checked;" />' . lang('all') . '</label></td>';
|
||||||
|
foreach ($row as $key => $val) {
|
||||||
|
echo '<th><a href="' . remove_from_uri('(order|desc)[^=]*') . '&order%5B0%5D=' . htmlspecialchars($key) . ($_GET["order"][0] === $key && !$_GET["desc"][0] ? '&desc%5B0%5D=1' : '') . '">' . htmlspecialchars($key) . "</a></th>";
|
||||||
|
}
|
||||||
|
echo "</tr></thead>\n";
|
||||||
}
|
}
|
||||||
$unique_idf = implode('&', unique_idf($row, $indexes));
|
$unique_idf = implode('&', unique_idf($row, $indexes));
|
||||||
echo '<tr><td><input type="checkbox" name="delete[]" value="' . $unique_idf . '" /> <a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET['select']) . '&' . $unique_idf . '">' . lang('edit') . "</a></td>";
|
echo '<tr><td><input type="checkbox" name="delete[]" value="' . $unique_idf . '" /> <a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET['select']) . '&' . $unique_idf . '">' . lang('edit') . "</a></td>";
|
||||||
|
|
3
todo.txt
3
todo.txt
|
@ -1,4 +1,4 @@
|
||||||
Edit of fields with foreign key as <select> (optional)
|
Add whisperer to fields with foreign key
|
||||||
Highlight found fields
|
Highlight found fields
|
||||||
MySQL 5 BIT data type
|
MySQL 5 BIT data type
|
||||||
Check MySQL server version
|
Check MySQL server version
|
||||||
|
@ -7,7 +7,6 @@ Clone row
|
||||||
Execution time in sql.inc.php
|
Execution time in sql.inc.php
|
||||||
Input function results in edit
|
Input function results in edit
|
||||||
Choose tables and data to export
|
Choose tables and data to export
|
||||||
Order rows by clicking on table heading
|
|
||||||
? CSV export
|
? CSV export
|
||||||
? Query print
|
? Query print
|
||||||
? Access without login - accept $_GET
|
? Access without login - accept $_GET
|
||||||
|
|
Loading…
Reference in a new issue