Documentation TYPO3 par Ameos

server_processlist.php

00001 <?php
00002 /* $Id: server_processlist.php,v 2.3 2003/11/26 22:52:24 rabus 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     $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) ? '&amp;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>&nbsp;<?php echo $strId; ?>&nbsp;</th>
00061         <th>&nbsp;<?php echo $strUser; ?>&nbsp;</th>
00062         <th>&nbsp;<?php echo $strHost; ?>&nbsp;</th>
00063         <th>&nbsp;<?php echo $strDatabase; ?>&nbsp;</th>
00064         <th>&nbsp;<?php echo $strCommand; ?>&nbsp;</th>
00065         <th>&nbsp;<?php echo $strTime; ?>&nbsp;</th>
00066         <th>&nbsp;<?php echo $strStatus; ?>&nbsp;</th>
00067         <th>&nbsp;<?php echo $strSQLQuery; ?>&nbsp;</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']; ?>">&nbsp;<a href="./server_processlist.php?<?php echo $url_query . '&amp;kill=' . $value['Id']; ?>"><?php echo $strKill; ?></a>&nbsp;</td>
00075         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Id']; ?>&nbsp;</td>
00076         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['User']; ?>&nbsp;</td>
00077         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Host']; ?>&nbsp;</td>
00078         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['db']) ? '<i>' . $strNone . '</i>' : $value['db']); ?>&nbsp;</td>
00079         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo $value['Command']; ?>&nbsp;</td>
00080         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>" align="right">&nbsp;<?php echo $value['Time']; ?>&nbsp;</td>
00081         <td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo (empty($value['State']) ? '---' : $value['State']); ?>&nbsp;</td>
00082         <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>
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 ?>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6