1
0
Fork 0

show module info in statistics page

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@147 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2006-09-09 00:56:19 +00:00
parent 2964ae1d75
commit a29d074126
5 changed files with 27 additions and 4 deletions

View File

@ -90,8 +90,8 @@ $strings = array(
=> '大小',
'offset'
=> '位置',
''
=> '',
'Module Info'
=> '模块信息',
''
=> '',
''

View File

@ -90,8 +90,8 @@ $strings = array(
=> '大小',
'offset'
=> '位置',
''
=> '',
'Module Info'
=> '組元訊息',
''
=> '',
''

View File

@ -6,6 +6,12 @@ table.cycles .col2 { background-color: #e0e0e0; }
table.cycles th, table.cycles td { border: 1px solid black; font-family: monospace; }
table.cycles th { background-color: #9999cc; color: black; font-weight: bold; height: 20px; line-height: 20px; font-family: serif; }
th a { color: black; font-weight: bold; display: block; width: 100%; height: 100%; }
.moduleinfo table { border: 1px solid black; }
.moduleinfo table th, .moduleinfo table td { border: 1px solid black; }
.moduleinfo table th { font-weight: bold; }
.moduleinfo .e {background-color: #ccccff; font-weight: bold; color: #000000;}
.moduleinfo .h {background-color: #9999cc; font-weight: bold; color: #000000;}
.moduleinfo .v {background-color: #cccccc; color: #000000;}
.button { }
span.sortarrow { color: white; text-decoration: none; }
.freeblocks { float: left; margin-right: 4px;}

View File

@ -98,6 +98,7 @@ if (!extension_loaded('XCache')) {
$pcnt = xcache_count(XC_TYPE_PHP);
$vcnt = xcache_count(XC_TYPE_VAR);
$moduleinfo = null;
$type_none = -1;
if (!isset($_GET['type'])) {
$_GET['type'] = $type_none;
@ -188,6 +189,15 @@ case XC_TYPE_VAR:
default:
$_GET['type'] = $type_none;
$cachelist = array();
ob_start();
phpinfo(INFO_MODULES);
$moduleinfo = ob_get_clean();
if (preg_match('!XCache</a></h2>(.*?)<h2><a name="module_!is', $moduleinfo, $m)) {
$moduleinfo = $m[1];
}
else {
$moduleinfo = null;
}
break;
}
// }}}

View File

@ -245,6 +245,13 @@ ENTRY;
ob_end_flush();
}
}
if ($moduleinfo) {
$t_moduleinfo = _T("Module Info");
echo <<<HTML
<h2>$t_moduleinfo</h2>
<div class="moduleinfo">$moduleinfo</div>
HTML;
}
?>
<div class="footnote">
<?php echo <<<EOS