1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Files
archived-web-php/credits.php
Peter Kokot e235f79473 Trim trailing whitespace
This patch cleans all redundant trailing whitespace across the
repository except for the icalendar files.
2018-10-17 10:51:08 +02:00

31 lines
744 B
PHP

<?php
$_SERVER['BASE_PAGE'] = 'credits.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
// Put credits information to $credits
ob_start();
phpcredits();
$credits = ob_get_contents();
ob_end_clean();
// Strip all but the body and drop styles
preg_match('!<body.*?>(.*)</body>!ims', $credits, $m);
$credits = preg_replace('!<style.*?>.*</style>!ims', '', $m[1]);
// Fix for PHP bug #24839,
// which affects the page layout
$credits = str_replace(
array("</center>", "& "),
array("</div>", "&amp; "),
$credits
);
// If there is something left, print it out
if ($credits) {
site_header("Credits", array("current" => "community", 'css' => array('credits.css')));
echo $credits;
site_footer();
}
?>