svn: /web/php/branches/PROTOTYPE_2010/ include/layout.inc include/prepend.inc

From: Date: Sun, 26 Dec 2010 11:56:31 +0000
Subject: svn: /web/php/branches/PROTOTYPE_2010/ include/layout.inc include/prepend.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-9792@lists.php.net to get a copy of this message
bjori Sun, 26 Dec 2010 11:56:31 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306652 Log: All our existing pages include these files.. add basic skeleton of them Makes it easier to port this back to phpweb Changed paths: A web/php/branches/PROTOTYPE_2010/include/ A web/php/branches/PROTOTYPE_2010/include/layout.inc A web/php/branches/PROTOTYPE_2010/include/prepend.inc Added: web/php/branches/PROTOTYPE_2010/include/layout.inc =================================================================== --- web/php/branches/PROTOTYPE_2010/include/layout.inc (rev 0) +++ web/php/branches/PROTOTYPE_2010/include/layout.inc 2010-12-26 11:56:31 UTC (rev 306652) @@ -0,0 +1,43 @@ +<?php +$MYSITE = "/"; // Will be http://[foo.]php.net +$MY_LANG = 'en'; // Will use lang from accept header, or last saved 'preferred lang' + +function site_header($title = '', $config = array()) +{ + global $MYSITE, $MY_LANG; + global $SIDEBAR_DATA; + + if (isset($config["current"])) { + $curr = $config["current"]; + } + else { + switch($_SERVER["BASE_PAGE"]) { + case "privacy.php": + default: + $curr = ""; + break; + case "docpage.php": + $curr = "docs"; + break; + + case "mailing-lists.php": + case "sidebars.php": + case "sites.php": + case "support.php": + case "tips.php": + case "urlhowto.php": + $curr = "help"; + break; + } + } + + require __DIR__ ."/../header.php"; +} + +function site_footer($config = array()) +{ + require __DIR__ . "/../footer.php"; +} + +/* vim: set et ts=4 sw=4 ft=php: : */ + Added: web/php/branches/PROTOTYPE_2010/include/prepend.inc =================================================================== --- web/php/branches/PROTOTYPE_2010/include/prepend.inc (rev 0) +++ web/php/branches/PROTOTYPE_2010/include/prepend.inc 2010-12-26 11:56:31 UTC (rev 306652) @@ -0,0 +1,3 @@ +<?php +require __DIR__ . "/layout.inc"; +

« previous php.webmaster (#9792) next »