6b30cfa769
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1147 7c3ca157-0c34-0410-bff1-cbf682f78f5c
31 lines
942 B
PHP
31 lines
942 B
PHP
<?php
|
|
if ($_POST && !$error) {
|
|
$killed = 0;
|
|
foreach ((array) $_POST["kill"] as $val) {
|
|
if (queries("KILL " . intval($val))) {
|
|
$killed++;
|
|
}
|
|
}
|
|
query_redirect(queries(), ME . "processlist=", lang('%d process(es) have been killed.', $killed), $killed || !$_POST["kill"], false, !$killed && $_POST["kill"]);
|
|
}
|
|
|
|
page_header(lang('Process list'), $error);
|
|
?>
|
|
|
|
<form action="" method="post">
|
|
<table cellspacing="0" onclick="table_click(event);">
|
|
<?php
|
|
$result = $connection->query("SHOW PROCESSLIST");
|
|
for ($i=0; $row = $result->fetch_assoc(); $i++) {
|
|
if (!$i) {
|
|
echo "<thead><tr lang='en'><th> <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";
|
|
}
|
|
?>
|
|
</table>
|
|
<p>
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
<input type="submit" value="<?php echo lang('Kill'); ?>">
|
|
</form>
|