File: //var/www/bk/efi/eficenter.ru/old/index.php
<?
error_reporting(E_ALL);
ini_set("register_globals",1);
foreach($_GET as $k=>$v){ $$k=$v; }
foreach($_POST as $k=>$v){ $$k=$v; }
// -------------------------INITIALIZATION-----------------------------//
if(isset($HTTP_SERVER_VARS['HTTP_REFERER'])&&$HTTP_SERVER_VARS['HTTP_REFERER']=="http://sexyhit.ru")
{header("Location: http://eficenter.ru/"); exit;}
#include "./adm/counter_sess.php";
#include "./adm/counter.php";
//include core files
include("cfg/connect.inc.php");
include("cfg/mysql.php");
include("cfg/general.inc.php");
if(!class_exists('Mailer'))include("class.Mailer.php");
//connect to the database
db_connect(DB_HOST,DB_USER,DB_PASS) or die (db_error());
db_select_db(DB_NAME) or die (db_error());
//init Smarty
require './smarty/Smarty.class.php';
$smarty = new Smarty; //core smarty object
$smarty_mail = new Smarty; //for e-mails
//output
$smarty->assign("main_content_template", "$default_list");
//includes all of dir
$includes_dir = opendir("includes");
while ( ($inc_file = readdir($includes_dir)) != false )
if (strstr($inc_file,".php"))
{
include("includes/$inc_file");
}
//
//Smarty dirs
$smarty->compile_check = true;
$smarty->template_dir=$template_path;
$smarty->compile_dir='templates_c/';
$smarty->config_dir='./smarty/configs/';
$smarty->cache_dir='./smarty/cache/';
$smarty->caching = false;
//Smarty vars
$smarty->assign("page_title", $site_name." | ".$page_title);
$smarty->assign("page_description", $page_description);
$smarty->assign("page_key_words", $page_key_words);
$smarty->assign("home_url", $home_url);
$smarty->assign("site_name", $site_name);
$smarty->display($template_path."index.tpl");
?>