Created
November 5, 2010 12:51
-
-
Save sotarok/664090 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
*/ | |
include '__header.php'; | |
?> | |
<script type="text/javascript" src="http://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("jquery", "1.3"); | |
</script> | |
<script type="text/javascript"> | |
jQuery.easing.quart = function (x, t, b, c, d) { | |
return -c * ((t=t/d-1)*t*t*t - 1) + b; | |
}; | |
jQuery(document).ready(function(){ | |
// | |
// <a href="#***">の場合、スクロール処理を追加 | |
// | |
jQuery('a[href*=#]').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var $target = jQuery(this.hash); | |
$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']'); | |
if ($target.length) { | |
var targetOffset = $target.offset().top; | |
jQuery('html,body').animate({ scrollTop: targetOffset }, 800, 'quart'); | |
return false; | |
} | |
} | |
}); | |
}); | |
</script> | |
<style type="text/css"> | |
#phpinfo { | |
padding: 40px 0; | |
margin: 0 auto; | |
} | |
#phpinfo pre {margin: 0px; font-family: Menlo, Monaco, monospace;} | |
#phpinfo table {border-collapse: collapse;} | |
#phpinfo .center {text-align: center;} | |
#phpinfo .center table { margin-left: auto; margin-right: auto; text-align: left;} | |
#phpinfo .center th { text-align: center !important; } | |
#phpinfo td, | |
#phpinfo th { | |
border: 1px solid #000000; | |
font-size: 75%; | |
vertical-align: baseline; | |
} | |
#phpinfo h1 {font-size: 150%;} | |
#phpinfo h2 {font-size: 125%;} | |
#phpinfo .p {text-align: left;} | |
#phpinfo .e { | |
background-color: #b4ada9; | |
font-weight: bold; color: #000000; | |
padding: 10px; | |
line-height: 150%; | |
} | |
#phpinfo .h { | |
font-weight: bold; | |
color: #000000; | |
} | |
#phpinfo .h td { | |
padding: 20px; | |
border: solid 1px #ccc; | |
background: -moz-linear-gradient(top, #fdfdfd, #ececec); | |
background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#ececec)); | |
} | |
#phpinfo .v { | |
background-color: #eeeaec; | |
color: #000000; | |
padding: 10px; | |
line-height: 150%; | |
} | |
#phpinfo .vr { | |
padding: 5px; | |
background-color: #eeeaec; | |
text-align: right; color: #000000; | |
} | |
#phpinfo img {float: right; border: 0px;} | |
#phpinfo hr { | |
width: 600px; | |
background-color: #cccccc; | |
border: 0px; height: 1px; | |
color: #000000; | |
} | |
#phpinfo-toc { | |
position: fixed; | |
top: 0; | |
right: 0; | |
background: #fcfcfc; | |
filter:alpha(opacity=50); | |
opacity:0.5; | |
margin: 5px; | |
padding: 0; | |
width: 220px; | |
border: solid 1px #ccc; | |
} | |
#phpinfo-toc li { | |
margin: 0; | |
float: left; | |
list-style: none; | |
padding: 2px 5px; | |
color: #000; | |
} | |
#phpinfo-toc li a { | |
opacity: 1.0; | |
color: #000; | |
} | |
#phpinfo-toc li:last-child { | |
clear: both; | |
} | |
</style> | |
<?php | |
ob_start(); | |
phpinfo(); | |
$c = ob_get_clean(); | |
$c = str_replace('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> | |
<html><head> | |
<style type="text/css"> | |
body {background-color: #ffffff; color: #000000;} | |
body, td, th, h1, h2 {font-family: sans-serif;} | |
pre {margin: 0px; font-family: monospace;} | |
a:link {color: #000099; text-decoration: none; background-color: #ffffff;} | |
a:hover {text-decoration: underline;} | |
table {border-collapse: collapse;} | |
.center {text-align: center;} | |
.center table { margin-left: auto; margin-right: auto; text-align: left;} | |
.center th { text-align: center !important; } | |
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;} | |
h1 {font-size: 150%;} | |
h2 {font-size: 125%;} | |
.p {text-align: left;} | |
.e {background-color: #ccccff; font-weight: bold; color: #000000;} | |
.h {background-color: #9999cc; font-weight: bold; color: #000000;} | |
.v {background-color: #cccccc; color: #000000;} | |
.vr {background-color: #cccccc; text-align: right; color: #000000;} | |
img {float: right; border: 0px;} | |
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;} | |
</style> | |
<title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,FOLLOW,NOARCHIVE" /></head> | |
<body>', '', $c); | |
$c = str_replace('</body></html>', '', $c); | |
$c = str_replace('<h2>Environment</h2>', '<h2 id="phpinfo-environment">Environment</h2>', $c); | |
$c = str_replace('<h2>PHP Variables</h2>', '<h2 id="phpinfo-php-variables">PHP Variables</h2>', $c); | |
//echo preg_replace('@-@', '', $c); | |
?> | |
<ul id="phpinfo-toc"> | |
<li style="display: block; width: 200px;"><a href="#frame">* Top</a></li> | |
<?php | |
if (preg_match_all('/a name="(module_.+)"/', $c, $match)) : | |
foreach ($match[1] as $m) : | |
?> | |
<li><a href="#<?php echo $m ?>"><?php echo str_replace('module_', '', $m); ?></a></li> | |
<?php | |
endforeach; | |
endif; | |
?> | |
<li style="display: block; width: 200px;"><a href="#phpinfo-environment">* Environment </a></li> | |
<li style="display: block; width: 200px;"><a href="#phpinfo-php-variables">* PHP Variables</a></li> | |
<li style="clear: both;"></li> | |
</ul> | |
<div id="phpinfo"> | |
<?php | |
echo $c; | |
?> | |
</div> | |
<?php | |
include '__footer.php'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment