Changeset 349 for trunk/index.php
- Timestamp:
- Jan 18, 2012, 7:16:43 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r348 r349 304 304 } 305 305 306 if(array_key_exists('page', $_GET)) 306 function ProcessURL() 307 { 308 $QueryString = $_SERVER['QUERY_STRING']; 309 if(substr($QueryString, -1, 1) == '/') $QueryString = substr($QueryString, 0, -1); 310 //echo('"'.$QueryString.'"'); 311 $PathItems = explode('/', $QueryString); 312 if(strpos($_SERVER['REQUEST_URI'], '?') !== false) 313 $_SERVER['QUERY_STRING'] = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1); 314 else $_SERVER['QUERY_STRING'] = ''; 315 parse_str($_SERVER['QUERY_STRING'], $_GET); 316 return($PathItems); 317 } 318 319 $System->PathItems = ProcessURL(); 320 //print_r($_GET); 321 //print_r($System->PathItems); 322 323 if($System->PathItems[0] != '') 307 324 { 308 $Page = $ _GET['page'];309 if(substr($Page, -1) == '/') $Page = substr($Page, 0, -1);325 $Page = $System->PathItems[0]; 326 //if(substr($Page, -1) == '/') $Page = substr($Page, 0, -1); 310 327 //print_r($System->Pages); 311 328 if(array_key_exists($Page, $System->Pages)) … … 316 333 $PageObject->System = &$System; 317 334 $PageObject->GetOutput(); 318 } else echo( 'Stránka nenalezena');335 } else echo(PAGE_NOT_FOUND); 319 336 } else 320 337 {
Note:
See TracChangeset
for help on using the changeset viewer.