Campustream 1.0
A social network MQP for WPI
application/controllers/home.php
Go to the documentation of this file.
00001 <?
00002 
00007 class Home_Controller extends Controller {
00008         public $template = 'template/main';
00009         public $enable_session = true;
00010         
00015         public function index() {
00016         
00017                 if ($this->session->get('authenticated')) {
00018                         $view = new View('home/index_auth');
00019                         $view->user = sess::getUser();
00020                 } else {
00021                         $view = new View('home/index_unauth');
00022                         echo $view->render();
00023                         return true;    
00024                 }
00025                 
00026                 $this->template->active = 'home';
00027                 $this->template->content = $view->render();
00028                 echo $this->template->render();
00029                 
00030         }
00031 }