Browse Source

show module info in statistics page

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@147 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.1
Xuefer 15 years ago
parent
commit
a29d074126
  1. 4
      admin/common-zh-simplified-utf-8.lang.php
  2. 4
      admin/common-zh-traditional-utf-8.lang.php
  3. 6
      admin/xcache.css
  4. 10
      admin/xcache.php
  5. 7
      admin/xcache.tpl.php

4
admin/common-zh-simplified-utf-8.lang.php

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

4
admin/common-zh-traditional-utf-8.lang.php

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

6
admin/xcache.css

@ -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;}

10
admin/xcache.php

@ -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;
}
// }}}

7
admin/xcache.tpl.php

@ -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

Loading…
Cancel
Save