<?php

define("MODULE_DIR","./modules/billboard");
define("MODULE_DIR_ADMIN","../modules/billboard");

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


if($isAdmin){
	include_once(MODULE_DIR_ADMIN . '/billboard.classes.php');
}else{	
	include_once(MODULE_DIR . '/billboard.classes.php');
}

if($isAdmin && $action == "functions"){
	include_once(MODULE_DIR_ADMIN . '/billboard.functions.php');
}elseif($action == "functions"){
	include_once(MODULE_DIR . '/billboard.functions.php');	
}elseif($action == "template"){
	include_once(MODULE_DIR . '/billboard.functions.php');
	include_once(MODULE_DIR . '/billboard.template.php');	
}
elseif($action == "admin.manage"){
	include_once(MODULE_DIR_ADMIN . '/billboard.admin.manage.php');
}elseif($action == "upload_image"){
	include_once(MODULE_DIR_ADMIN . '/billboard.upload_image.php');
}

?>