Ignore:
Timestamp:
Aug 20, 2013, 11:37:30 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Event log transformed to application module Log.
  • Added: Class Page can now show pages without header and footer using property RawPage set to true.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global.php

    r563 r566  
    1414// Include application modules
    1515// TODO: Make modules configurable
     16include_once(dirname(__FILE__).'/../Modules/Log/Log.php');
    1617include_once(dirname(__FILE__).'/../Modules/Translation/Translation.php');
    1718include_once(dirname(__FILE__).'/../Modules/AoWoW/AoWoW.php');
     
    6970 
    7071  // Initialize application modules
     72  $System->ModuleManager->RegisterModule(new ModuleLog($System));
    7173  $System->ModuleManager->RegisterModule(new ModuleUser($System));
    7274  $System->ModuleManager->RegisterModule(new ModuleAoWoW($System));
     
    331333
    332334$Moderators = array('Překladatel', 'Moderátor', 'Administrátor');
    333 
    334 function WriteLog($Text, $Type)
    335 {
    336   global $System, $User;
    337  
    338   if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole';
    339     else $IP = addslashes($_SERVER['REMOTE_ADDR']);
    340 
    341   if(!is_null($User->Id)) $UserId = $User->Id;
    342     else $UserId = 'NULL';
    343   $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP` )
    344    VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'")';
    345   $System->Database->query($Query);
    346 }
    347335
    348336function HumanDate($SQLDateTime)
Note: See TracChangeset for help on using the changeset viewer.