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
}
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-05-01 10:41:33 +00:00
< table cellspacing = " 0 " >
2007-07-16 13:26:37 +00:00
< ? php
2009-05-08 05:23:03 +00:00
$result = $dbh -> 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-07-11 20:30:40 +00:00
echo " <tr " . odd () . " ><td><input type='checkbox' name='kill[]' value=' $row[Id] '><td> " . implode ( " <td> " , $row ) . " \n " ;
2007-07-16 13:26:37 +00:00
}
$result -> free ();
?>
</ 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 >