mirror of
https://github.com/vrana/adminer.git
synced 2025-08-14 02:23:59 +02:00
Edit link in first column
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@280 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -141,9 +141,9 @@ function add_row(field) {
|
||||
echo "<table border='1' cellspacing='0' cellpadding='2'>\n";
|
||||
for ($j=0; $row = $result->fetch_assoc(); $j++) {
|
||||
if (!$j) {
|
||||
echo "<thead><tr><th>" . implode("</th><th>", array_map('htmlspecialchars', array_keys($row))) . "</th><th> </th></tr></thead>\n";
|
||||
echo "<thead><tr><th> </th><th>" . implode("</th><th>", array_map('htmlspecialchars', array_keys($row))) . "</th></tr></thead>\n";
|
||||
}
|
||||
echo "<tr>";
|
||||
echo '<tr><td><a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET['select']) . $unique_idf . '">' . lang('edit') . "</a></td>";
|
||||
$unique_idf = '&' . implode('&', unique_idf($row, $indexes));
|
||||
//! multiple delete by checkboxes
|
||||
foreach ($row as $key => $val) {
|
||||
@@ -162,14 +162,13 @@ function add_row(field) {
|
||||
foreach ($foreign_key["source"] as $i => $source) {
|
||||
$val = "&where%5B$i%5D%5Bcol%5D=" . urlencode($foreign_key["target"][$i]) . "&where%5B$i%5D%5Bop%5D=%3D&where%5B$i%5D%5Bval%5D=" . urlencode($row[$source]) . $val;
|
||||
}
|
||||
$val = '<a href="' . htmlspecialchars(strlen($foreign_key["db"]) ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), $SELF) : $SELF) . 'select=' . htmlspecialchars($foreign_key["table"]) . $val; // InnoDB support non-UNIQUE keys
|
||||
$val = '<a href="' . htmlspecialchars(strlen($foreign_key["db"]) ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), $SELF) : $SELF) . 'select=' . htmlspecialchars($foreign_key["table"]) . $val; // InnoDB supports non-UNIQUE keys
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<td>$val</td>";
|
||||
}
|
||||
echo '<td><a href="' . htmlspecialchars($SELF) . 'edit=' . urlencode($_GET['select']) . $unique_idf . '">' . lang('edit') . '</a></td>';
|
||||
echo "</tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
Reference in New Issue
Block a user