HEX
Server: Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 mod_fcgid/2.3.9 PHP/5.4.16
System: Linux dvm.vladweb.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: region-gk.ru (1016)
PHP: 7.3.33
Disabled: NONE
Upload Files
File: //home/temp/autoprokat.vladweb.ru/index.php
<?
	session_start();
	include("cfg/connect.inc.php");
	include("cfg/mysql.php");
	include("cfg/general.inc.php");
	include("cfg/lang.inc.php");  	//authorized login check echo    $_SESSION["login"];
//echo    $_SESSION["password"];
	include("./checklogin.php");  //echo    $_SESSION["login"];
//echo    $_SESSION["password"];
//exit;


foreach($_POST as $k=>$v){

$$k = $v;

}

	if (!isset($_SESSION["login"]) || !isset($_SESSION["password"])) //unauthorized
	{
		header("Location: access_admin.php");
	} 

	//logout?
	if (isset($_GET["logout"])) //logout
	{
		//show authorization form
		unset($_SESSION["login"]);
		unset($_SESSION["pass"]);
		header("Location: index.php?xyu!!!");
	}

	//init Smarty
	require 'smarty/Smarty.class.php';
	$smarty = new Smarty; //core smarty object
	$smarty_mail = new Smarty; //for e-mails


	//connect to database
	db_connect(DB_HOST,DB_USER,DB_PASS) or die (db_error());
	db_select_db(DB_NAME) or die (db_error());

	mysql_query ("set character_set_client='cp1251'"); 
mysql_query ("set character_set_results='cp1251'"); 
mysql_query ("set collation_connection='cp1251_general_ci'");
@mysql_query("/*!40101 SET NAMES 'cp1251' */");
	//set Smarty include files dir
	$smarty->template_dir = $template_path."/admin";


	//define smarty template
	$smarty->assign("admin_main_content_template", "default.tpl");




	// includes all .php files from includes/ dir
	$includes_dir = opendir("./includes/admin");
	$file_count = 0;
	while ( ($inc_file = readdir($includes_dir)) != false )
		if (strstr($inc_file,".php"))
		{
			include("./includes/admin/$inc_file");
			$file_count++;
		}


	//show Smarty output
	$smarty->display("index.tpl");

?>