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();
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user