<?php

if(!(isset($_SESSION['loggedin']) ? $_SESSION['loggedin'] : false)) {
	// If you are not logged in, you cant see this
	return false;
}
include_once('includes/projects/projects_components.php');

add_js_file('includes/projects/projects.js');

$toget = (isset($_GET['projects']) ? $_GET['projects'] : '');
$toget = check_vars($toget);

$content .= "<div class='center_container' id='project_main_container'>";
switch($toget) {
	case "edit_project":
		if($project_id = check_project_save()) {
			// Update with correct id
			$_GET['id'] = $project_id;
		}
		
		$this_var = array('id' => check_vars($_GET['id']));
		$content .= edit_project($this_var);
	break;
	default:
		$content .= project_main_page();
}
$content .= '</div>';


?>