Changeset 523


Ignore:
Timestamp:
Apr 20, 2013, 8:21:15 PM (11 years ago)
Author:
chronos
Message:
  • Upraveno: Záznam akcí Log předělán na aplikační modul.
  • Přidáno: Modul System a zobrazení seznamu dostupných modulů.
Location:
trunk/Modules
Files:
3 added
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Error/Error.php

    r516 r523  
    111111    $Error .= "\n";
    112112     
    113     $this->System->Modules['Log']->NewRecord('Error', 'Log', $Error);
     113    $this->System->ModuleManager->Modules['Log']->NewRecord('Error', 'Log', $Error);
    114114   
    115115    //if($Config['Web']['ErrorLogFile'] != '')
  • trunk/Modules/Finance/Import.php

    r521 r523  
    139139      $this->InsertMoney($_POST['Subject'.$I], $_POST['Money'.$I], 0, $_POST['Taxable'.$I], $Date, $_POST['Text'.$I], $DocumentLine);
    140140      $Output .= $I.', ';
    141       $this->System->Modules['Log']->NewRecord('Finance', 'NewPaymentInserted');
     141      $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'NewPaymentInserted');
    142142    }
    143143    return($Output);
  • trunk/Modules/Finance/finance.php

    r521 r523  
    229229        'Cash' => $Cash, 'MonthlyPlus' => $this->W2Kc($ConsumptionPlus)));
    230230    }
    231     $this->System->Modules['Log']->NewRecord('Finance', 'RecalculateMemberPayment'); 
     231    $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'RecalculateMemberPayment'); 
    232232    $this->RecalculateTariffs(1);
    233233    $this->RecalculateTariffs(0);
     
    272272    $DbResult = $this->Database->update('NetworkSegment', 'Id='.$this->InternetSegmentId,
    273273      array('Users' => $Row[0], 'UsersOverheads' => $Row[0]));
    274     $this->System->Modules['Log']->NewRecord('Finance', 'RecalculateSegmentParameters');
     274    $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'RecalculateSegmentParameters');
    275275    return($Output);
    276276  } 
  • trunk/Modules/FinanceBankAPI/FileImport.php

    r508 r523  
    121121      $this->InsertMoney($_POST['Subject'.$I], $_POST['Money'.$I], 0, $_POST['Taxable'.$I], $Date, $_POST['Text'.$I], $DocumentLine);
    122122      $Output .= $I.', ';
    123       $this->System->Modules['Log']->NewRecord('Finance', 'NewPaymentInserted');
     123      $this->System->ModuleManager->Modules['Log']->NewRecord('Finance', 'NewPaymentInserted');
    124124    }
    125125    return($Output);
  • trunk/Modules/Log/Log.php

    r521 r523  
    11<?php
    22
    3 class Log extends Module
     3class ModuleLog extends AppModule
    44{
    5   var $Dependencies = array('User');
     5  function __construct($System)
     6  {
     7    parent::__construct($System);
     8    $this->Name = 'Log';
     9    $this->Version = '1.0';
     10    $this->Creator = 'Chronos';
     11    $this->License = 'GNU/GPLv3';
     12    $this->Description = 'Logging user actions';
     13    $this->Dependencies = array('User');
     14  }
     15 
     16  function Install()
     17  {
     18    parent::Install();
     19  }
    620
     21  function UnInstall()
     22  {
     23    parent::UnInstall();
     24  } 
     25 
     26  function Start()
     27  {
     28    parent::Start();
     29  }
     30 
     31  function Stop()
     32  {
     33        parent::Stop();
     34  }
     35 
    736  function NewRecord($Module, $Operation, $Value = '')
    837  {
     
    1544      'Operation' => $Operation, 'Value' => $Value, 'IPAddress' => $_SERVER['REMOTE_ADDR']));
    1645  }
     46}
    1747
    18 }
     48?>
  • trunk/Modules/Meals/Meals.php

    r519 r523  
    136136        }
    137137        $Output .= '<div style="color: red; font-size: larger;">Menu uloženo!</div>';
    138         $this->System->Modules['Log']->NewRecord('EatingPlace', 'MenuSave');
     138        $this->System->ModuleManager->Modules['Log']->NewRecord('EatingPlace', 'MenuSave');
    139139      }
    140140      if($_GET['action'] == 'saveinfo')
     
    143143        $this->Database->insert('MealsInfo', array('Info' => $_POST['info'], 'Price' => $_POST['price']));
    144144        $Output .= '<div style="color: red; font-size: larger;">Informační údaje uloženy!</div>';
    145         $this->System->Modules['Log']->NewRecord('EatingPlace', 'InfoSave');
     145        $this->System->ModuleManager->Modules['Log']->NewRecord('EatingPlace', 'InfoSave');
    146146      }
    147147    }
  • trunk/Modules/NetworkShare/SharePage.php

    r519 r523  
    102102    // Log search
    103103    if(array_key_exists('keyword', $_POST) or array_key_exists('keyword', $_GET))
    104       $this->System->Modules['Log']->NewRecord('Share', 'Hledaný výraz', $_SESSION['keyword']);
     104      $this->System->ModuleManager->Modules['Log']->NewRecord('Share', 'Hledaný výraz', $_SESSION['keyword']);
    105105
    106106    // Zobrazení formuláře
  • trunk/Modules/News/NewsPage.php

    r521 r523  
    124124          $Output .= 'Aktualita přidána!<br />Pokud budete chtít vaši aktualitu smazat, klikněte na odkaz Smazat v seznamu všech aktualit v kategorii.<br /><br />';
    125125          $Output .= '<a href="?category='.$_POST['category'].'">Zpět na seznam aktualit</a>';
    126           $this->System->Modules['Log']->NewRecord('News', 'Aktualita přidána', $this->Database->insert_id);
     126          $this->System->ModuleManager->Modules['Log']->NewRecord('News', 'Aktualita přidána', $this->Database->insert_id);
    127127        } else $Output .= 'Do této kategorie nemůžete vkládat aktuality!';
    128128        break;
  • trunk/Modules/Portal/Portal.php

    r521 r523  
    193193        $UserOptions->SaveValuesToDatabase($this->System->Modules['User']->User['Id']);
    194194        $Output .= $this->SystemMessage('Nastavení', 'Nastavení uloženo.');
    195         $this->System->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']);
     195        $this->System->ModuleManager->Modules['Log']->NewRecord('User', 'Nastavení uživatele změněno', $UserOptions->Values['Name']);
    196196        $UserOptions->LoadValuesFromDatabase($this->System->Modules['User']->User['Id']);
    197197        $UserOptions->OnSubmit = '?Action=UserOptionsSave';
     
    289289          'DIC' => $UserOptions->Values['DIC']));
    290290        $Output .= $this->SystemMessage('Nastavení', 'Nastavení domácnosti uloženo.');
    291         $this->System->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno',
     291        $this->System->ModuleManager->Modules['Log']->NewRecord('Member+Subject', 'Nastavení člena/subjektu změněno',
    292292          $Form->Values['Name']);
    293293        $DbResult = $this->Database->query('SELECT Member.Id, Member.FamilyMemberCount, Member.BillingPeriodNext, '.
  • trunk/Modules/User/UserList.php

    r519 r523  
    99  function Show()
    1010  {
    11     $DbResult = $this->Database->query('SELECT COUNT(*) FROM `User` WHERE (`Login` != "Anonym")');
     11    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `User`');
    1212    $DbRow = $DbResult->fetch_row();
    1313    $PageList = GetPageList($DbRow[0]);   
     
    2626    $Output .= $Order['Output'];
    2727
    28     $Query = 'SELECT * FROM `User` WHERE (`Login` != "Anonym") '.$Order['SQL'].$PageList['SQLLimit'];
     28    $Query = 'SELECT * FROM `User` '.$Order['SQL'].$PageList['SQLLimit'];
    2929
    3030    $DbResult = $this->Database->query($Query);
  • trunk/Modules/WebCam/WebCam.php

    r519 r523  
    6767  {
    6868    global $Config;
    69     $Output = '<a href="http://www.zdechov.net/kamery/?id=1"><img alt="Webkamera školní hřiště" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam.jpg" /></a>';
    70     $Output .= '<a href="http://www.zdechov.net/kamery/?id=2"><img alt="Webkamera střed obce obloha" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam2.jpg" /></a>';
    71     $Output .= '<a href="http://www.zdechov.net/kamery/?id=3"><img alt="Skiareál, motokrosová grapa" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam3.jpg" /></a>';
    72     $Output .= '<a href="http://www.zdechov.net/kamery/?id=4"><img alt="Fotbalové hřiště" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam4.jpg" /></a>';
    73         return($Output);   
     69    $Output = '';
     70    //$Output = '<a href="http://www.zdechov.net/kamery/?id=1"><img alt="Webkamera školní hřiště" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam.jpg" /></a>';
     71    //$Output .= '<a href="http://www.zdechov.net/kamery/?id=2"><img alt="Webkamera střed obce obloha" width="140" height="105" src="http://www.zdechov.net/images/webcam/webcam2.jpg" /></a>';
     72    //$Output .= '<a href="http://www.zdechov.net/kamery/?id=3"><img alt="Skiareál, motokrosová grapa" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam3.jpg" /></a>';
     73    //$Output .= '<a href="http://www.zdechov.net/kamery/?id=4"><img alt="Fotbalové hřiště" width="140" height="79" src="http://www.zdechov.net/images/webcam/webcam4.jpg" /></a>';
     74          return($Output);   
    7475  } 
    7576}
Note: See TracChangeset for help on using the changeset viewer.