<?php

//include_once('database.php');

class Module
{
  var $Database;
  var $Config;
  var $System;
  
  function __construct($System)
  {
    $this->Database = &$System->Database;
    $this->Config = &$System->Config;
    $this->System = &$System;
  }
}

class System 
{
  var $Database;
  var $Config;
  
  function Init()
  {
    include('config.php');
    $this->Config = $Config;
    $this->Database = new mysqli($this->Config['Database']['Host'], $this->Config['Database']['User'], $this->Config['Database']['Password'], $this->Config['Database']['Database']);
    $this->Database->query('SET NAMES '.$this->Config['Database']['Charset']);
  }
  
  function GetMicrotime()
  {
    list($Usec, $Sec) = explode(' ', microtime());
    return ((float)$Usec + (float)$Sec);
  }  
} 

?>
