<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts Multicart                     |
// +----------------------------------------------------------------------+
// | Authors: Programmer<programmer@armia.com>        		              |
// +----------------------------------------------------------------------+
// | Copyrights Armia Systems, Inc and iScripts.com � 2005                |
// | All rights reserved                                                  |
// +----------------------------------------------------------------------+
// | This script may not be distributed, sold, given away for free to     |
// | third party, or used as a part of any internet services such as      |
// | webdesign etc.                                                       |
// +----------------------------------------------------------------------+
?>
<?php

ini_set( 'session.cookie_httponly', 1 );
session_start();

/*-----------Multicart 2.0 Upgradation---------------*/
if(strcasecmp(basename($_SERVER['REQUEST_URI']),"install.php")==0){
;
}else{
	if (INSTALLED ===true) {
		;
	}else{

		if(strstr($_SERVER['PHP_SELF'],'admin') == TRUE || strstr($_SERVER['PHP_SELF'],'sellers') == TRUE || strstr($_SERVER['PHP_SELF'],'affiliates') == TRUE)
		{
		
			header("Location:../install/install.php");
			
			//exit;
		
		}
		else
		{
			header("Location:./install/install.php");
		}	
	}

}

/*-----------Multicart 2.0 Upgradation---------------*/

/*-----------Sql Injection Patch---------*/

$mystring = strtoupper($_SERVER['QUERY_STRING']);
$server_injec1=strpos($mystring, 'SELECT');
$server_injec2=strpos($mystring, 'UNION');
$server_injec3=strpos($mystring, 'BENCHMARK');

if (($server_injec1 === false) && ($server_injec2 === false) && ($server_injec3 === false) || ($server_injec1 === '0') && ($server_injec2 === '0') && ($server_injec3 === '0'))
{
	;
}//end if
else
{
	header('location:index.php');
	exit();
}//end else

/*-----------Sql Injection Patch---------*/
?>