<?
// This ensures all code knows it's being called by the bandTopia app
// If this variable is missing when another page is loaded.  It will redirect to bandTopia home.
define('IN_BANDTOPIA', "You're here!!!");

ini_set("display_errors","1");
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);

// Starts the processing for the page.
include ("include/pageStart.php");

// Set main html page to use for page
$template -> set_filenames(array(
	"body" => "cp_main.htm"));
	
// Start Navigation
$nav = '<a href="/index.php">Home</a>';

if(defined('LOGGEDIN')) {
	$template -> assign_block_vars("logged_in", array());
}
else {
	$template -> assign_block_vars("logged_out", array());
}

/******************************************************/
/*  Login Page                                        */
/******************************************************/
if($action == 'login') 
{
	$template -> assign_block_vars("page_login",array());
}
/******************************************************/
/*  Main Page                                         */
/******************************************************/
elseif($action == 'main')
{
	$template -> assign_block_vars("page_main",array());
	$profileOn = false;
	
	if(!is_null(ARTIST_ID)) {
		$template -> assign_block_vars("page_main.artist_cp",array());
	}
}
/******************************************************/
/*  Profile Page
/******************************************************/
elseif($action == 'profile')
{
	
}
else
{
	$template -> assign_block_vars("page_error",array());
	$template -> assign_block_vars("page_error.action", array());
}
if($action != 'login')
{
	//$template -> assign_block_vars("logout", array());
}

$template->assign_var('NAV',$nav);

include(INCLUDE_PATH."pageend.php");
?>