<?php

if(stripos($_SERVER['SCRIPT_NAME'],"/admin/")===false?false:true){
	include_once("../connect.php");
	include_once("../session.php");
}else{
	include_once("connect.php");
	include_once("session.php");
}

define("HEADERBANNER_MODULE_DIR","./modules/headerbanner");
define("HEADERBANNER_MODULE_DIR_ADMIN","../modules/headerbanner");

$action = $_REQUEST['a'];
$isAdmin = stripos($_SERVER['SCRIPT_NAME'],"/admin/")===false?false:true;

//die($_REQUEST['a']);
if($isAdmin){
	//include_once(HEADERBANNER_MODULE_DIR_ADMIN . '/headerbanner.functions.php');
}else{	
	//include_once(HEADERBANNER_MODULE_DIR . '/headerbanner.functions.php');
}

if($isAdmin && $action == "functions"){
	include_once(HEADERBANNER_MODULE_DIR_ADMIN . '/headerbanner.functions.php');
}elseif($action == "functions"){
	include_once(HEADERBANNER_MODULE_DIR . '/headerbanner.functions.php');	
}
elseif($action == "admin.manage"){
	include_once(HEADERBANNER_MODULE_DIR_ADMIN . '/headerbanner.admin.manage.php');
}elseif($action == "upload_image"){
	include_once(HEADERBANNER_MODULE_DIR_ADMIN . '/headerbanner.upload_image.php');
}

?>