Changeset 470
- Timestamp:
- Dec 30, 2012, 9:40:35 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 15 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r469 r470 26 26 include_once(dirname(__FILE__).'/../finance/finance.php'); 27 27 28 // Application modules 28 29 include_once(dirname(__FILE__).'/../Modules/Meteostation/Meteostation.php'); 29 30 include_once(dirname(__FILE__).'/../Modules/Portal/Portal.php'); 31 include_once(dirname(__FILE__).'/../Modules/IS/IS.php'); 32 include_once(dirname(__FILE__).'/../Modules/Network/Network.php'); 30 33 31 34 $PrefixMultipliers = array … … 124 127 { 125 128 /* @var $Page Page */ 126 $ClassName = $this->Pages[$Path]; 127 $Page = new $ClassName(); 128 $Page->System = &$this; 129 $Page->Database = &$this->Database; 130 $Page->GetOutput(); 129 if(array_key_exists($Path, $this->Pages)) 130 { 131 $ClassName = $this->Pages[$Path]; 132 $Page = new $ClassName(); 133 $Page->System = &$this; 134 $Page->Database = &$this->Database; 135 $Page->GetOutput(); 136 } else echo('Page '.$Path.' not found.'); 131 137 } 132 138 … … 273 279 $System->ModuleManager->RegisterModule(new Meteostation($System)); 274 280 $System->ModuleManager->RegisterModule(new Portal($System)); 281 $System->ModuleManager->RegisterModule(new IS($System)); 282 $System->ModuleManager->RegisterModule(new Network($System)); 275 283 $System->ModuleManager->StartAll(); 276 284 } … … 592 600 } 593 601 602 function ProcessURL() 603 { 604 if(array_key_exists('REDIRECT_QUERY_STRING', $_SERVER)) 605 $PathString = $_SERVER['REDIRECT_QUERY_STRING']; 606 else $PathString = ''; 607 if(substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1); 608 //echo('"'.$QueryString.'"'); 609 $PathItems = explode('/', $PathString); 610 if(strpos($_SERVER['REQUEST_URI'], '?') !== false) 611 $_SERVER['QUERY_STRING'] = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1); 612 else $_SERVER['QUERY_STRING'] = ''; 613 parse_str($_SERVER['QUERY_STRING'], $_GET); 614 return($PathItems); 615 } 616 594 617 GlobalInit(); 595 618 -
trunk/Modules/Meteostation/Meteostation.php
r469 r470 2 2 3 3 include_once('Common/Image.php'); 4 include_once('Common/Global.php'); 4 5 5 6 class PageMeteo extends Page -
trunk/index.php
r469 r470 2 2 3 3 include_once('Common/Global.php'); 4 $System->ShowPage(''); 4 $Path = ProcessURL(); 5 $System->ShowPage(implode('/', $Path)); 5 6 6 7 ?>
Note:
See TracChangeset
for help on using the changeset viewer.