mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Credits open in the main window again ... use smarts to strip off unneeded
HTML.
This commit is contained in:
26
credits.php
26
credits.php
@@ -1,10 +1,26 @@
|
||||
<?php
|
||||
# require_once 'prepend.inc';
|
||||
# commonHeader("PHP Credits");
|
||||
require_once 'prepend.inc';
|
||||
|
||||
if (function_exists('ob_start')) {
|
||||
ob_start();
|
||||
phpcredits();
|
||||
$credits = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
# strip all but the body
|
||||
preg_match('/<body.*?>(.*)<\/body>/ims', $credits, $m );
|
||||
|
||||
# strip out any style
|
||||
$credits = preg_replace('/<style.*?>.*<\/style>/ims', '', $m[1] );
|
||||
|
||||
if ($credits) {
|
||||
commonHeader("PHP Credits", 1);
|
||||
echo $credits;
|
||||
commonFooter();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
# print "<p align=\"center\">";
|
||||
phpcredits();
|
||||
# print "</p>";
|
||||
|
||||
# commonFooter();
|
||||
?>
|
||||
|
||||
@@ -313,7 +313,7 @@ function commonFooter() {
|
||||
# the same page on the mirror, and do the same in our javascript.
|
||||
print_link('/source.php?url='.$SCRIPT_NAME, 'show source', false, 'class="small"');
|
||||
echo delim();
|
||||
print_link('/credits.php', 'credits', '_blank', 'class="small"');
|
||||
print_link('/credits.php', 'credits', false, 'class="small"');
|
||||
echo delim();
|
||||
print_link('/mirrors.php', 'mirror sites:', false, 'class="small"');
|
||||
echo " <select class=\"small\" name=\"country\" onchange=\"gotomirror(this.form)\">\n";
|
||||
|
||||
Reference in New Issue
Block a user