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.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • 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  {
Note: See TracChangeset for help on using the changeset viewer.