00001 <?php 00002 require_once TM_PATH . 'constants.php'; 00003 00014 class JuelichPageFactory { 00015 00016 var $page; 00018 function JuelichPageFactory($mode) { 00019 switch ($mode) { 00020 case M_SPECIAL: 00021 $g = getDataInstance()->getAppData('group0'); 00022 if ($g == 'teleskop') { 00023 include_once TM_PATH . 'juelich/web/JuelichPageTelAccess.php'; 00024 $this->page = new JuelichPageTelAccess; 00025 } 00026 else { 00027 include_once TM_PATH . 'juelich/web/JuelichError.php'; 00028 $error = new JuelichError; 00029 $error->printError(4, 00030 'JuelichPageFactory: ' 00031 . 'Special, unbekannt: ' 00032 . $g); 00033 exit(); 00034 } 00035 break; 00036 case M_TEXT: 00037 include_once TM_PATH . 'juelich/web/JuelichPageText.php'; 00038 $this->page = new JuelichPageText; 00039 break; 00040 case M_MODEL: 00041 include_once TM_PATH . 'juelich/web/JuelichPageModel.php'; 00042 $this->page = new JuelichPageModel; 00043 break; 00044 case M_INCLUSION: 00045 include_once TM_PATH . 'juelich/web/JuelichPageInclusion.php'; 00046 $this->page = new JuelichPageInclusion; 00047 break; 00048 case M_DETAIL2: 00049 include_once TM_PATH . 'juelich/web/JuelichPageDetail2.php'; 00050 $this->page = new JuelichPageDetail2; 00051 break; 00052 case M_LIST: 00053 include_once TM_PATH . 'juelich/web/JuelichPageList.php'; 00054 $this->page = new JuelichPageList; 00055 break; 00056 case M_DETAIL: 00057 include_once TM_PATH . 'juelich/web/JuelichPageDetail.php'; 00058 $this->page = new JuelichPageDetail; 00059 break; 00060 default: 00061 break; 00062 } 00063 return; 00064 } 00065 00072 function getPageContent() { 00073 return $this->page->getPageContent(); 00074 } 00075 00076 } 00077 ?>