00001 <?php
00002
00003
00004
00005
00009 require_once('./server_common.inc.php');
00010
00011
00015 if (!empty($kill)) {
00016 $sql_query = 'KILL ' . $kill . ';';
00017 if (@PMA_mysql_query($sql_query, $userlink)) {
00018 $message = sprintf($strThreadSuccessfullyKilled, $kill);
00019 } else {
00020 $message = sprintf($strCouldNotKill, $kill);
00021 }
00022 }
00023
00024
00028 require('./server_links.inc.php');
00029
00030
00034 echo '<h2>' . "\n"
00035 . ' ' . $strProcesslist . "\n"
00036 . '</h2>' . "\n";
00037
00038
00042 $serverProcesses = array();
00043 $sql_query = 'SHOW' . (empty($full) ? '' : ' FULL') . ' PROCESSLIST;';
00044 $res = @PMA_mysql_query($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query);
00045 while ($row = PMA_mysql_fetch_array($res, MYSQL_ASSOC)) {
00046 $serverProcesses[] = $row;
00047 }
00048 @mysql_free_result($res);
00049 unset($res);
00050 unset($row);
00051
00052
00056 ?>
00057 <table border="0">
00058 <tr>
00059 <th><a href="./server_processlist.php?<?php echo $url_query . (empty($full) ? '&full=1' : ''); ?>" title="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>"><img src="./images/<?php echo empty($full) ? 'full' : 'partial'; ?>text.png" width="50" height="20" border="0" alt="<?php echo empty($full) ? $strShowFullQueries : $strTruncateQueries; ?>" /></a></th>
00060 <th> <?php echo $strId; ?> </th>
00061 <th> <?php echo $strUser; ?> </th>
00062 <th> <?php echo $strHost; ?> </th>
00063 <th> <?php echo $strDatabase; ?> </th>
00064 <th> <?php echo $strCommand; ?> </th>
00065 <th> <?php echo $strTime; ?> </th>
00066 <th> <?php echo $strStatus; ?> </th>
00067 <th> <?php echo $strSQLQuery; ?> </th>
00068 </tr>
00069 <?php
00070 $useBgcolorOne = TRUE;
00071 foreach($serverProcesses AS $name => $value) {
00072 ?>
00073 <tr>
00074 <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>
00075 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo $value['Id']; ?> </td>
00076 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['User']; ?> </td>
00077 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['Host']; ?> </td>
00078 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo (empty($value['db']) ? '<i>' . $strNone . '</i>' : $value['db']); ?> </td>
00079 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['Command']; ?> </td>
00080 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo $value['Time']; ?> </td>
00081 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo (empty($value['State']) ? '---' : $value['State']); ?> </td>
00082 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo (empty($value['Info']) ? '---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?> </td>
00083 <?php
00084 $useBgcolorOne = !$useBgcolorOne;
00085 }
00086 ?>
00087 </tr>
00088 <?php
00089 ?>
00090 </table>
00091 <?php
00092
00093
00097 require_once('./footer.inc.php');
00098
00099 ?>