Changeset 470 for trunk


Ignore:
Timestamp:
Dec 30, 2012, 9:40:35 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Vytvořen modul Network a přesunuto do něj zobrazení topologie a seznamu zařízení.
  • Upraveno: IS přetvořen na modul.
Location:
trunk
Files:
15 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Global.php

    r469 r470  
    2626include_once(dirname(__FILE__).'/../finance/finance.php');
    2727 
     28// Application modules
    2829include_once(dirname(__FILE__).'/../Modules/Meteostation/Meteostation.php');
    2930include_once(dirname(__FILE__).'/../Modules/Portal/Portal.php');
     31include_once(dirname(__FILE__).'/../Modules/IS/IS.php');
     32include_once(dirname(__FILE__).'/../Modules/Network/Network.php');
    3033
    3134$PrefixMultipliers = array
     
    124127  {
    125128    /* @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.');
    131137  }
    132138 
     
    273279  $System->ModuleManager->RegisterModule(new Meteostation($System));
    274280  $System->ModuleManager->RegisterModule(new Portal($System));
     281  $System->ModuleManager->RegisterModule(new IS($System));
     282  $System->ModuleManager->RegisterModule(new Network($System));
    275283  $System->ModuleManager->StartAll();
    276284}
     
    592600}
    593601
     602function 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
    594617GlobalInit();
    595618
  • trunk/Modules/Meteostation/Meteostation.php

    r469 r470  
    22
    33include_once('Common/Image.php');
     4include_once('Common/Global.php');
    45
    56class PageMeteo extends Page
  • trunk/index.php

    r469 r470  
    22
    33include_once('Common/Global.php');
    4 $System->ShowPage('');
     4$Path = ProcessURL();
     5$System->ShowPage(implode('/', $Path));
    56
    67?>
Note: See TracChangeset for help on using the changeset viewer.