adminerevo/adminer/processlist.inc.php
jakubvrana 98507da3ea Function verify_version doesn't use version parameter
Don't preselect first option in foreign key edit
Prefill insert by foreign key searches
REQUEST_URI is used earlier
Change variable $SELF to constant ME
Denote required fields in Editor


git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@944 7c3ca157-0c34-0410-bff1-cbf682f78f5c
2009-07-30 08:12:54 +00:00

32 lines
915 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) has been killed.', $killed), $killed || !$_POST["kill"], false, !$killed && $_POST["kill"]);
}
page_header(lang('Process list'), $error);
?>
<form action="" method="post">
<table cellspacing="0">
<?php
$result = $dbh->query("SHOW PROCESSLIST");
for ($i=0; $row = $result->fetch_assoc(); $i++) {
if (!$i) {
echo "<thead><tr lang='en'><th>&nbsp;<th>" . implode("<th>", array_keys($row)) . "</thead>\n";
}
echo "<tr" . odd() . "><td><input type='checkbox' name='kill[]' value='$row[Id]'><td>" . implode("<td>", $row) . "\n";
}
$result->free();
?>
</table>
<p>
<input type="hidden" name="token" value="<?php echo $token; ?>">
<input type="submit" value="<?php echo lang('Kill'); ?>">
</form>