cvs: phpweb / credits.php

From: Date: Mon, 28 Jul 2003 09:25:51 +0000
Subject: cvs: phpweb / credits.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-19599@lists.php.net to get a copy of this message
goba Mon Jul 28 05:25:51 2003 EDT Modified files: /phpweb credits.php Log: Reformatting, adding comments, and support for base href. Index: phpweb/credits.php diff -u phpweb/credits.php:1.6 phpweb/credits.php:1.7 --- phpweb/credits.php:1.6 Sun Jul 1 13:17:52 2001 +++ phpweb/credits.php Mon Jul 28 05:25:51 2003 @@ -1,26 +1,34 @@ <?php -require_once 'prepend.inc'; +// $Id: credits.php,v 1.7 2003/07/28 09:25:51 goba Exp $ +$_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(); ?>

« previous php.mirrors (#19599) next »