3 // vim: expandtab sw=4 ts=4 sts=4:
9 require_once('./server_common.inc.php');
13 * Kills a selected process
16 if (PMA_DBI_try_query('KILL ' . $kill . ';')) {
17 $message = sprintf($strThreadSuccessfullyKilled, $kill);
19 $message = sprintf($strCouldNotKill, $kill);
27 require('./server_links.inc.php');
31 * Displays the sub-page heading
34 . ($cfg['MainPageIconic'] ?
'<img src="' . $pmaThemeImage . 's_process.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' )
35 . ' ' . $strProcesslist . "\n"
40 * Sends the query and buffers the result
42 $serverProcesses = array();
43 $sql_query = 'SHOW' . (empty($full) ?
'' : ' FULL') . ' PROCESSLIST';
44 $res = PMA_DBI_query($sql_query);
45 while ($row = PMA_DBI_fetch_assoc($res)) {
46 $serverProcesses[] = $row;
48 @PMA_DBI_free_result
($res);
52 PMA_showMessage($GLOBALS['strSuccess']);
59 <table border
="0" cellpadding
="2" cellspacing
="1">
61 <td
><a href
="./server_processlist.php?<?php echo $url_query . (empty($full) ? '&full=1' : ''); ?>" title
="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>"><img src
="<?php echo $pmaThemeImage . 's_' . (empty($full) ? 'full' : 'partial'); ?>text.png" width
="50" height
="20" border
="0" alt
="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>" /></a
></td
>
62 <th
> 
;<?php
echo $strId; ?
> 
;</th
>
63 <th
> 
;<?php
echo $strUser; ?
> 
;</th
>
64 <th
> 
;<?php
echo $strHost; ?
> 
;</th
>
65 <th
> 
;<?php
echo $strDatabase; ?
> 
;</th
>
66 <th
> 
;<?php
echo $strCommand; ?
> 
;</th
>
67 <th
> 
;<?php
echo $strTime; ?
> 
;</th
>
68 <th
> 
;<?php
echo $strStatus; ?
> 
;</th
>
69 <th
> 
;<?php
echo $strSQLQuery; ?
> 
;</th
>
72 $useBgcolorOne = TRUE;
73 foreach ($serverProcesses AS $name => $value) {
76 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<a href
="./server_processlist.php?<?php echo $url_query . '&kill=' . $value['Id']; ?>"><?php
echo $strKill; ?
></a
> 
;</td
>
77 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align
="right"> 
;<?php
echo $value['Id']; ?
> 
;</td
>
78 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['User']; ?
> 
;</td
>
79 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['Host']; ?
> 
;</td
>
80 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['db']) ?
'<i>' . $strNone . '</i>' : $value['db']); ?
> 
;</td
>
81 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['Command']; ?
> 
;</td
>
82 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align
="right"> 
;<?php
echo $value['Time']; ?
> 
;</td
>
83 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['State']) ?
'---' : $value['State']); ?
> 
;</td
>
84 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['Info']) ?
'---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?
> 
;</td
>
87 $useBgcolorOne = !$useBgcolorOne;
99 require_once('./footer.inc.php');