1
0
mirror of https://github.com/php/web-php.git synced 2026-03-24 07:12:16 +01:00

Add credits page syles to the sitewide CSS rules, and move the credits

page to the new CSS based layout...
This commit is contained in:
Gabor Hojtsy
2003-08-07 11:12:44 +00:00
parent edc3012cf6
commit 02655718a2
2 changed files with 32 additions and 24 deletions

View File

@@ -3,32 +3,21 @@
$_SERVER['BASE_PAGE'] = 'credits.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
// Output buffering supported
if (function_exists('ob_start')) {
// Put credits information to $credits
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 and drop styles
preg_match('!<body.*?>(.*)</body>!ims', $credits, $m);
$credits = preg_replace('!<style.*?>.*</style>!ims', '', $m[1]);
// Strip out any style
$credits = preg_replace('!<style.*?>.*</style>!ims', '', $m[1]);
// If there is something left, print it out
if ($credits) {
commonHeader("Credits");
echo $credits;
commonFooter();
}
}
// No output buffer support, standard credits page
else {
phpcredits();
// If there is something left, print it out
if ($credits) {
site_header("Credits");
echo $credits;
site_footer();
}
?>

View File

@@ -111,3 +111,22 @@ h1 {
font-size: 75%;
text-decoration: none;
}
/* Credits page styles ---------------------------------------------------- */
.e {
background-color: #ccccff;
color: inherit;
font-weight: bold;
}
.h {
background-color: #9999cc;
color: inherit;
font-weight: bold;
}
.v, .vr {
background-color: #cccccc;
color: inherit;
}
.vr {
text-align: right;
}