forked from coppermine-gallery/cpg1.6.x
-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpinfo.php
60 lines (49 loc) · 1.94 KB
/
phpinfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2016 Coppermine Dev Team
v1.0 originally written by Gregory Demar
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation.
********************************************
Coppermine version: 1.6.01
$HeadURL$
**********************************************/
error_reporting (E_ALL ^ E_NOTICE);
define('IN_COPPERMINE', true);
define('PHPINFO_PHP', true);
require('include/init.inc.php');
$CONFIG['debug_mode']=0;
if (!GALLERY_ADMIN_MODE) {
cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
}
pageheader($lang_cpg_debug_output['phpinfo']);
ob_start();
phpinfo();
preg_match('#<body>(.*)</body>#s', ob_get_clean(), $matches);
$string = $matches[1];
$string = str_replace(' class="p"','',$string);
$string = str_replace(' class="e"','',$string);
$string = str_replace(' class="v"','',$string);
$string = str_replace(' class="h"',' class="tableh2"',$string);
$string = str_replace(' class="center"','',$string);
$string = str_replace(' width="600"','',$string);
$string = str_replace(' cellpadding="3"','',$string);
$string = str_replace('<table border="0"','<table',$string);
$string = str_replace('<table>','<table border="0" cellspacing="0" cellpadding="0" class="cpg_zebra" style="table-layout:fixed;width:100%">',$string);
$string = str_replace('<td>','<td style="text-align:left;vertical-align:top">',$string);
print '<div align="left" style="overflow:hidden;width:100%;text-align:left;">';
starttable('100%', cpg_fetch_icon('phpinfo', 2) . $lang_phpinfo_php['php_info'], 1);
print '<tr><td class="tableb">';
print $lang_phpinfo_php['explanation'];
print '<br />';
print $lang_phpinfo_php['no_link'];
print '</td></tr>';
endtable();
print '<br />';
print $string;
print '</div>' . $LINEBREAK;
pagefooter();
//EOF