<?php | |
# This is the bootstrap file that must be included in every PHP page | |
# in the BPEL project website. | |
# require_once($_SERVER['DOCUMENT_ROOT'] . "/bpel/_boot.php"); | |
# | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); | |
$movieHost="http://localhost/"; | |
# Comment this actual download host below if you want to do testing on localhost | |
# Make sure you don't check in a broken URL. | |
$movieHost="http://download.eclipse.org/technology/bpel/"; | |
$App = new App(); | |
$Nav = new Nav(); | |
$Menu = new Menu(); | |
$projectInfo = null; | |
$projectShortName = "bpel"; | |
function _require ( $location ) { | |
require_once($_SERVER['DOCUMENT_ROOT'] . $location); | |
} | |
/** | |
* bpel_get_project_info() loads the project info page, but only for pages that really want it. | |
* It sets the global symbol $projectInfo after it has done that. | |
*/ | |
function bpel_get_project_info () { | |
global $projectInfo; | |
_require("/projects/common/project-info.class.php"); | |
return ( $projectInfo = new ProjectInfo("technology.bpel") ); | |
} | |
/** | |
* When writing templates in PHP, always end with this at the very end. | |
* | |
* This will cause the actual page to be generated. | |
*/ | |
function bpel_generate_page () { | |
global $App,$Menu,$theme,$Nav,$pageAuthor; | |
global $pageKeywords, $pageTitle; | |
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, | |
ob_get_clean() ); | |
ob_flush(); | |
} | |
function bpel_add_html_header($file) { | |
global $App,$projectShortName; | |
$file = $_SERVER['DOCUMENT_ROOT'] . "/" . $projectShortName . "/" . $file; | |
if (file_exists($file)) { | |
ob_start(); | |
include $file; | |
$App->AddExtraHtmlHeader (ob_get_clean() ); | |
} | |
} | |
bpel_add_html_header("style/main.php"); | |
bpel_add_html_header("js/main.php"); | |
require_once( $App->getProjectCommon() ); | |
?> |