<?php
/*
=================================================================
Bullet Energy - by White-Master 
-----------------------------------------------------------------
http://white-master.ru/
-----------------------------------------------------------------
Copyright (c) 2011 White-Master
=================================================================
Данный код защищен авторскими правами
=================================================================
Файл: ajax.class.php
=================================================================
*/
class BulletAjax
{
  public static $ajax_handler = null;
  protected static $dle_config = array();
  protected static $id_member = array();
  protected static $group_user = array();
  protected static $lang_local = array();
  protected static $modules_lang = array();
  protected static $modules_config = array();
  protected static $share = array();
  protected static $honor = array();
  protected static $moderator = array();
  protected static $group_config = array();
  protected static $treePermanent = array();
  protected static $translit_local = array();
  protected static $sys_cashe = array();
  protected static $title = array();
  protected static $router = array();
  protected static $question = array();
  protected static $linck = array();
  protected static $logged_is = false;
  protected static $login_hash = '';
  public function __construct()
  {
    global $config, $member_id, $user_group, $dle_login_hash, $is_logged, $bullet_energy_config, $bulletRouter;
    require_once (ENGINE_DIR . '/bullet_energy/classes/ajax_handler.class.php');
    require_once (ENGINE_DIR . '/bullet_energy/library/language/' . $config['langs'] . '/site.lng');
    if (!$bullet_energy_config['version']) {
      require_once (ENGINE_DIR . '/bullet_energy/data/forum_config.php');
    }
    if (!$bulletRouter['main']) {
      require_once (ENGINE_DIR . '/bullet_energy/data/router_param_type_' . $bullet_energy_config['is_cpu_type'] . '.php');
    }
    require_once (ENGINE_DIR . '/bullet_energy/classes/linck.class.php');
    require_once (ENGINE_DIR . '/bullet_energy/data/forum_share.php');
    self::$share = $share;
    self::$router = $bulletRouter;
    self::$dle_config = $config;
    self::$modules_lang = $bullet_energy_lang;
    self::$translit_local = $langtranslit;
    self::$modules_config = $bullet_energy_config;
    self::$linck = new BulletEnergyLinck(array('router' => self::$router, 'slash' => self::$modules_config['slash'], 'type' => self::$modules_config['is_cpu_type'], 'cpu' => self::$modules_config['cpu'], 'home' => self::$dle_config['http_home_url']));
    self::$lang_local = $langdates;
    self::$group_user = $user_group;
    self::$login_hash = $dle_login_hash;
    self::$logged_is = $is_logged;
    self::$id_member = $member_id;
    if (!self::$logged_is) {
      self::$id_member['user_group'] = 5;
    }
    $this->ajax_handler = new BulletAjaxHandler;
    self::$group_config = $this->ajax_handler->setGroupConfig();
    self::$moderator = $this->ajax_handler->setModerConfig();
    self::$treePermanent = $this->ajax_handler->setTreePermanentConfig();
    self::$question = $this->ajax_handler->setQuestionConfig();
    self::$sys_cashe = $this->ajax_handler->setSystemCasheGroup();
    self::$honor = $this->ajax_handler->setSystemHonor();
    self::$title = $this->ajax_handler->setTitle();
  }
}

?>