[ Index ] |
PHP Cross Reference of phpBB 3.0 Beta 3 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * @package acp 5 * @version $Id: acp_php_info.php,v 1.8 2006/08/28 15:50:31 acydburn Exp $ 6 * @copyright (c) 2005 phpBB Group 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 8 * 9 */ 10 11 /** 12 * @package acp 13 */ 14 class acp_php_info 15 { 16 var $u_action; 17 18 function main($id, $mode) 19 { 20 global $db, $user, $auth, $template; 21 global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; 22 23 if ($mode != 'info') 24 { 25 trigger_error('NO_MODE', E_USER_ERROR); 26 } 27 28 $this->tpl_name = 'acp_php_info'; 29 $this->page_title = 'ACP_PHP_INFO'; 30 31 ob_start(); 32 phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES); 33 $phpinfo = ob_get_contents(); 34 ob_end_clean(); 35 36 // Here we play around a little with the PHP Info HTML to try and stylise 37 // it along phpBB's lines ... hopefully without breaking anything. The idea 38 // for this was nabbed from the PHP annotated manual 39 preg_match_all('#<body[^>]*>(.*)</body>#si', $phpinfo, $output); 40 41 $output = $output[1][0]; 42 $output = preg_replace('#<tr class="v"><td>(.*?<a[^>]*><img[^>]*></a>)(.*?)</td></tr>#s', '<tr class="row1"><td><table class="type2"><tr><td>\2</td><td>\1</td></tr></table></td></tr>', $output); 43 $output = preg_replace('#<table[^>]+>#i', '<table>', $output); 44 $output = preg_replace('#<img border="0"#i', '<img', $output); 45 $output = str_replace(array('class="e"', 'class="v"', 'class="h"', '<hr />', '<font', '</font>'), array('class="row1"', 'class="row2"', '', '', '<span', '</span>'), $output); 46 47 preg_match_all('#<div class="center">(.*)</div>#siU', $output, $output); 48 $output = $output[1][0]; 49 50 $template->assign_var('PHPINFO', $output); 51 } 52 } 53 54 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 22 00:35:05 2006 | Cross-referenced by PHPXref 0.6 |