2007-07-16 13:26:37 +00:00
|
|
|
<?php
|
|
|
|
if ($_POST && !$error) {
|
|
|
|
$killed = 0;
|
|
|
|
foreach ((array) $_POST["kill"] as $val) {
|
2009-10-07 15:52:34 +00:00
|
|
|
if (queries("KILL " . ereg_replace("[^0-9]+", "", $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">
|
2009-12-17 13:22:28 +00:00
|
|
|
<table cellspacing="0" onclick="tableClick(event);">
|
2007-07-16 13:26:37 +00:00
|
|
|
<?php
|
2009-09-22 10:51:40 +00:00
|
|
|
$result = $connection->query("SHOW PROCESSLIST");
|
2007-07-16 13:26:37 +00:00
|
|
|
for ($i=0; $row = $result->fetch_assoc(); $i++) {
|
|
|
|
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
|
|
|
}
|
2009-09-25 12:03:30 +00:00
|
|
|
echo "<tr" . odd() . "><td>" . checkbox("kill[]", $row["Id"], 0) . "<td>" . implode("<td>", array_map('nbsp', $row)) . "\n";
|
2007-07-16 13:26:37 +00:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
<p>
|
2009-07-11 20:30:40 +00:00
|
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
|
|
<input type="submit" value="<?php echo lang('Kill'); ?>">
|
2007-07-16 13:26:37 +00:00
|
|
|
</form>
|