<?php

define("LOSTSALE_MODULE_DIR","./modules/lostsale");
define("LOSTSALE_MODULE_DIR_ADMIN","../modules/lostsale");

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



if($isAdmin){
	
	//include_once(LOSTSALE_MODULE_DIR_ADMIN . '/lostsale.classes.php');
	include_once(LOSTSALE_MODULE_DIR_ADMIN . '/lostsale.functions.php');
	include_once("../connect.php");
	include_once("../session.php");

}else{
	include_once("./connect.php");
	include_once("./session.php");
	include_once(LOSTSALE_MODULE_DIR . '/lostsale.functions.php');
	//include_once(LOSTSALE_MODULE_DIR . '/lostsale.classes.php');
}


if($action == "report"){
	include_once(LOSTSALE_MODULE_DIR_ADMIN . '/lostsale.report.php');
}
if($action == "functions"){
	include_once(LOSTSALE_MODULE_DIR . '/lostsale.functions.php');
}
?>