Changeset 469


Ignore:
Timestamp:
Dec 30, 2012, 9:13:55 PM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Hlavní stránka přetvořena jako aplikační modul.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/AppModule.php

    r467 r469  
    1818  /** @var ModularSystem */
    1919  var $Manager;
     20  var $OnChange;
    2021 
    21   function __construct($Database, $System)
     22  function __construct($System)
    2223  {
    2324    $this->System = &$System;
    24     $this->Database = &$Database;
     25    $this->Database = &$System->Database;
    2526  }
    2627 
     
    3940  function Stop()
    4041  {
     42  }
     43}
     44
     45class AppModuleManager
     46{
     47  var $Modules;
     48 
     49  function __construct()
     50  {
     51    $this->Modules = array();     
    4152  }
    4253 
     54  function StartAll()
     55  {
     56    foreach($this->Modules as $Index => $Module)
     57    {
     58      //DebugLog('Init module '.$Module->Name);
     59      $this->Modules[$Index]->Start();
     60    }
     61  }
     62
     63  function StopAll()
     64  {
     65    foreach($this->Modules as $Index => $Module)
     66    {
     67      //DebugLog('Init module '.$Module->Name);
     68      $this->Modules[$Index]->Stop();
     69    }
     70  }
     71 
     72  function ModulePresent($Name)
     73  {
     74    return(array_key_exists($Name, $this->Modules));
     75  }
     76 
     77  function RegisterModule(AppModule $Module)
     78  {
     79    $this->Modules[$Module->Name] = &$Module; 
     80    $Module->Manager = &$this;
     81    $Module->OnChange = &$this->OnModuleChange;
     82  }
     83 
     84  function UnregisterModule($Module)
     85  {
     86    unset($this->Modules[array_search($Module, $this->Modules)]); 
     87  }
    4388}
    4489
  • trunk/Common/Error.php

    r445 r469  
    5757        foreach($Item['args'] as $Item)
    5858        {
    59           if(is_array($Item)) $Arguments .= "'".serialize($Item)."',";
     59          if(is_array($Item) || is_object($Item)) $Arguments .= "'".serialize($Item)."',";
    6060          else $Arguments .= "'".$Item."',";
    6161        }
  • trunk/Common/Global.php

    r463 r469  
    22
    33$ConfigFileName = dirname(__FILE__).'/../config.php';
     4/* @var $System System */
     5$System = NULL;
     6/* @var $Database Database */
     7$Database = NULL;
    48     
    59if(file_exists($ConfigFileName)) include_once($ConfigFileName);
     
    2327 
    2428include_once(dirname(__FILE__).'/../Modules/Meteostation/Meteostation.php');
     29include_once(dirname(__FILE__).'/../Modules/Portal/Portal.php');
    2530
    2631$PrefixMultipliers = array
     
    95100class System extends Module
    96101{
    97   var $Modules = array();
     102  var $Modules;
    98103  /** @var Type */
    99104  var $Type;
     105  var $Pages;
     106  /** @var AppModuleManager */
     107  var $ModuleManager;
    100108
    101109  function __construct()
    102110  {
    103111    parent::__construct();
     112    $this->Modules = array();
    104113    $this->Type = new Type($this);
     114    $this->Pages = array();
     115    $this->ModuleManager = new AppModuleManager();
     116  } 
     117 
     118  function RegisterPage($Path, $Handler)
     119  {
     120    $this->Pages[$Path] = $Handler;
     121  }
     122 
     123  function ShowPage($Path)
     124  {
     125    /* @var $Page Page */
     126    $ClassName = $this->Pages[$Path];
     127    $Page = new $ClassName();
     128    $Page->System = &$this;
     129    $Page->Database = &$this->Database;
     130    $Page->GetOutput();
    105131  }
    106132 
     
    209235   
    210236    return($Config['Web']['RootFolder'].$Target);
    211   }
     237  }  
    212238}
    213239
     
    243269  $System->AddModule(new Finance());
    244270  $System->Modules['Finance']->LoadMonthParameters(0);
     271 
     272  // Register new modules
     273  $System->ModuleManager->RegisterModule(new Meteostation($System));
     274  $System->ModuleManager->RegisterModule(new Portal($System));
     275  $System->ModuleManager->StartAll();
    245276}
    246277
  • trunk/Modules/Meteostation/Meteostation.php

    r468 r469  
    11<?php
    22
    3 include_once('../../Common/Image.php');
     3include_once('Common/Image.php');
    44
    55class PageMeteo extends Page
    66{
     7  var $FullTitle = 'Stav meteostanice';
     8  var $ShortTitle = 'Meteostanice';
     9
    710  function Show()
    811  {
     
    1518  var $Data;
    1619 
    17   function __construct($Database, $System)
     20  function __construct($System)
    1821  {
    19     parent::__construct($Database, $System);
     22    parent::__construct($System);
    2023    $this->Name = 'MeteoStation';
    2124    $this->Version = '1.0';
     
    8891  {
    8992    parent::Start();
    90     $this->System->RegisterPage('meteo', MeteoPage);
     93    $this->System->RegisterPage('meteo', 'PageMeteo');
    9194  } 
    9295 
  • trunk/Readme.txt

    r332 r469  
    55
    66  Zkopírovat soubor config.sample.php na config.php a vyplnit údaje.
    7   Zkopírovat soubor forum/config.sample.php na forum/config.php a vyplnit údaje.
    87
    98
  • trunk/index.php

    r454 r469  
    22
    33include_once('Common/Global.php');
    4 
    5 class IndexPage extends Page
    6 {
    7   var $Dependencies = array('News');
    8   var $FullTitle = 'Zděchovský rozcestník';
    9   var $ShortTitle = '';
    10  
    11   function ShowLinks($HyperlinkGroup)
    12   {
    13     $Output = '';
    14     $DbResult = $this->Database->query('SELECT * FROM `Hyperlink` WHERE (`Group`='.$HyperlinkGroup['Id'].') AND (`Enable` = 1)');
    15     while($HyperLink = $DbResult->fetch_assoc())
    16     {
    17       if($HyperLink['IconFile'] == '') $HyperLink['IconFile'] = 'clear.png';
    18         if(substr($HyperLink['URL'], 0, 4) != 'http') $HyperLink['URL'] = $this->System->Config['Web']['RootFolder'].$HyperLink['URL'];
    19         if(($HyperLink['PermissionModule'] == '') or (($HyperLink['PermissionModule'] != '') and $this->System->Modules['User']->Models['User']->CheckPermission($HyperLink['PermissionModule'], $HyperLink['PermissionOperation'])))       
    20         $Output .= '<img alt="'.$HyperLink['Name'].'" src="images/favicons/'.$HyperLink['IconFile'].'" width="16" height="16" /> <a href="'.$HyperLink['URL'].'">'.$HyperLink['Name'].'</a><br />';
    21     }
    22     return($this->Panel($HyperlinkGroup['Name'], $Output));
    23   }
    24 
    25   function InfoBar()
    26   {
    27     global $Config;
    28    
    29     $this->Database->select_db($Config['Database']['Database']);
    30 
    31     $Output2 = '';
    32 
    33     $DbResult = $this->Database->query('SELECT COUNT(*) FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDeviceType.ShowOnline = 1');
    34     $DbRow = $DbResult->fetch_array();
    35     $TotalComputers = $DbRow[0];
    36 
    37     $DbResult = $this->Database->query('SELECT COUNT(*) FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE (NetworkDeviceType.ShowOnline = 1) AND (NetworkDevice.Online = 1)');
    38     $DbRow = $DbResult->fetch_array();   
    39     $OnlineComputers = $DbRow[0];
    40 
    41     $Output = '<img alt="" src="images/favicons/comp.png" width="16" height="16" /> '.$OnlineComputers.' / '.$TotalComputers.' &nbsp;  &nbsp; ';
    42 
    43     $DbResult = $this->Database->select('Member', 'COUNT(*)', 'MemberState=0');
    44     $DbRow = $DbResult->fetch_array();
    45     $TotalUser = $DbRow[0];
    46 
    47     $DbResult = $this->Database->query('SELECT COUNT(DISTINCT(Member)) FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDeviceType.ShowOnline = 1 AND NetworkDevice.Online = 1');
    48     $DbRow = $DbResult->fetch_array();
    49     $OnlineUser = $DbRow[0];
    50 
    51     $Output .= '<img alt="" src="images/favicons/house.png" width="16" height="16" /> '.$OnlineUser.' / '.$TotalUser.' &nbsp;  &nbsp; ';
    52 
    53     $NetworkUsage = 0;
    54     $Output .= '<img alt="" src="images/favicons/usage.png" width="16" height="16" /> '.$NetworkUsage.' % &nbsp;  &nbsp; ';
    55 
    56     //$Output .= 'Server běží: '.$this->GetServerUptime().' &nbsp;  &nbsp; ';
    57 
    58     if($this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState'))
    59     {
    60       $DbResult = $this->Database->select('MemberPayment', 'Cash', 'Member=(SELECT Customer FROM UserCustomerRel WHERE Id='.$this->System->Modules['User']->User['Id'].')');
    61       if($DbResult->num_rows > 0)
    62       {
    63         $DbRow = $DbResult->fetch_assoc();
    64         $Output2 .= ' &nbsp;  &nbsp; <img alt="" src="images/favicons/money.png" width="16" height="16" /> '.$DbRow['Cash'].' Kč';
    65       }
    66     }
    67 
    68     $Output = '<div class="Navigation"><span class="MenuItem">'.$Output.'</span><div class="MenuItem2">&nbsp;'.$Output2.'</div></div>';
    69     return($Output);
    70   }
    71 
    72   function UserPanel()
    73   {
    74     $Output = '<a href="'.$this->System->Config['Web']['RootFolder'].'/?Action=UserOptions">Profil</a><br />';
    75     if($this->System->Modules['User']->CheckPermission('Finance', 'MemberOptions'))
    76       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'?Action=MemberOptions">Domácnost</a><br />';
    77     if($this->System->Modules['User']->CheckPermission('Finance', 'DisplaySubjectState'))
    78       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/user_state.php">Finance</a><br />';
    79     if($this->System->Modules['User']->CheckPermission('Network', 'RegistredHostList'))
    80       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/user_hosts.php">Počítače</a><br />';
    81     if($this->System->Modules['User']->CheckPermission('News', 'Insert'))
    82       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/?action=add">Vložení aktuality</a><br />';
    83     if($this->System->Modules['User']->CheckPermission('EatingPlace', 'Edit'))
    84       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/jidelna/menuedit.php">Editace jídelníčků</a><br />';
    85     if($this->System->Modules['User']->CheckPermission('Finance', 'Manage'))
    86       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/manage.php">Správa financí</a><br />';
    87     if($this->System->Modules['User']->CheckPermission('Network', 'Administration'))
    88       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/administration.php">Správa sítě</a><br />';
    89     if($this->System->Modules['User']->CheckPermission('IS', 'Manage'))
    90       $Output .= '<a href="'.$this->System->Link('/is/').'">Správa dat</a><br />';
    91     return($Output);
    92   }
    93 
    94   function WebcamPanel()
    95   {
    96     $Output = $this->System->Modules['Webcam']->ShowImage();
    97     return($Output);
    98   }
    99 
    100   function OnlineHostList()
    101   {
    102     $Output = '<span style="font-size: smaller;">';
    103     $DbResult = $this->Database->query('SELECT NetworkDevice.Name FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE (NetworkDeviceType.ShowOnline = 1) AND (NetworkDevice.Online = 1) ORDER BY NetworkDevice.Name');
    104     while($Device = $DbResult->fetch_array())
    105     {
    106       $Output .= $Device['Name'].'<br />';
    107     }
    108     $Output .= '</span>';
    109     return($Output);
    110   }
    111 
    112   function ShowBadPayerList()
    113   {
    114     $Output .= '<div class="PanelTitle">Dlužníci:</div><span style="font-size: smaller;">';
    115     $DbResult = $Database->select('Subject', 'Name', 'Money < 0 ORDER BY Money');
    116     while($Row = $DbResult->fetch_array())
    117     {
    118       $Output .= $Row['Name'].'<br />';
    119     }
    120     $Output .= '</span>';
    121     return($Output);
    122   }
    123    
    124   function Panel($Title, $Content, $Menu = array())
    125   {
    126     if(count($Menu) > 0)
    127       foreach($Menu as $Item)
    128         $Title .= '<div class="Action">'.$Item.'</div>';
    129     return('<div class="Panel"><div class="Title">'.$Title.'</div><div class="Content">'.$Content.'</div></div>');
    130   }
    131 
    132   function Show()
    133   {
    134     global $Database, $Config, $User;
    135 
    136     $Output = '';
    137     if(array_key_exists('Action', $_GET))
    138     {
    139       if($_GET['Action'] == 'CustomizeNewsSave')
    140       {
    141         $Output .= $this->System->Modules['News']->CustomizeSave();
    142       } else
    143       if($_GET['Action'] == 'LoginForm')
    144       {
    145         $Form = new Form('UserLogin');
    146         $Form->OnSubmit = '?Action=Login';
    147         $Output .= $Form->ShowEditForm();
    148         $Output .= '<div class="Centred"><a href="?Action=UserRegister">Registrovat se</a> '.
    149         '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
    150       } else
    151       if($_GET['Action'] == 'Login')
    152       {
    153         $Form = new Form('UserLogin');
    154         $Form->OnSubmit = '?Action=Login';
    155         $Result = $this->System->Modules['User']->Login($_POST['Username'], $_POST['Password']);
    156         $Output .= $this->SystemMessage('Přihlášení', $Result);
    157         if($Result <> USER_LOGGED_IN)
    158         {
    159           $Form->LoadValuesFromForm();
    160           $Form->Values['Password'] = '';
    161           $Output .= $Form->ShowEditForm();
    162           $Output .= '<div class="Centred"><a href="?Action=UserRegister">Registrovat se</a> '.
    163             '<a href="?Action=PasswordRecovery">Obnova zapomenutého hesla</a></div>';
    164         }
    165       } else
    166       if($_GET['Action'] == 'Logout')
    167       {
    168         $Output .= $this->SystemMessage('Odhlášení', $this->System->Modules['User']->Logout());
    169       } else
    170       if($_GET['Action'] == 'UserOptions')
    171       {
    172         $UserOptions = new Form('UserOptions');
    173         $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']);
    174         $UserOptions->OnSubmit = '?Action=UserOptionsSave';
    175         $Output .= $UserOptions->ShowEditForm();
    176       } else
    177       if($_GET['Action'] == 'UserOptionsSave')
    178       {
    179         $UserOptions = new Form('UserOptions', array());
    180         $UserOptions->LoadValuesFromForm();
    181         if($UserOptions->Values['Password'] == '') unset($UserOptions->Values['Password']);
    182         else {
    183           $PasswordHash = new PasswordHash();
    184           $Salt = $PasswordHash->GetSalt();
    185           $UserOptions->Values['Password'] = $PasswordHash->Hash($UserOptions->Values['Password'], $Salt);
    186           $UserOptions->Values['Salt'] = $Salt;
    187           $this->Database->update('User', 'Id='.$this->System->Modules['User']->User['Id'], array('Salt' => $Salt));
    188         }
    189         $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']);
    190         $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.');
    191         $this->System->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']);
    192         $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']);
    193         $UserOptions->OnSubmit = '?Action=UserOptionsSave';
    194         $Output .= $UserOptions->ShowEditForm();
    195       }
    196       if($_GET['Action'] == 'UserRegister')
    197       {
    198         $Form = new Form('UserRegister');
    199         //$Form->LoadValuesFromForm();
    200         $Form->OnSubmit = '?Action=UserRegisterSave';
    201         $Output .= $Form->ShowEditForm();
    202       } else
    203       if($_GET['Action'] == 'UserRegisterConfirm')
    204       {
    205         $Output .= $this->SystemMessage('Potvrzení registrace',
    206           $this->System->Modules['User']->RegisterConfirm($_GET['User'], $_GET['H']));
    207       } else
    208       if($_GET['Action'] == 'PasswordRecovery')
    209       {
    210         $Form = new Form('PasswordRecovery');
    211         $Form->OnSubmit = '?Action=PasswordRecovery2';
    212         $Output .= $Form->ShowEditForm();
    213       } else
    214       if($_GET['Action'] == 'PasswordRecovery2')
    215       {
    216         $Form = new Form('PasswordRecovery');
    217         $Form->LoadValuesFromForm();
    218         $Result = $this->System->Modules['User']->PasswordRecoveryRequest($Form->Values['Name'], $Form->Values['Email']);
    219         $Output .= $this->SystemMessage('Obnova hesla', $Result);
    220         if($Result <> USER_PASSWORD_RECOVERY_SUCCESS)
    221         {
    222           $Output .= $Form->ShowEditForm();
    223         }       
    224       } else
    225       if($_GET['Action'] == 'PasswordRecoveryConfirm')
    226       {
    227         $Output .= $this->SystemMessage('Obnova hesla', $this->System->Modules['User']->PasswordRecoveryConfirm($_GET['User'], $_GET['H'], $_GET['P']));
    228       } else
    229       if($_GET['Action'] == 'UserRegisterSave')
    230       {
    231         $Form = new Form('UserRegister', array());
    232         $Form->LoadValuesFromForm();
    233         $Result = $this->System->Modules['User']->Register($Form->Values['Login'], $Form->Values['Password'], $Form->Values['Password2'], $Form->Values['Email'], $Form->Values['Name'], $Form->Values['PhoneNumber'], $Form->Values['ICQ']);
    234         $Output .= $this->SystemMessage('Registrace nového účtu', $Result);
    235         if($Result <> USER_REGISTRATED)
    236         {
    237           $Form->OnSubmit = '?Action=UserRegisterSave';
    238           $Output .= $Form->ShowEditForm();
    239         }
    240       } else
    241       if($_GET['Action'] == 'MemberOptions')
    242       {
    243         $UserOptions = new Form('MemberOptions');
    244         $DbResult = $this->Database->query('SELECT Customer FROM UserCustomerRel WHERE User='.$this->System->Modules['User']->User['Id']);
    245         if($DbResult->num_rows > 0)
    246         {
    247           $CustomerUserRel = $DbResult->fetch_assoc();
    248           $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, '.
    249             'Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, '.
    250             'Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject '.
    251            'ON Subject.Id = Member.Subject WHERE Member.Id='.$CustomerUserRel['Customer']);       
    252           $DbRow = $DbResult->fetch_array();
    253           foreach($UserOptions->Definition['Items'] as $Index => $Item)
    254           {
    255             $UserOptions->Values[$Index] = $DbRow[$Index];
    256           }
    257           $UserOptions->OnSubmit = '?Action=MemberOptionsSave';
    258           $Output .= $UserOptions->ShowEditForm();
    259         } else $Output .= $this->SystemMessage('Chyba', 'Nejste zákazníkem');
    260       } else
    261       if($_GET['Action'] == 'MemberOptionsSave')
    262       {
    263         $UserOptions = new Form('MemberOptions');
    264         $UserOptions->LoadValuesFromForm();
    265         if($UserOptions->Values['FamilyMemberCount'] < 0)
    266           $UserOptions->Values['FamilyMemberCount'] = 0;
    267         if($UserOptions->Values['BillingPeriodNext'] < 2)
    268           $UserOptions->Values['BillingPeriodNext'] = 2;
    269          
    270         $DbResult = $this->Database->update('Member', 'Id='.$this->System->Modules['User']->User['Member'], array('InternetTariffNextMonth' => $UserOptions->Values['InternetTariffNextMonth'], 'FamilyMemberCount' => $UserOptions->Values['FamilyMemberCount'], 'BillingPeriodNext' => $UserOptions->Values['BillingPeriodNext']));
    271         $DbResult = $this->Database->query('SELECT Subject FROM Member WHERE Id='.$this->System->Modules['User']->User['Member']);
    272         $Member = $DbResult->fetch_assoc();
    273         $DbResult = $this->Database->update('Subject', 'Id='.$Member['Subject'],
    274           array('Name' => $UserOptions->Values['Name'], 'AddressStreet' => $UserOptions->Values['AddressStreet'],
    275           'AddressTown' => $UserOptions->Values['AddressTown'], 'AddressCountry' => $UserOptions->Values['AddressCountry'],
    276           'AddressPSC' => $UserOptions->Values['AddressPSC'], 'IC' => $UserOptions->Values['IC'],
    277           'DIC' => $UserOptions->Values['DIC']));
    278         $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.');
    279         $this->System->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno', $UserOptions->Values['Name']);
    280         $DbResult = $this->Database->query('SELECT Member.Id, Member.InternetTariffNextMonth, Member.FamilyMemberCount, Member.BillingPeriodNext, Subject.Name, Subject.AddressStreet, Subject.AddressTown, Subject.AddressPSC, Subject.AddressCountry, Subject.IC, Subject.DIC FROM Member JOIN Subject ON Subject.Id = Member.Subject WHERE Member.Id='.$this->System->Modules['User']->User['Member']);
    281         $DbRow = $DbResult->fetch_array();
    282         foreach($UserOptions->Definition['Items'] as $Index => $Item)
    283         {
    284           $UserOptions->Values[$Index] = $DbRow[$Index];
    285         }
    286         $UserOptions->OnSubmit = '?Action=MemberOptionsSave';
    287         $Output .= $UserOptions->ShowEditForm();
    288       }
    289     }
    290 
    291     $Database->select_db($Config['Database']['Database']);
    292 
    293     $DbResult = $Database->query('SELECT * FROM `HyperlinkGroup`');
    294     while($DbRow = $DbResult->fetch_assoc())
    295       $HyperlinkGroups[$DbRow['Id']] = $DbRow;
    296 
    297     // Show pannels
    298     //if(IsInternetAddr()) echo('Internet'); else echo('LAN');
    299     //$Output .= $this->InfoBar();
    300     $Output .= '<table id="MainTable"><tr>';
    301     $DbResult = $Database->select('PanelColumn', '*');
    302     while($PanelColumn =  $DbResult->fetch_assoc())
    303     {
    304       if($PanelColumn != '') $Width = ' width="'.$PanelColumn['Width'].'"';
    305         else $Width = '';
    306       $Output .= '<td valign="top"'.$Width.'>';
    307       $DbResult2 = $Database->query('SELECT * FROM `Panel` WHERE `PanelColumn`='.$PanelColumn['Id'].' ORDER BY `Order`');
    308       while($Panel = $DbResult2->fetch_assoc())
    309       {
    310         if($Panel['Module'] == 'HyperlinkGroup') $Output .= $this->ShowLinks($HyperlinkGroups[$Panel['Parameters']]);
    311         else if($Panel['Module'] == 'OnlineHostList') $Output .= $this->Panel('Online počítače', $this->OnlineHostList());
    312         else if($Panel['Module'] == 'UserOptions')
    313         {
    314           if($this->System->Modules['User']->User['Id'] != $this->System->Modules['User']->AnonymousUserId) $Output .= $this->Panel('Přihlášený uživatel', $this->UserPanel());
    315         } else
    316         if($Panel['Module'] == 'Webcam') $Output .= $this->Panel('Kamery', $this->WebcamPanel());
    317         else if($Panel['Module'] == 'NewsGroupList') $Output .= $this->Panel('Aktuality', $this->System->Modules['News']->Show(), array('<a href="?Action=CustomizeNews">Upravit</a>'));
    318       }
    319       $Output .= '</td>';
    320     } 
    321     $Output .= '</tr></table>';
    322     return($Output);
    323   }
    324 }
    325 
    326 $System->AddModule(new IndexPage());
    327 $System->Modules['IndexPage']->GetOutput();
     4$System->ShowPage('');
    3285
    3296?>
Note: See TracChangeset for help on using the changeset viewer.