xref: /web-php/credits.php (revision 59c070f5)
1<?php
2
3$_SERVER['BASE_PAGE'] = 'credits.php';
4include_once __DIR__ . '/include/prepend.inc';
5
6// Put credits information to $credits
7ob_start();
8phpcredits();
9$credits = ob_get_clean();
10
11// Strip all but the body and drop styles
12preg_match('!<body.*?>(.*)</body>!ims', $credits, $m);
13$credits = preg_replace('!<style.*?>.*</style>!ims', '', $m[1]);
14
15// Fix for PHP bug #24839,
16// which affects the page layout
17$credits = str_replace(
18    ["</center>", "& "],
19    ["</div>", "&amp; "],
20    $credits,
21);
22
23// If there is something left, print it out
24if ($credits) {
25    site_header("Credits", ["current" => "community", 'css' => ['credits.css']]);
26    echo $credits;
27    site_footer();
28}
29