<?php
class Projects extends Controller {
	public function Index($params) {
		return new View("Projects/index.view");
	}
	
	public function Manage($params){
		return new View("Projects/manage.view");
	}
	
	public function Create($params){
		Breadcrumbs::Add("Create", "/projects/create");
		$project=new Project();
		if (isset($params['submitProject'])){
			$project->ProjectTitle=$params['title'];
			$project->ProjectDescription=$params['description'];
			if (isset($params['type']))
				$project->ProjectType=$params['type'];
		}
		return new View("Projects/create.view",array("project"=>$project));
	}
}
