<?php
/**
* Index
*
* @name Index
* @verision ---
* @package ---
* @author Rashaud Teague <rashaud.teague@gmail.com>
* @since 03/04/2009
* @license GNU GPL
*/
session_start();
include 'main.php';

//deal with cache
if (!$security->check_session()) {
	if (isset($_GET['p']) && $_GET['p'] != '') {
		if ($pc->page_exists($_GET['p'])) {
			//if ($cache->check($_GET['p'])) {
				$pc->update_page_views($_GET['p']);
				if (!$cache->check($_GET['p'])) $cache->create($_GET['p'], true);
				$cache->get($_GET['p']);
				die();
			//}
		}
	}
}

include 'header.php';

if (isset($_GET) || sizeof($_GET) > 0) {
	main($_GET);
} else {
	main();
}

include 'footer.php';
?>