2007-07-16 13:26:37 +00:00
|
|
|
<?php
|
|
|
|
if ($_POST && !$error) {
|
|
|
|
$killed = 0;
|
|
|
|
foreach ((array) $_POST["kill"] as $val) {
|
2010-10-22 22:02:24 +00:00
|
|
|
if (queries("KILL " . (+$val))) {
|
2007-07-16 13:26:37 +00:00
|
|
|
$killed++;
|
|
|
|
}
|
|
|
|
}
|
2009-10-13 20:01:52 +00:00
|
|
|
queries_redirect(ME . "processlist=", lang('%d process(es) have been killed.', $killed), $killed || !$_POST["kill"]);
|
2007-07-16 13:26:37 +00:00
|
|
|
}
|
2009-07-20 12:12:55 +00:00
|
|
|
|
2008-04-10 14:37:10 +00:00
|
|
|
page_header(lang('Process list'), $error);
|
2007-07-16 13:26:37 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
<form action="" method="post">
|
2010-06-24 13:15:02 +00:00
|
|
|
<table cellspacing="0" onclick="tableClick(event);" class="nowrap">
|
2007-07-16 13:26:37 +00:00
|
|
|
<?php
|
2010-12-10 16:08:07 +00:00
|
|
|
$i = -1;
|
2010-10-13 15:53:59 +00:00
|
|
|
foreach (get_rows("SHOW FULL PROCESSLIST") as $i => $row) {
|
2007-07-16 13:26:37 +00:00
|
|
|
if (!$i) {
|
2009-07-11 20:30:40 +00:00
|
|
|
echo "<thead><tr lang='en'><th> <th>" . implode("<th>", array_keys($row)) . "</thead>\n";
|
2007-07-16 13:26:37 +00:00
|
|
|
}
|
2010-10-19 14:54:48 +00:00
|
|
|
echo "<tr" . odd() . "><td>" . checkbox("kill[]", $row["Id"], 0);
|
|
|
|
foreach ($row as $key => $val) {
|
2010-12-10 16:05:30 +00:00
|
|
|
echo "<td>" . ($key == "Info" && $val != "" ? "<code class='jush-$jush'>" . shorten_utf8($val, 100, "</code>") . ' <a href="' . h(ME . ($row["db"] != "" ? "db=" . urlencode($row["db"]) . "&" : "") . "sql=" . urlencode($val)) . '">' . lang('Edit') . '</a>' : nbsp($val));
|
2010-10-19 14:54:48 +00:00
|
|
|
}
|
|
|
|
echo "\n";
|
2007-07-16 13:26:37 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
2011-01-31 20:01:07 +00:00
|
|
|
<p><?php echo ($i + 1) . "/" . lang('%d in total', $connection->result("SELECT @@max_connections")); ?>
|
2007-07-16 13:26:37 +00:00
|
|
|
<p>
|
2009-07-11 20:30:40 +00:00
|
|
|
<input type="submit" value="<?php echo lang('Kill'); ?>">
|
2011-03-08 12:43:05 +00:00
|
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
2007-07-16 13:26:37 +00:00
|
|
|
</form>
|