Changeset 473 for trunk/Common/Global.php
- Timestamp:
- Jan 1, 2013, 12:21:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r471 r473 32 32 include_once(dirname(__FILE__).'/../Modules/Network/Network.php'); 33 33 include_once(dirname(__FILE__).'/../Modules/TV/TV.php'); 34 34 include_once(dirname(__FILE__).'/../Modules/OpeningHours/OpeningHours.php'); 35 35 $PrefixMultipliers = array 36 36 ( … … 110 110 /** @var AppModuleManager */ 111 111 var $ModuleManager; 112 var $PathItems; 112 113 113 114 function __construct() … … 125 126 } 126 127 127 function ShowPage($Path) 128 function SearchPage($PathItems, $Pages) 129 { 130 $PathItem = $PathItems[0]; 131 if(array_key_exists($PathItem, $Pages)) 132 { 133 if(is_array($Pages[$PathItem])) 134 { 135 array_shift($PathItems); 136 return(SearchPage($PathItems, $Path[$PathItem])); 137 } else return($this->Pages[$PathItem]); 138 } else return(''); 139 } 140 141 function ShowPage() 128 142 { 129 143 /* @var $Page Page */ 130 if(array_key_exists($Path, $this->Pages))131 {132 $ClassName = $this->Pages[$Path];144 $ClassName = $this->SearchPage($this->PathItems, $this->Pages); 145 if($ClassName != '') 146 { 133 147 $Page = new $ClassName(); 134 148 $Page->System = &$this; 135 149 $Page->Database = &$this->Database; 136 150 $Page->GetOutput(); 137 } else echo('Page '. $Path.' not found.');151 } else echo('Page '.implode('/', $this->PathItems).' not found.'); 138 152 } 139 153 … … 283 297 $System->ModuleManager->RegisterModule(new Network($System)); 284 298 $System->ModuleManager->RegisterModule(new TV($System)); 299 $System->ModuleManager->RegisterModule(new ModuleOpeningHours($System)); 285 300 $System->ModuleManager->StartAll(); 286 301 }
Note:
See TracChangeset
for help on using the changeset viewer.