Changeset 519


Ignore:
Timestamp:
Apr 14, 2013, 6:18:49 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Přepracován systém generování horního navigačního řádků stránek. Nyní mají stránky třídy Page určenu nadřazenou stránky přes nadřazenou třídu.
Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Page.php

    r518 r519  
    99  var $ShowRuntimeInfo = false;
    1010  var $ClearPage = false;
    11   var $PathTree = array('Rozcestník',
    12     'index.php' => '',
    13     'missing.php' => '',
    14     'manualy.php' => 'Manuály',
    15     'is' => array('',
    16       'index.php' => 'Správa dat',
    17       'topologie.php' => 'Topologie sítě',
    18     ),
    19     'network.php' => 'Technické informace',
    20     'map' => array('',
    21       'index.php' => 'Mapa sítě',
    22     ),
    23     'tv' => array('',
    24       'index.php' => 'Síťová televize',
    25     ),
    26     'network' => array('',
    27       'administration.php' => 'Administrace sítě',
    28       'dostupnost.php' => 'Dostupnost zařízení',
    29       'restart.php' => 'Restart služeb',
    30       'user_hosts.php' => 'Registrované počítače',
    31     ),
    32     'nabidky_pripojeni.php' => 'Nabídky připojení',
    33     'telseznam.php' => 'Telefonní seznam',
    34     'merak.php' => 'Měřič spotřeby',
    35     'tkr.php' => 'Kanály kabelové televize',
    36     'LogShow.php' => 'Záznamy operací',
    37     'share' => array('Prohledat sdílení',
    38       'index.php' => '',
    39       'firefox.php' => 'Integrace do prohlížeče',
    40     ),
    41     'hostlist.php' => 'Seznam počítačů',
    42     'userlist.php' => 'Seznam uživatelů',
    43     'farnost' => array('',
    44       'index.php' => 'Rozpis mší',
    45     ),
    46     'finance' => array('Finance',
    47       'index.php' => '',
    48       'spotreba.php' => 'Spotřeba',
    49       'zivnost.php' => 'Daňová evidence',
    50       'prepocet.php' => 'Přepočet financí',
    51       'changes.php' => 'Změny',
    52       'tarify.php' => 'Tarify',
    53       'clenove.php' => 'Seznam členů',
    54       'zarizeni.php' => 'Zařízení',
    55       'strom.php' => 'Strom zařízení',
    56       'srovnani.php' => 'Porovnání tarifů s konkurencí',
    57       'bills_manage.php' => 'Faktury',
    58       'monthly_overall.php' => 'Měsíční přehledy',
    59       'manage.php' => 'Správa financí',
    60       'faktury' => array('',
    61         'index.php' => 'Faktury za internet',
    62       ),
    63     ),
    64     'statistic' => array('',
    65       'trafficview.php' => 'Vytížení internetu',
    66       'index.php' => 'Statistika',
    67       'trafficview2.php' => 'Statistika',
    68       'bandwidth.php' => 'Zatížení internetu',
    69       'bandwidth_full.php' => 'Zatížení internetu všech počítačů',
    70     ),
    71     'fotbal.php' => 'Fotbal',
    72     'webcam' => array('',
    73        'index.php' => 'Web kamera',
    74     ),
    75     'navody.php' => 'Návody',
    76     'ukoly.php' => 'Plánované projekty',
    77     'otevreno.php' => 'Otvírací doby',
    78     'aktuality' => array('',
    79       'index.php' => 'Aktuality',
    80       'subscription.php' => 'RSS aktuality',
    81     ),
    82     'sluzby.php' => 'Služby',
    83     'history.php' => 'Historie',
    84     'docs' => array('',
    85       'zapisy' => array('',
    86         'zapisy.php' => 'Zápisy ze schůzí',
    87       ),
    88     ),
    89     'jidelna' => array('',
    90       'index.php' => 'Jídelníček',
    91       'menuedit.php' => 'Editace jídelníčku',
    92     ),
    93     'backup' => array('',
    94       'index.php' => 'Nastavení zálohování',
    95     ),
    96     'mapa.php' => 'Mapa webu',
    97   );
     11  var $ParentClass = '';
     12  var $ShortTitle;
     13  var $FullTitle;
    9814 
    9915  function __construct()
     
    11430  function ShowHeader($Title, $Path)
    11531  {
    116     $ScriptName = $_SERVER['SCRIPT_NAME'];
     32    $ScriptName = $_SERVER['REQUEST_URI'];
    11733    while(strpos($ScriptName, '//') !== false)
    11834      $ScriptName = str_replace('//', '/', $ScriptName);
    119     $PathTreePath = '/';
    120     $PathTreeItem = $this->PathTree;
    121     $Navigation = '<a href="'.$this->System->Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> &gt; ';
    122     $ScriptName = substr($ScriptName, strlen($this->System->Config['Web']['RootFolder']));
    123     $ScriptNameParts = explode('/', $ScriptName);
    124     array_shift($ScriptNameParts);
    125     foreach($ScriptNameParts as $ScriptNamePart)
     35    $ScriptName = substr($ScriptName, strlen($this->System->Link('')));
     36    if(substr($ScriptName, -1, 1) == '/') $ScriptName = substr($ScriptName, 0, -1);
     37    $Page = $this;
     38    $Navigation = '';
     39    while($Page)
    12640    {
    127       if(array_key_exists($ScriptNamePart, $PathTreeItem))
     41      $Navigation = ' &gt; <a href="'.$this->System->Link($ScriptName).'/">'.$Page->ShortTitle.'</a>'.$Navigation;
     42     
     43      if($Page->ParentClass != '')
    12844      {
    129         if(is_array($PathTreeItem[$ScriptNamePart]))
    130         {
    131           $PathTreeItem = $PathTreeItem[$ScriptNamePart];
    132           $PathTreePath .= $ScriptNamePart.'/';
    133           if($PathTreeItem[0] != '')
    134             $Navigation .= '<a href="'.$this->System->Config['Web']['RootFolder'].$PathTreePath.'">'.$PathTreeItem[0].'</a> &gt; ';
    135         } else
    136         {
    137           if($PathTreeItem[$ScriptNamePart] != '')
    138             $Navigation .= '<a href="'.$this->System->Config['Web']['RootFolder'].$PathTreePath.$ScriptNamePart.'">'.$PathTreeItem[$ScriptNamePart].'</a> &gt; ';
    139         }
    140       }
     45        $PageClass = $Page->ParentClass;
     46        $Page = new $PageClass();
     47        $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '/'));
     48      } else $Page = null;
    14149    }
    142     $Navigation = substr($Navigation, 0, -6);
     50    $Navigation = substr($Navigation, 6);
    14351
    14452    $BodyParam = '';
     
    194102    $Page->System = $this->System;
    195103    $Page->Database = $this->Database;
     104    $Page->FormatHTML = $this->FormatHTML;
    196105    return($Page);
    197106  }
  • trunk/Common/Version.php

    r517 r519  
    11<?php
    22
    3 $Revision = 517; // Subversion revision
     3$Revision = 519; // Subversion revision
    44$DatabaseRevision = 517;
    55$ReleaseTime = '2013-04-13';
  • trunk/Modules/Chat/Chat.php

    r498 r519  
    88    $this->FullTitle = 'Výpis z historie chatu';
    99    $this->ShortTitle = 'Historie chatu';
    10     $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'chat');     
     10    $this->ParentClass = 'PagePortal';
    1111  }
    1212 
  • trunk/Modules/IS/IS.php

    r508 r519  
    77  var $FullTitle = 'Správa dat';
    88  var $ShortTitle = 'Správa dat';
     9  var $ParentClass = 'PagePortal';
    910  var $MenuItems = array();
    1011
  • trunk/Modules/Map/Map.php

    r501 r519  
    77  var $FullTitle = 'Mapa sítě';
    88  var $ShortTitle = 'Mapa sítě';
     9  var $ParentClass = 'PagePortal';
    910  var $Load = 'initialize()';
    1011  var $Unload = 'GUnload()';
  • trunk/Modules/Meals/Meals.php

    r513 r519  
    55  var $FullTitle = 'Jídleníček jídelny Na kopečku';
    66  var $ShortTitle = 'Jídelníček';
     7  var $ParentClass = 'PagePortal';
    78  var $DayNames = array('Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota');
    89  var $DayNamesShort = array('NE', 'PO', 'ÚT', 'ST', 'ČT', 'PÁ', 'SO');
     
    8788    <br>
    8889    <strong>CENA JEDNOHO MENU JE '.$Row['Price'].' Kč</strong></td></tr>';
    89     //echo('<tr><td colspan="2">dd</td></tr>');
    9090    $Output .= '</table>';
    91 
    92     //DB_Select('meals_info','*');
    93     //$Row = DB_Row();
    94     //echo($Row['info']);
    9591
    9692    $Output .= '</body></html>';
  • trunk/Modules/Meteostation/Meteostation.php

    r501 r519  
    88  var $FullTitle = 'Stav meteostanice';
    99  var $ShortTitle = 'Meteostanice';
    10 
     10  var $ParentClass = 'PagePortal';
     11 
    1112  function Show()
    1213  {
  • trunk/Modules/Network/Administration.php

    r518 r519  
    88    $this->FullTitle = 'Administrace sítě';
    99    $this->ShortTitle = 'Administrace sítě';
    10     $this->NavigationPath[] = array('Name' => $this->ShortTitle, 'URL' => 'sprava');     
     10    $this->ParentClass = 'PageNetwork';
    1111  }
    1212
  • trunk/Modules/Network/Availability.php

    r518 r519  
    55  var $FullTitle = 'Dostupnost aktivních prvků sítě';
    66  var $ShortTitle = 'Dostupnost sítě';
     7  var $ParentClass = 'PageNetwork';
    78  var $PeriodCount = 24;
    89  var $Period = array(
  • trunk/Modules/Network/HostList.php

    r501 r519  
    77  var $FullTitle = 'Seznam registrovaných počítačů';
    88  var $ShortTitle = 'Seznam počítačů';
    9 
     9  var $ParentClass = 'PageNetwork';
     10 
    1011  function Show()
    1112  {
  • trunk/Modules/Network/Hosting.php

    r518 r519  
    55  var $FullTitle = 'Hostované projekty';
    66  var $ShortTitle = 'Hostované projekty';
     7  var $ParentClass = 'PageNetwork';
    78
    89  function Show()
  • trunk/Modules/Network/Network.php

    r518 r519  
    1111{
    1212  var $FullTitle = 'Technické informace o síti';
    13   var $ShortTitle = 'Technické informace';
     13  var $ShortTitle = 'Síť';
     14  var $ParentClass = 'PagePortal';
    1415
    1516  function Show()
     
    1718    if(count($this->System->PathItems) > 1)
    1819    {
    19       if($this->System->PathItems[1] == 'administration') $Output = $this->NewPage('PageNetworkAdministration')->Show();
    20       else if($this->System->PathItems[1] == 'availability') $Output = $this->NewPage('PageAvailability')->Show();
    21       else if($this->System->PathItems[1] == 'subnet') $Output = $this->NewPage('PageSubnet')->Show();
    22       else if($this->System->PathItems[1] == 'user_hosts') $Output = $this->NewPage('PageNetworkHostList')->Show();
    23       else if($this->System->PathItems[1] == 'hosting') $Output = $this->NewPage('PageHosting')->Show();
    24       else if($this->System->PathItems[1] == 'hosts') $Output = $this->NewPage('PageHostList')->Show();
    25       else $Output = $this->ShowInformation();
     20      $this->ClearPage = true;
     21      if($this->System->PathItems[1] == 'administration') $Output = $this->NewPage('PageNetworkAdministration')->GetOutput();
     22      else if($this->System->PathItems[1] == 'availability') $Output = $this->NewPage('PageAvailability')->GetOutput();
     23      else if($this->System->PathItems[1] == 'subnet') $Output = $this->NewPage('PageSubnet')->GetOutput();
     24      else if($this->System->PathItems[1] == 'user_hosts') $Output = $this->NewPage('PageNetworkHostList')->GetOutput();
     25      else if($this->System->PathItems[1] == 'hosting') $Output = $this->NewPage('PageHosting')->GetOutput();
     26      else if($this->System->PathItems[1] == 'hosts') $Output = $this->NewPage('PageHostList')->GetOutput();
     27      else {
     28        $this->ClearPage = false;
     29        $Output = $this->ShowInformation();
     30      }
    2631    } else $Output = $this->ShowInformation();
    2732    return($Output); 
  • trunk/Modules/Network/Subnet.php

    r518 r519  
    88    $this->FullTitle = 'Informace o podsítích';
    99    $this->ShortTitle = 'Podsítě';
     10    $this->ParentClass = 'PageNetwork';
    1011  }
    1112
  • trunk/Modules/Network/UserHosts.php

    r518 r519  
    88    $this->FullTitle = 'Registrované počítače';
    99    $this->ShortTitle = 'Registrované počítače';
     10    $this->ParentClass = 'PageNetwork';
    1011  }
    1112
  • trunk/Modules/NetworkShare/SharePage.php

    r505 r519  
    33class SharePage extends Page
    44{
    5   var $FullTitle = 'Vyhledávání souborů';
    6   var $ShortTitle = 'Vyhledávání souborů';
     5  var $FullTitle = 'Prohledávání sdílených souborů';
     6  var $ShortTitle = 'Sdílené soubory';
     7  var $ParentClass = 'PagePortal';
    78  var $Dependencies = array('Log');
    89  var $MaxNesting = 20; // Maximální vnoření
  • trunk/Modules/NetworkTopology/NetworkTopology.php

    r517 r519  
    55  var $FullTitle = 'Grafické zobrazení topologie sítě';
    66  var $ShortTitle = 'Topologie sítě';
     7  var $ParentClass = 'PagePortal';
    78  var $TopHostName = 'NIX-ROUTER';
    89 
  • trunk/Modules/Portal/Portal.php

    r518 r519  
    66{
    77  var $FullTitle = 'Zděchovský rozcestník';
    8   var $ShortTitle = '';
     8  var $ShortTitle = 'Rozcestník';
    99 
    1010  function ShowLinks($HyperlinkGroup)
  • trunk/Modules/TV/TV.php

    r501 r519  
    77  var $FullTitle = 'Síťová televize';
    88  var $ShortTitle = 'IPTV';
     9  var $ParentClass = 'PagePortal';
    910 
    1011  function Show()
  • trunk/Modules/User/User.php

    r496 r519  
    2727  {
    2828    parent::Start();
    29     $this->System->RegisterPage('userlist.php', 'PageUserList');
     29    $this->System->RegisterPage('userlist', 'PageUserList');
    3030  } 
    3131 
  • trunk/Modules/User/UserList.php

    r498 r519  
    55  var $FullTitle = 'Seznam registrovaných uživatelů';
    66  var $ShortTitle = 'Seznam uživatelů';
    7 
     7  var $ParentClass = 'PagePortal';
     8 
    89  function Show()
    910  {
  • trunk/Modules/WebCam/WebCam.php

    r498 r519  
    55  var $FullTitle = 'Webová kamera';
    66  var $ShortTitle = 'Kamera';
     7  var $ParentClass = 'PagePortal';
    78 
    89  function Show()
  • trunk/finance/index.php

    r453 r519  
    77  var $FullTitle = 'Přehled financování sítě';
    88  var $ShortTitle = 'Přehled financí';
    9 
     9  var $ParentClass = 'PagePortal';
     10 
    1011  function Show()
    1112  {
Note: See TracChangeset for help on using the changeset viewer.