Documentation TYPO3 par Ameos

server_processlist.php

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) ? '&amp;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>&nbsp;<?php echo $strId; ?>&nbsp;</th>
00063         <th>&nbsp;<?php echo $strUser; ?>&nbsp;</th>
00064         <th>&nbsp;<?php echo $strHost; ?>&nbsp;</th>
00065         <th>&nbsp;<?php echo $strDatabase; ?>&nbsp;</th>
00066         <th>&nbsp;<?php echo $strCommand; ?>&nbsp;</th>
00067         <th>&nbsp;<?php echo $strTime; ?>&nbsp;</th>
00068         <th>&nbsp;<?php echo $strStatus; ?>&nbsp;</th>
00069         <th>&nbsp;<?php echo $strSQLQuery; ?>&nbsp;</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']; ?>">&nbsp;<a href="./server_processlist.php?<?php echo $url_query . '&amp;kill=' . $value['Id']; ?>"><?php echo $strKill; ?></a>&nbsp;</td>
00077         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Id']; ?>&nbsp;</td>
00078         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['User']; ?>&nbsp;</td>
00079         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Host']; ?>&nbsp;</td>
00080         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['db']) ? '<i>' . $strNone . '</i>' : $value['db']); ?>&nbsp;</td>
00081         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Command']; ?>&nbsp;</td>
00082         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Time']; ?>&nbsp;</td>
00083         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['State']) ? '---' : $value['State']); ?>&nbsp;</td>
00084         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['Info']) ? '---' : PMA_SQP_formatHtml(PMA_SQP_parse($value['Info']))); ?>&nbsp;</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 ?>


Généré par Le spécialiste TYPO3 avec  doxygen 1.4.6