cvs: phpweb / credits.php /include layout.inc
| From: | Colin Viebrock | Date: | Fri, 09 Mar 2001 19:47:44 +0000 |
| Subject: | cvs: phpweb / credits.php /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-4346@lists.php.net to get a copy of this message | ||
cmv Fri Mar 9 11:47:44 2001 EDT
Modified files:
/phpweb credits.php
/phpweb/include layout.inc
Log:
Credits open in the main window again ... use smarts to strip off unneeded
HTML.
Index: phpweb/credits.php
diff -u phpweb/credits.php:1.4 phpweb/credits.php:1.5
--- phpweb/credits.php:1.4 Thu Mar 8 20:38:54 2001
+++ phpweb/credits.php Fri Mar 9 11:47:43 2001
@@ -1,10 +1,26 @@
<?php
-# require_once 'prepend.inc';
-# commonHeader("PHP Credits");
+require_once 'prepend.inc';
-# print "<p align=\"center\">";
+if (function_exists('ob_start')) {
+ ob_start();
+ phpcredits();
+ $credits = ob_get_contents();
+ ob_end_clean();
+
+ # strip all but the body
+ preg_match('/<body.*?>(.*)<\/body>/ims', $credits, $m );
+
+ # strip out any style
+ $credits = preg_replace('/<style.*?>.*<\/style>/ims', '', $m[1] );
+
+ if ($credits) {
+ commonHeader("PHP Credits", 1);
+ echo $credits;
+ commonFooter();
+ exit;
+ }
+}
+
phpcredits();
-# print "</p>";
-# commonFooter();
?>
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.12 phpweb/include/layout.inc:1.13
--- phpweb/include/layout.inc:1.12 Thu Mar 8 20:38:54 2001
+++ phpweb/include/layout.inc Fri Mar 9 11:47:44 2001
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.12 2001/03/09 04:38:54 cmv Exp $ */
+/* $Id: layout.inc,v 1.13 2001/03/09 19:47:44 cmv Exp $ */
# spacer()
@@ -313,7 +313,7 @@
# the same page on the mirror, and do the same in our javascript.
print_link('/source.php?url='.$SCRIPT_NAME, 'show source', false,
'class="small"');
echo delim();
- print_link('/credits.php', 'credits', '_blank',
'class="small"');
+ print_link('/credits.php', 'credits', false,
'class="small"');
echo delim();
print_link('/mirrors.php', 'mirror sites:', false,
'class="small"');
echo " <select class=\"small\" name=\"country\"
onchange=\"gotomirror(this.form)\">\n";