<?php

require_once("includes/config.php");
require_once("includes/global.php");

if (empty($users['authed']))
{
	redirects("login.php");
}
else{
	$theme="v1";
	
$charcount = getCharacterCount($users['id']);
$accounttype = getCharacterType($users['id']);
}
$account=getAccounts($users['id']);

if (isset($_GET['p'])) {
	if($_GET['p']!='validate' && $account['validated']==0){
		redirects("index.php?p=validate");
	}

/*
	if($_GET['p']!='create' && $charcount==0 && $account['validated']==1){
		redirects("index.php?p=create");
	}
*/
}


require_once("theme/".$theme."/header.php");
require_once("theme/".$theme."/navbar.php");
require_once("theme/".$theme."/content.php");
require_once("theme/".$theme."/footer.php");

?>