1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Reformatting, adding comments, and support for

base href.
This commit is contained in:
Gabor Hojtsy
2003-07-28 09:25:51 +00:00
parent b63886576d
commit 3d8273c020

View File

@@ -1,26 +1,34 @@
<?php
require_once 'prepend.inc';
// $Id$
$_SERVER['BASE_PAGE'] = 'credits.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
// Output buffering supported
if (function_exists('ob_start')) {
ob_start();
phpcredits();
$credits = ob_get_contents();
ob_end_clean();
// Put credits information to $credits
ob_start();
phpcredits();
$credits = ob_get_contents();
ob_end_clean();
// strip all but the body
preg_match ('/<body.*?>(.*)<\/body>/ims', $credits, $m);
// Strip all but the body
preg_match('!<body.*?>(.*)</body>!ims', $credits, $m);
// strip out any style
$credits = preg_replace('/<style.*?>.*<\/style>/ims', '', $m[1]);
// Strip out any style
$credits = preg_replace('!<style.*?>.*</style>!ims', '', $m[1]);
if ($credits) {
commonHeader("PHP Credits", 1);
echo $credits;
commonFooter();
exit;
}
// If there is something left, print it out
if ($credits) {
commonHeader("Credits");
echo $credits;
commonFooter();
}
}
// No output buffer support, standard credits page
else {
phpcredits();
}
phpcredits();
?>