db = &$db;
    // default config
    $this->html_cfg = array
    (
/*      "charset" => "utf-8",
      "author" => "Zork",
      "copyright" => "(C) 2008 Heroes of Fantasy, All rights reserved.",
      "favicon" => "imgs/fav",
      "title" => "Heroes of Fantasy",
      "description" => "Heroes of Fantasy free WoW server běžící na programu MaNGOS",
      "keywords" => "wowserver, world of warcraft, free, wow, server, hof, heroes of fantasy, zdechov, mangos"
*/    );
    if((count($values) > 1) or ($values[0] != 0) and ($values[0] != 0))
    {
      $result_cfg = array_merge ($this->html_cfg, $values);
      foreach($result_cfg as $name => $value)
        $this->{$name} = $value;
    } else
    {
      foreach($this->html_cfg as $name => $value)
        $this->{$name} = $value;
    }
  }
  
  function Link($Path)
  {
    global $Config;
    
    if(substr($Path, 0, 1) == '/') return($Config['Web']['BaseURL'].$Path);
    return($Path);
  }
  private function CfgChck($value)
  {
    if(isset($this->{$value}))
    {
      return($this->{$value});
    } else
    {
      return('Undefined');
    }
  }
  public function Start()
  {
    global $Config;
    
    $code = ''.
    ''.
    ''.
    '
'.
    ''.$Config['Web']['Title'].' '.
    '
          
            
            Správa účtu 
             
             
          
            ');  
  }
  public function PrgStop()
  {
    echo(' 
         
      
         
      
');
  }
  function HumanDate($Time)
  {
    $Date = explode(' ', $Time);
    $Parts = explode('-', $Date[0]);
    if($Date != '0000-00-00') return(($Parts[2]*1).'.'.($Parts[1]*1).'.'.$Parts[0]);
    else return(' ');
  }
  
  function ShowNews()
  {
    global $Config, $db;
    
    $db->select_db($Config['Database']['Database']);
    $Output = '';
    /*$Output = ''.
      '';
    $DbResult = $db->query('SELECT * FROM ArticleCategory');
    while($Category = $DbResult->fetch_assoc())
    {
      $Output .= ''.$Category['Name'].' Vše  
'.
          ''.
          ''.$Article['Title'].' '.$this->HumanDate($Article['Time']).' '.
          ' '.
          ''.
          ''.$Content.' '.
          ' '.
          /*''.
          'Sekce : '.$Article['CategoryName'].'  '.
          ''.$Article['Author'].' '.
          ' '.*/
          '
'.
          ''.$this->PageList('page_index', $Page, $TotalCount, $Config['Web']['TableRowPerPage'], 10).'
';
    return($Output);
  }
  function QuickNew()
  {
    global $server, $Config, $System, $html;
    
    // Check servers online state.
    $DbResult = $System->Database->query('SELECT COUNT(*) FROM Logon WHERE Online = 1 AND Enabled=1');
    $DbRow = $DbResult->fetch_row();
    $OnlineState = $DbRow[0] > 0; // Report online state if one of all servers is online.
    if(isset($_COOKIE['hof-quick']) AND $_COOKIE['hof-quick'] == 'no')
    {
    } else
    {
      echo('<<  ';
        $QueryStringArray[$QueryStringVar] = $Page - 1;
        $Result .= '<  ';
      }
      $PagesMax = $Count - 1;
      $PagesMin = 0;
      if($PagesMax > ($Page + $Around)) $PagesMax = $Page + $Around;
      if($PagesMin < ($Page - $Around))
      {
        $Result .= ' .. ';
        $PagesMin = $Page - $Around;
      }
      for($i = $PagesMin; $i <= $PagesMax; $i++)
      {
        if($i == $Page) $Result .= '';
        $QueryStringArray[$QueryStringVar] = $i;
        $Result .= ''.($i + 1).'  ';
        if($i == $Page) $Result .= ' ';
      }
      if($PagesMax < ($Count - 1)) $Result .= ' .. ';
      if($Page < ($Count - 1)) 
      {
        $QueryStringArray[$QueryStringVar] = $Page + 1;
        $Result .= '>  ';
        $QueryStringArray[$QueryStringVar] = $Count - 1;
        $Result .= '>> ';
      }
    }
    return($Result);
  }
}
?>