2007-07-16 13:26:37 +00:00
< ? php
if ( $_POST && ! $error ) {
$killed = 0 ;
foreach (( array ) $_POST [ " kill " ] as $val ) {
2008-09-03 13:55:43 +00:00
if ( queries ( " KILL " . intval ( $val ))) {
2007-07-16 13:26:37 +00:00
$killed ++ ;
}
}
2008-09-03 13:55:43 +00:00
query_redirect ( queries (), $SELF . " processlist= " , lang ( '%d process(es) has been killed.' , $killed ), $killed || ! $_POST [ " kill " ], false , ! $killed && $_POST [ " kill " ]);
2007-07-16 13:26:37 +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 " >
< table border = " 1 " cellspacing = " 0 " cellpadding = " 2 " >
< ? php
$result = $mysql -> query ( " SHOW PROCESSLIST " );
for ( $i = 0 ; $row = $result -> fetch_assoc (); $i ++ ) {
if ( ! $i ) {
2007-08-11 06:19:38 +00:00
echo " <thead><tr lang='en'><th> </th><th> " . implode ( " </th><th> " , array_keys ( $row )) . " </th></tr></thead> \n " ;
2007-07-16 13:26:37 +00:00
}
echo " <tr><td><input type='checkbox' name='kill[]' value=' $row[Id] ' /></td><td> " . implode ( " </td><td> " , $row ) . " </td></tr> \n " ;
}
$result -> free ();
?>
</ table >
< p >
< input type = " hidden " name = " token " value = " <?php echo $token ; ?> " />
< input type = " submit " value = " <?php echo lang('Kill'); ?> " />
</ p >
</ form >