source: sandbox/3.0/admin/phpinfo.php @ 2419

Revision 2419, 1.7 KB checked in by rodsouza, 14 years ago (diff)

Ticket #1009 - Removendo a chamada redundante ao método 'phpgw_header' no ExpressoLivre?

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2        /**************************************************************************\
3        * eGroupWare - administration                                              *
4        * http://www.egroupware.org                                                *
5        * --------------------------------------------                             *
6        *  This program is free software; you can redistribute it and/or modify it *
7        *  under the terms of the GNU General Public License as published by the   *
8        *  Free Software Foundation; either version 2 of the License, or (at your  *
9        *  option) any later version.                                              *
10        \**************************************************************************/
11
12
13        $GLOBALS['phpgw_info']['flags'] = array(
14                'noheader'   => True,
15                'nonavbar'   => True,
16                'currentapp' => 'admin'
17        );
18        include('../header.inc.php');
19
20        if ($GLOBALS['phpgw']->acl->check('info_access',1,'admin'))
21        {
22                $GLOBALS['phpgw']->redirect_link('/index.php');
23        }
24
25        ob_start();
26
27        phpinfo();
28
29        $matches = array ();
30        preg_match( '%(<style type="text/css">.*?</style>).*?<body>(.*?)</body>%s', ob_get_clean( ), $matches );
31
32        $matches[ 1 ] = preg_replace( '%body.*?{[^}]*}\n%s', '', $matches[ 1 ] );
33        $matches[ 1 ] = preg_replace( '%(\n)%s', '$1.phpinfo ', $matches[ 1 ] );
34
35        phpcredits( CREDITS_ALL - CREDITS_FULLPAGE );
36
37        $matches[ 2 ] = preg_replace( '%<a[^>]*>PHP Credits</a>%s', ob_get_clean( ), $matches[ 2 ] );
38
39        // Throw a little notice out if PHPaccelerator is enabled.
40        if($GLOBALS['_PHPA']['ENABLED'])
41        {
42                echo 'PHPaccelerator enabled:</br>'."\n";
43                echo 'PHPaccelerator Version: '.$GLOBALS['_PHPA']['VERSION'].'</br></p>'."\n";
44        }
45
46        print $matches[ 1 ] . '<div class="phpinfo">' . $matches[ 2 ] . '</div>';
47?>
Note: See TracBrowser for help on using the repository browser.