public static function getInstance() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; }
ExceptionDataBase::$log_type = 'file'; ExceptionDataBase::$log_file = ENGINE_DIR . "/car-market/logs/database.log"; ExceptionAllError::$log_type = 'file'; ExceptionAllError::$log_file = ENGINE_DIR . "/car-market/logs/errors.log"; } require_once ENGINE_DIR . "/Core_modules/TemplateUser.php"; $template = new TemplateUser($tpl, 'car-market/'); $template->setBasePath($config['http_home_url']); require_once ENGINE_DIR . "/Core_modules/Timer.php"; $timer = new Timer($_TIME); if ($db->mysql_extend == 'MySQLi') { require_once ENGINE_DIR . "/Core_modules/MySQLi_DLE.php"; $base = new MySQLi_DLE($db, $timer, $tables, PREFIX . "_"); } else { require_once ENGINE_DIR . "/Core_modules/MySQL_DLE.php"; $base = new MySQL_DLE($db, $timer, $tables, PREFIX . "_"); } if (!$base->isConnect()) { $base->Connect(DBHOST, $port = '', DBUSER, DBPASS, DBNAME, $usepconnect = false, COLLATE); } require ENGINE_DIR . "/car-market/classes/CarMarketUser.php"; $auto = new CarMarketUser($base, $car_conf, $lang_car, $member_id, $other_fields_array, $checkboxes_array); $auto->tpl =& $template; //$auto->tpl->lang['go_to_back'] = $auto->lang['go_to_back']; include_once ENGINE_DIR . '/car-market/classes/Fields.php'; $auto->xfields = new Fields($base, $auto); $template->use_alt_url = $auto->config['general_mod_rewrite']; if ($auto->config['general_main_page']) { $template->main_alt_url = substr($config['http_home_url'], 0, strlen($config['http_home_url']) - 1); $template->main_url = $PHP_SELF; } else {
$tpl->setBasePath($config['http_home_url']); Licencing::$tpl =& $tpl; Func::$tpl =& $tpl; require ENGINE_DIR . "/Core_modules/Timer.php"; $timer = new Timer($_TIME); if (file_exists(ENGINE_DIR . '/data/car-market_conf.php')) { require_once ENGINE_DIR . '/data/car-market_conf.php'; } else { $tpl->msg('Error', $lang_car['module_not_installed']); } if ($db->mysql_extend == 'MySQLi') { require ENGINE_DIR . "/Core_modules/MySQLi_DLE.php"; $base = new MySQLi_DLE($db, $timer, $tables, PREFIX . "_"); } else { require ENGINE_DIR . "/Core_modules/MySQL_DLE.php"; $base = new MySQL_DLE($db, $timer, $tables, PREFIX . "_"); } require ENGINE_DIR . "/car-market/classes/CarMarketAdmin.php"; $auto = new CarMarketAdmin($base, $car_conf, $lang_car, $config['version_id'] < 7.5 ? $member_db : $member_id, $other_fields_array, $checkboxes_array); Func::$obj =& $auto; if (get_magic_quotes_gpc() && function_exists('array_map_recursive')) { array_map_recursive('stripslashes', $_GET); array_map_recursive('stripslashes', $_POST); array_map_recursive('stripslashes', $_COOKIE); array_map_recursive('stripslashes', $_REQUEST); } $action = empty($_REQUEST['action']) ? '' : $_REQUEST['action']; $subaction = empty($_REQUEST['subaction']) ? '' : $_REQUEST['subaction']; $id = intval($_REQUEST['id']) ? intval($_REQUEST['id']) : 0; $auto->currency_array = array('USD' => $auto->lang['USD'], 'RUR' => $auto->lang['RUR'], 'EUR' => $auto->lang['EUR']); $auto->sort_array = array('cost' => $auto->lang['sort_cost'], 'race' => $auto->lang['sort_race'], 'date' => $auto->lang['sort_date'], 'year' => $auto->lang['sort_year']);