Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VMSone
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Designerscripte
VMSone
Commits
7c5ec6f7
Commit
7c5ec6f7
authored
5 years ago
by
Joel Kuder
Browse files
Options
Downloads
Patches
Plain Diff
remove phpinfo styles
parent
14f2a778
1 merge request
!46
Release 3.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
adminforce/content/phpinfo.php
+30
-21
30 additions, 21 deletions
adminforce/content/phpinfo.php
with
30 additions
and
21 deletions
adminforce/content/phpinfo.php
+
30
−
21
View file @
7c5ec6f7
<?php
ob_start
();
phpinfo
();
preg_match
(
'%<style type="text/css">(.*?)</style>.*?(<body>.*</body>)%s'
,
ob_get_clean
(),
$matches
);
# $matches [1]; # Style information
# $matches [2]; # Body information
echo
"<div class='phpinfodisplay' style='width:600px;'><style type='text/css'>
\n
"
,
join
(
"
\n
"
,
array_map
(
create_function
(
'$i'
,
'return ".phpinfodisplay " . preg_replace( "/,/", ",.phpinfodisplay ", $i );'
),
preg_split
(
'/\n/'
,
$matches
[
1
]
)
)
),
"</style>
\n
"
,
$matches
[
2
],
"
\n
</div>
\n
"
;
\ No newline at end of file
ob_start
();
phpinfo
();
$phpinfo
=
ob_get_contents
();
ob_end_clean
();
$phpinfo
=
preg_replace
(
'%^.*<body>(.*)</body>.*$%ms'
,
'$1'
,
$phpinfo
);
echo
"
<style type='text/css'>
#phpinfo {}
#phpinfo pre {margin: 0; font-family: monospace;}
#phpinfo a:link {color: #009; text-decoration: none; background-color: #fff;}
#phpinfo a:hover {text-decoration: underline;}
#phpinfo table {border-collapse: collapse; border: 0; width: 934px; box-shadow: 1px 2px 3px #ccc;}
#phpinfo .center {text-align: center;}
#phpinfo .center table {margin: 1em auto; text-align: left;}
#phpinfo .center th {text-align: center !important;}
#phpinfo td, th {border: 1px solid #666; font-size: 100%; vertical-align: baseline; padding: 4px 5px;}
#phpinfo h1 {font-size: 150%;}
#phpinfo h2 {font-size: 125%;}
#phpinfo .p {text-align: left;}
#phpinfo .e {background-color: #ccf; width: 300px; font-weight: bold;}
#phpinfo .h {background-color: #99c; font-weight: bold;}
#phpinfo .v {background-color: #ddd; max-width: 300px; overflow-x: auto; word-wrap: break-word;}
#phpinfo .v i {color: #999;}
#phpinfo img {float: right; border: 0;}
#phpinfo hr {width: 934px; background-color: #ccc; border: 0; height: 1px;}
#phpinfo td, #phpinfo tr, #phpinfo h1, #phpinfo a
{
color:#000000
}
</style>
<div id='phpinfo'>
"
.
$phpinfo
.
"
</div>"
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment