Вход Регистрация
Файл: settings.php
Строк: 64
<?php

header
("pragma: no-cache");
header("Expires: Mon, 06 Jan 1990 00:00:01 GMT");
header"Content-Type: text/html; charset=koi8-r" );

error_reporting(E_ALL E_NOTICE);

if (!
defined('PATH_SEPARATOR')) {
    if (
stristr(PHP_OS'WIN')) {
        
define('PATH_SEPARATOR'';');
    } else {
        
define('PATH_SEPARATOR'':');
    }
}

$inc_path=ini_get('include_path');
$pr_path=realpath(dirname(__FILE__));
$add_path=$pr_path.PATH_SEPARATOR.$pr_path.'/include/'.PATH_SEPARATOR.$pr_path.'/include/smarty/'.PATH_SEPARATOR.$pr_path.'/include/pear/';
//ini_set('include_path',$inc_path.PATH_SEPARATOR.$add_path);
ini_set('include_path',$add_path.PATH_SEPARATOR.$inc_path);

define("PATH_MODULE"$pr_path.'/modules/');

$templ_path=$pr_path.'/template/';
$log_path=$pr_path.'/game_logs/';

include_once(
"Smarty.class.php");
include_once(
"DB.php");
include_once(
"module.php");
include_once(
"common_func.php");
include_once(
"time.php");
include_once(
"constants.php");
include_once(
"player.php");
include_once(
"log.php");


//smarty initialization
$smarty = new Smarty;
$smarty->compile_check true;
$smarty->template_dir $pr_path.'/template/';
$smarty->compile_dir $pr_path.'/template_c/';

$file_name=$pr_path."/db_connect.php";
if(
file_exists($file_name)){
 include_once(
$file_name);
}else{
 die(
"Db setting not found");
}

define('DRIVER_DSN'"mysql://$db_user:$db_passw@$db_host/$db_name_game");

$db =& DB::connect(DRIVER_DSN,false);
if (
DB::isError($db)) {
    
//header("Location: fail_db.php");
    
die($db->getMessage());
    exit();
}

$smarty->assign('PROJECT_NAME',PROJECT_NAME);
$head=$smarty->fetch($templ_path.'/head.tpl');
$smarty->assign('HEAD',$head);

?>
Онлайн: 0
Реклама