Changeset 366


Ignore:
Timestamp:
Jan 19, 2012, 7:55:45 AM (13 years ago)
Author:
chronos
Message:
  • Opraveno: Navigační odkazy v modulu Finance, Network a FrontPage.
Location:
trunk
Files:
13 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Common/Global.php

    r364 r366  
    1414include_once('Module.php');
    1515include_once('Model.php');
    16 include_once('finance/bills.php');
    17 include_once('finance/finance.php');
    1816 
    1917$PrefixMultipliers = array
     
    207205  $System->Init();
    208206  if(isset($_SERVER['REMOTE_ADDR'])) $System->Models['User']->Check();
    209   $System->AddModule(new Bill());
    210   $System->AddModule(new Finance());
    211   $System->Modules['Finance']->LoadMonthParameters(0);
    212207}
    213208
  • trunk/Common/Module.php

    r364 r366  
    142142          'Version' => $Module->Version, 'Creator' => $Module->Creator,
    143143          'Description' => $Module->Description, 'License' => $Module->License,
    144           'Installed' => 0, 'Dependecies' => implode(',', $Module->Dependencies)));
     144          'Installed' => 0, 'Dependencies' => implode(',', $Module->Dependencies)));
    145145        unset($Module);
    146146      } else throw new Exception('Missing class '.$ModuleClassName.' in module '.$ModuleName);
  • trunk/Modules/Finance/Finance.php

    r365 r366  
    11<?php
    22
    3 class Finance
     3include_once('FinanceOverview.php');
     4include_once('tarify.php');
     5include_once('zarizeni.php');
     6include_once('spotreba.php');
     7include_once('inventory.php');
     8include_once('monthly_overall.php');
     9include_once('manage.php');
     10include_once('user_state.php');
     11
     12class FinancePage extends Page
     13{
     14  var $FullTitle = 'Finance';
     15  var $ShortTitle = 'Finance';
     16  var $RowPerPage = 20;
     17
     18  function Show()
     19  {
     20    $PageClass = '';
     21    if(count($this->System->PathItems) > 1)
     22    {
     23      if($this->System->PathItems[1] == 'tarify') $PageClass = 'FinanceTarrifsPage';
     24        else if($this->System->PathItems[1] == 'zarizeni') $PageClass = 'FinanceDeviceListPage';
     25        else if($this->System->PathItems[1] == 'uzivatel') $PageClass = 'FinanceUserState';
     26        else if($this->System->PathItems[1] == 'spotreba') $PageClass = 'FinanceConsumption';
     27        else if($this->System->PathItems[1] == 'sklad') $PageClass = 'FinanceStoragePage';
     28        else if($this->System->PathItems[1] == 'clenove') $PageClass = 'FinanceUserList';
     29        else if($this->System->PathItems[1] == 'sprava') $PageClass = 'FinanceManagePage';
     30        else if($this->System->PathItems[1] == 'mesicni-prehled') $PageClass = 'FinanceMonthlyOverallPage';
     31        else return(PAGE_NOT_FOUND);
     32    } else $PageClass = 'FinanceOverview';
     33    if($PageClass != '')
     34    {
     35      $Page = new $PageClass();
     36      $Page->Database = &$this->Database;
     37      $Page->Config = &$this->Config;
     38      $Page->System = &$this->System;
     39      return($Page->Show());
     40    }
     41  } 
     42}
     43
     44
     45class ModuleFinance extends Module
    446{
    547  var $Database;
     
    2971  var $BillingPeriods;
    3072 
     73  function __construct($Database, $System)
     74  {
     75    parent::__construct($Database, $System);
     76    $this->Name = 'Finance';
     77    $this->Version = '1.0';
     78    $this->Creator = 'Chronos';
     79    $this->License = 'GNU/GPL';
     80    $this->Description = 'Accounting processing';
     81    $this->Dependencies = array('User');
     82    $this->Models = array();
     83  }
     84 
     85  function Init()
     86  {
     87    $this->System->Pages['finance'] = 'FinancePage';
     88    $this->LoadMonthParameters(0);
     89  }
     90 
     91  function Install()
     92  {
     93    parent::Install();
     94  }
     95
     96  function UnInstall()
     97  {
     98    parent::UnInstall(); 
     99  }
     100
    31101  function LoadTariffs()
    32102  {
  • trunk/Modules/Finance/FinanceOverview.php

    r365 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceOverview extends Page
     
    1211    $Output = '<table><tr><td valign="top">';
    1312   
    14     $Output .= '<a href="monthly_overall.php">Měsíční přehledy</a><br />';
    15     $Output .= '<a href="tarify.php">Tarify</a><br />';
    16     $Output .= '<a href="zarizeni.php">Výpis zařízení</a><br />';
    17     if($this->System->Models['User']->CheckPermission('Finance', 'SubjectList')) $Output .= '<a href="clenove.php">Seznam členů</a><br />';
    18     $Output .= '<a href="spotreba.php">Spotřeba energie</a><br />';
    19     $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/index.php?category=9">Investice v síti</a><br />';
     13    $Output .= '<a href="mesicni-prehled/">Měsíční přehledy</a><br />';
     14    $Output .= '<a href="tarify/">Tarify</a><br />';
     15    $Output .= '<a href="zarizeni/">Výpis zařízení</a><br />';
     16    if($this->System->Models['User']->CheckPermission('Finance', 'SubjectList'))
     17      $Output .= '<a href="clenove/">Seznam členů</a><br />';
     18    $Output .= '<a href="spotreba/">Spotřeba energie</a><br />';
     19    $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/?category=9">Investice v síti</a><br />';
    2020    //$Output .= '<a href="faktury/">Faktury za internet</a><br />';
    2121    //$Output .= '<a href="inventory.php">Výpis skladových zásob</a><br />';
     
    9797}
    9898
    99 $System->AddModule(new FinanceOverview());
    100 $System->Modules['FinanceOverview']->GetOutput();
    101 
    10299?>
  • trunk/Modules/Finance/clenove.php

    r343 r366  
    11<?php
    2 include('../global.php');
    32
    43class FinanceUserList extends Page
     
    6362}
    6463
    65 $System->AddModule(new FinanceUserList());
    66 $System->Modules['FinanceUserList']->GetOutput();
    67 
    6864?>
  • trunk/Modules/Finance/inventory.php

    r157 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceStoragePage extends Page
     
    2524}
    2625
    27 $System->AddModule(new FinanceStoragePage());
    28 $System->Modules['FinanceStoragePage']->GetOutput();
    29 
    3026?>
  • trunk/Modules/Finance/manage.php

    r343 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceManagePage extends Page
     
    451450}
    452451
    453 $System->AddModule(new FinanceManagePage());
    454 $System->Modules['FinanceManagePage']->GetOutput();
    455 
    456452?>
  • trunk/Modules/Finance/monthly_overall.php

    r157 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceMonthlyOverallPage extends Page
     
    3231}
    3332
    34 $System->AddModule(new FinanceMonthlyOverallPage());
    35 $System->Modules['FinanceMonthlyOverallPage']->GetOutput();
    36 
    3733?>
  • trunk/Modules/Finance/spotreba.php

    r167 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceConsumption extends Page
     
    2928}
    3029
    31 $System->AddModule(new FinanceConsumption());
    32 $System->Modules['FinanceConsumption']->GetOutput();
    33 
    3430?>
  • trunk/Modules/Finance/tarify.php

    r221 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceTarrifsPage extends Page
     
    6463}
    6564
    66 $System->AddModule(new FinanceTarrifsPage());
    67 $System->Modules['FinanceTarrifsPage']->GetOutput();
    68 
    6965?>
  • trunk/Modules/Finance/user_state.php

    r343 r366  
    11<?php
    2 
    3 include_once('../global.php');
    42
    53class FinanceUserState extends Page
     
    132130}
    133131
    134 $System->AddModule(new FinanceUserState());
    135 $System->Modules['FinanceUserState']->GetOutput();
    136 
    137132?>
  • trunk/Modules/Finance/zarizeni.php

    r195 r366  
    11<?php
    2 include_once('../global.php');
    32
    43class FinanceDeviceListPage extends Page
     
    2928}
    3029
    31 $System->AddModule(new FinanceDeviceListPage());
    32 $System->Modules['FinanceDeviceListPage']->GetOutput()
    33 
    3430?>
  • trunk/Modules/FrontPage/FrontPage.php

    r358 r366  
    7474      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'?Action=MemberOptions">Domácnost</a><br />';
    7575    if($this->System->Models['User']->CheckPermission('Finance', 'DisplaySubjectState'))
    76       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/user_state.php">Finance</a><br />';
     76      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/uzivatel/">Finance</a><br />';
    7777    if($this->System->Models['User']->CheckPermission('Network', 'RegistredHostList'))
    78       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/user_hosts.php">Počítače</a><br />';
     78      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/sit/registrovane-pocitace/">Počítače</a><br />';
    7979    if($this->System->Models['User']->CheckPermission('News', 'Insert'))
    8080      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/aktuality/?action=add">Vložení aktuality</a><br />';
    8181    if($this->System->Models['User']->CheckPermission('EatingPlace', 'Edit'))
    82       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/jidelna/menuedit.php">Editace jídelníčků</a><br />';
     82      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/jidelna/edit/">Editace jídelníčků</a><br />';
    8383    if($this->System->Models['User']->CheckPermission('Finance', 'Manage'))
    84       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/manage.php">Správa financí</a><br />';
     84      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/finance/sprava/">Správa financí</a><br />';
    8585    if($this->System->Models['User']->CheckPermission('Network', 'Administration'))
    86       $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/network/administration.php">Správa sítě</a><br />';
     86      $Output .= '<a href="'.$this->System->Config['Web']['RootFolder'].'/sit/sprava/">Správa sítě</a><br />';
    8787    return($Output);
    8888  }
  • trunk/Modules/Network/Network.php

    r363 r366  
    1212class NetworkPage extends Page
    1313{
    14 var $FullTitle = 'Síť';
     14  var $FullTitle = 'Síť';
    1515  var $ShortTitle = 'Síť';
    1616  var $RowPerPage = 20;
  • trunk/Modules/Network/user_hosts.php

    r361 r366  
    1111   
    1212    $Output = '<div align="center" style="font-size: small;"><table class="WideTable">';
    13     $Output .= '<tr><th>Jméno počítače</th><th>Místní adresa</th><th>Veřejná adresa</th><th>CZFree adresa</th><th>Fyzická adresa</th><th>Typ</th><th>Naposledy online</th></tr>';
     13    $Output .= '<tr><th>Jméno počítače</th><th>Místní adresa</th><th>Veřejná adresa</th><th>Fyzická adresa</th><th>Typ</th><th>Naposledy online</th></tr>';
    1414    $DbResult = $this->Database->query('SELECT NetworkDevice.*, NetworkDeviceType.Name AS HostType FROM NetworkDevice LEFT JOIN NetworkDeviceType ON NetworkDeviceType.Id = NetworkDevice.Type WHERE NetworkDevice.Used = 1 AND NetworkDevice.Member = '.$this->System->Models['User']->User['Member'].' ORDER BY NetworkDevice.Name');
    1515    while($Device = $DbResult->fetch_assoc())
     
    2323        $InterfaceName = $Device['Name'];
    2424        if($Interface['Name'] != '') $InterfaceName .= '-'.$Interface['Name'];
    25         $Output .= '<tr><td style="text-align: left; '.$Style.'">&nbsp;&nbsp;'.$InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'.NotBlank($Interface['ExternalIP']).'</td><td>'.NotBlank($Interface['CZFreeIP']).'</td><td>'.NotBlank($Interface['MAC']).'</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
     25        $Output .= '<tr><td style="text-align: left; '.$Style.'">&nbsp;&nbsp;'.$InterfaceName.'</td><td>'.NotBlank($Interface['LocalIP']).'</td><td>'.NotBlank($Interface['ExternalIP']).'</td><td>'.NotBlank($Interface['MAC']).'</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
    2626      }     
    2727    }
Note: See TracChangeset for help on using the changeset viewer.