<?php

define("WEEKLYPLANNER_MODULE_DIR","./modules/weeklyplanner");
define("WEEKLYPLANNER_MODULE_DIR_ADMIN","../modules/weeklyplanner");

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



if($isAdmin){
	include_once(WEEKLYPLANNER_MODULE_DIR_ADMIN . '/weeklyplanner.functions.php');
	include_once("../connect.php");
	include_once("../session.php");

}else{
	include_once("./connect.php");
	if(isset($_REQUEST['ext'])){
		
	}else{
		include_once("./session.php");	
	}
	if($action == "functions"){
		include_once(WEEKLYPLANNER_MODULE_DIR . '/weeklyplanner.functions.php');
	}else{
		include_once(WEEKLYPLANNER_MODULE_DIR . '/weeklyplanner.functions.php');	
	}
	
}

if($action == "manage"){
	include_once(WEEKLYPLANNER_MODULE_DIR_ADMIN . '/weeklyplanner.manage.php');
}

?>