3 // vim: expandtab sw=4 ts=4 sts=4:
9 require('./server_common.inc.php3');
13 * Kills a selected process
16 $sql_query = 'KILL ' . $kill . ';';
17 if (@PMA_mysql_query
($sql_query, $userlink)) {
18 $message = sprintf($strThreadSuccessfullyKilled, $kill);
20 $message = sprintf($strCouldNotKill, $kill);
28 require('./server_links.inc.php3');
32 * Displays the sub-page heading
35 . ' ' . $strProcesslist . "\n"
40 * Sends the query and buffers the result
42 $serverProcesses = array();
43 $res = @PMA_mysql_query
('SHOW PROCESSLIST;', $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), 'SHOW PROCESSLIST;');
44 while ($row = PMA_mysql_fetch_array($res, MYSQL_ASSOC
)) {
45 $serverProcesses[] = $row;
47 @mysql_free_result
($res);
59 <th
> 
;<?php
echo $strId; ?
> 
;</th
>
60 <th
> 
;<?php
echo $strUser; ?
> 
;</th
>
61 <th
> 
;<?php
echo $strHost; ?
> 
;</th
>
62 <th
> 
;<?php
echo $strDatabase; ?
> 
;</th
>
63 <th
> 
;<?php
echo $strCommand; ?
> 
;</th
>
64 <th
> 
;<?php
echo $strTime; ?
> 
;</th
>
65 <th
> 
;<?php
echo $strStatus; ?
> 
;</th
>
66 <th
> 
;<?php
echo $strSQLQuery; ?
> 
;</th
>
69 $useBgcolorOne = TRUE;
70 while (list($name, $value) = each($serverProcesses)) {
73 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<a href
="./server_processlist.php3?<?php echo $url_query . '&kill=' . $value['Id']; ?>"><?php
echo $strKill; ?
></a
> 
;</td
>
74 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align
="right"> 
;<?php
echo $value['Id']; ?
> 
;</td
>
75 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['User']; ?
> 
;</td
>
76 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['Host']; ?
> 
;</td
>
77 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['db']) ?
'<i>' . $strNone . '</i>' : $value['db']); ?
> 
;</td
>
78 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['Command']; ?
> 
;</td
>
79 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align
="right"> 
;<?php
echo $value['Time']; ?
> 
;</td
>
80 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['State']) ?
'---' : $value['State']); ?
> 
;</td
>
81 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['Info']) ?
'---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?
> 
;</td
>
83 $useBgcolorOne = !$useBgcolorOne;
96 require('./footer.inc.php3');