Documentation TYPO3 par Ameos |
00001 <?php 00002 /* $Id: server_processlist.php,v 2.11 2004/10/21 10:18:12 nijel Exp $ */ 00003 // vim: expandtab sw=4 ts=4 sts=4: 00004 00005 00009 require_once('./server_common.inc.php'); 00010 00011 00015 if (!empty($kill)) { 00016 if (PMA_DBI_try_query('KILL ' . $kill . ';')) { 00017 $message = sprintf($strThreadSuccessfullyKilled, $kill); 00018 } else { 00019 $message = sprintf($strCouldNotKill, $kill); 00020 } 00021 } 00022 00023 00027 require('./server_links.inc.php'); 00028 00029 00033 echo '<h2>' . "\n" 00034 . ($cfg['MainPageIconic'] ? '<img src="' . $pmaThemeImage . 's_process.png" width="16" height="16" border="0" hspace="2" align="middle" />' : '' ) 00035 . ' ' . $strProcesslist . "\n" 00036 . '</h2>' . "\n"; 00037 00038 00042 $serverProcesses = array(); 00043 $sql_query = 'SHOW' . (empty($full) ? '' : ' FULL') . ' PROCESSLIST'; 00044 $res = PMA_DBI_query($sql_query); 00045 while ($row = PMA_DBI_fetch_assoc($res)) { 00046 $serverProcesses[] = $row; 00047 } 00048 @PMA_DBI_free_result($res); 00049 unset($res); 00050 unset($row); 00051 00052 PMA_showMessage($GLOBALS['strSuccess']); 00053 00054 00058 ?> 00059 <table border="0" cellpadding="2" cellspacing="1"> 00060 <tr> 00061 <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> 00062 <th> <?php echo $strId; ?> </th> 00063 <th> <?php echo $strUser; ?> </th> 00064 <th> <?php echo $strHost; ?> </th> 00065 <th> <?php echo $strDatabase; ?> </th> 00066 <th> <?php echo $strCommand; ?> </th> 00067 <th> <?php echo $strTime; ?> </th> 00068 <th> <?php echo $strStatus; ?> </th> 00069 <th> <?php echo $strSQLQuery; ?> </th> 00070 </tr> 00071 <?php 00072 $useBgcolorOne = TRUE; 00073 foreach ($serverProcesses AS $name => $value) { 00074 ?> 00075 <tr> 00076 <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> 00077 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo $value['Id']; ?> </td> 00078 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['User']; ?> </td> 00079 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['Host']; ?> </td> 00080 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo (empty($value['db']) ? '<i>' . $strNone . '</i>' : $value['db']); ?> </td> 00081 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo $value['Command']; ?> </td> 00082 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right"> <?php echo $value['Time']; ?> </td> 00083 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo (empty($value['State']) ? '---' : $value['State']); ?> </td> 00084 <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>"> <?php echo (empty($value['Info']) ? '---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?> </td> 00085 </tr> 00086 <?php 00087 $useBgcolorOne = !$useBgcolorOne; 00088 } 00089 ?> 00090 <?php 00091 ?> 00092 </table> 00093 <?php 00094 00095 00099 require_once('./footer.inc.php'); 00100 00101 ?>