<?php

define("DOCUMENTSCANNER_MODULE_DIR","./modules/documentscanner");
define("DOCUMENTSCANNER_MODULE_DIR_ADMIN","../modules/documentscanner");

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

if($isAdmin && $action == "functions"){

	include_once(DOCUMENTSCANNER_MODULE_DIR_ADMIN . '/documentscanner.functions.php');
}elseif($action == "functions"){
	include_once(DOCUMENTSCANNER_MODULE_DIR . '/documentscanner.functions.php');
}
elseif($action == "admin.manage"){
	include_once(DOCUMENTSCANNER_MODULE_DIR_ADMIN . '/documentscanner.admin.manage.php');
}elseif($action == "upload_image"){
	include_once(DOCUMENTSCANNER_MODULE_DIR_ADMIN . '/documentscanner.upload_image.php');
}

?>
