Changeset 521 for trunk/Common
- Timestamp:
- Apr 14, 2013, 9:04:17 PM (12 years ago)
- Location:
- trunk/Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Global.php
r518 r521 22 22 include_once(dirname(__FILE__).'/Page.php'); 23 23 include_once(dirname(__FILE__).'/Form/Form.php'); 24 include_once(dirname(__FILE__).'/../finance/bills.php');25 include_once(dirname(__FILE__).'/../finance/finance.php');26 24 include_once(dirname(__FILE__).'/../form_classes.php'); 27 25 … … 70 68 function RegisterPage($Path, $Handler) 71 69 { 72 $this->Pages[$Path] = $Handler; 70 if(is_array($Path)) 71 { 72 $Page = &$this->Pages; 73 $LastKey = array_pop($Path); 74 foreach($Path as $PathItem) 75 { 76 $Page = &$Page[$PathItem]; 77 } 78 if(!is_array($Page)) $Page = array('' => $Page); 79 $Page[$LastKey] = $Handler; 80 } else $this->Pages[$Path] = $Handler; 73 81 } 74 82 75 83 function SearchPage($PathItems, $Pages) 76 84 { 77 $PathItem = $PathItems[0]; 85 if(count($PathItems) > 0) $PathItem = $PathItems[0]; 86 else $PathItem = ''; 78 87 if(array_key_exists($PathItem, $Pages)) 79 88 { … … 86 95 } 87 96 97 function PageNotFound() 98 { 99 return('Page '.implode('/', $this->PathItems).' not found.'); 100 } 101 88 102 function ShowPage() 89 103 { … … 96 110 $Page->Database = &$this->Database; 97 111 $Page->GetOutput(); 98 } else echo( 'Page '.implode('/', $this->PathItems).' not found.');112 } else echo($this->PageNotFound()); 99 113 } 100 114 -
trunk/Common/Page.php
r519 r521 33 33 while(strpos($ScriptName, '//') !== false) 34 34 $ScriptName = str_replace('//', '/', $ScriptName); 35 if(strpos($ScriptName, '?') !== false) 36 $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '?')); 35 37 $ScriptName = substr($ScriptName, strlen($this->System->Link(''))); 36 38 if(substr($ScriptName, -1, 1) == '/') $ScriptName = substr($ScriptName, 0, -1); -
trunk/Common/Version.php
r519 r521 1 1 <?php 2 2 3 $Revision = 5 19; // Subversion revision4 $DatabaseRevision = 517; 5 $ReleaseTime = '2013-04-1 3';3 $Revision = 521; // Subversion revision 4 $DatabaseRevision = 517; // SQL structure revision 5 $ReleaseTime = '2013-04-14'; 6 6 7 7 ?>
Note:
See TracChangeset
for help on using the changeset viewer.