Highlight and edit SQL command in processlist

This commit is contained in:
Jakub Vrana 2010-10-19 16:54:48 +02:00
parent 0311083b49
commit 84d9ecf0c9

View file

@ -19,7 +19,11 @@ foreach (get_rows("SHOW FULL PROCESSLIST") as $i => $row) {
if (!$i) {
echo "<thead><tr lang='en'><th>&nbsp;<th>" . implode("<th>", array_keys($row)) . "</thead>\n";
}
echo "<tr" . odd() . "><td>" . checkbox("kill[]", $row["Id"], 0) . "<td>" . implode("<td>", array_map('nbsp', $row)) . "\n";
echo "<tr" . odd() . "><td>" . checkbox("kill[]", $row["Id"], 0);
foreach ($row as $key => $val) {
echo "<td>" . ($key == "Info" ? "<code class='jush-$jush'>" . nbsp($val) . '</code> <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Edit') . '</a>' : nbsp($val));
}
echo "\n";
}
?>
</table>