<?php
include_once("../connect.php");
include_once("../functions.php");
include_once("../session.php");
define("PRINTCATALOG_MODULE_DIR","./modules/printcatalog");
define("PRINTCATALOG_MODULE_DIR_ADMIN","../modules/printcatalog");

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

if($isAdmin){

	include_once(PRINTCATALOG_MODULE_DIR_ADMIN . '/printcatalog.functions.php');
	
	include_once("../connect.php");
	include_once("../session.php");

}else{
	include_once("./connect.php");
	include_once("./session.php");
	include_once(PRINTCATALOG_MODULE_DIR . '/printcatalog.functions.php');
}

if($action == "functions"){
	include_once(PRINTCATALOG_MODULE_DIR_ADMIN . '/printcatalog.functions.php');
}else{
	include_once(PRINTCATALOG_MODULE_DIR_ADMIN . '/printcatalog.' . $action . '.php');
}

?>