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 $sql_query = 'SHOW' . (empty($full) ?
'' : ' FULL') . ' PROCESSLIST;';
44 $res = @PMA_mysql_query
($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query);
45 while ($row = PMA_mysql_fetch_array($res, MYSQL_ASSOC
)) {
46 $serverProcesses[] = $row;
48 @mysql_free_result
($res);
59 <th
><?php
echo PMA_MYSQL_INT_VERSION
< 32307 ?
'' : '<a href="./server_processlist.php3?'. $url_query . (empty($full) ?
'&full=1' : '') . '" title="' . (empty($full) ?
$strShowFullQueries : $strTruncateQueries) . '"><img src="./images/' . (empty($full) ?
'full' : 'partial') . 'text.png" width="50" height="20" border="0" alt="' . (empty($full) ?
$strShowFullQueries : $strTruncateQueries) . '" /></a>'; ?
></th
>
60 <th
> 
;<?php
echo $strId; ?
> 
;</th
>
61 <th
> 
;<?php
echo $strUser; ?
> 
;</th
>
62 <th
> 
;<?php
echo $strHost; ?
> 
;</th
>
63 <th
> 
;<?php
echo $strDatabase; ?
> 
;</th
>
64 <th
> 
;<?php
echo $strCommand; ?
> 
;</th
>
65 <th
> 
;<?php
echo $strTime; ?
> 
;</th
>
66 <th
> 
;<?php
echo $strStatus; ?
> 
;</th
>
67 <th
> 
;<?php
echo $strSQLQuery; ?
> 
;</th
>
70 $useBgcolorOne = TRUE;
71 while (list($name, $value) = each($serverProcesses)) {
74 <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
>
75 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align
="right"> 
;<?php
echo $value['Id']; ?
> 
;</td
>
76 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['User']; ?
> 
;</td
>
77 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['Host']; ?
> 
;</td
>
78 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['db']) ?
'<i>' . $strNone . '</i>' : $value['db']); ?
> 
;</td
>
79 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo $value['Command']; ?
> 
;</td
>
80 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align
="right"> 
;<?php
echo $value['Time']; ?
> 
;</td
>
81 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['State']) ?
'---' : $value['State']); ?
> 
;</td
>
82 <td bgcolor
="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> 
;<?php
echo (empty($value['Info']) ?
'---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?
> 
;</td
>
84 $useBgcolorOne = !$useBgcolorOne;
97 require('./footer.inc.php3');