<?php

define("LASTCUSTOMERPURCHASE_MODULE_DIR","./modules/lastcustomerpurchase");
define("LASTCUSTOMERPURCHASE_MODULE_DIR_ADMIN","../modules/lastcustomerpurchase");

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



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

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


if($action == "report"){
	include_once(LASTCUSTOMERPURCHASE_MODULE_DIR_ADMIN . '/lastcustomerpurchase.report.php');
}

if($action == "simplereport"){
	include_once(LASTCUSTOMERPURCHASE_MODULE_DIR_ADMIN . '/lastcustomerpurchase.simplereport.php');
}
if($action == "functions"){
	include_once(LASTCUSTOMERPURCHASE_MODULE_DIR . '/lastcustomerpurchase.functions.php');
}
?>