Created
December 30, 2009 14:27
-
-
Save kodi/266079 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function index(){ | |
$this->_switchHome(); | |
} | |
function _indexAdmin(){ | |
#show view | |
$this->view->show("home-admin"); | |
} | |
function _indexPublic(){ | |
#show view | |
$this->view->show("home-public"); | |
} | |
function _indexPublic(){ | |
#show view | |
$this->view->show("home-registered"); | |
} | |
function _switchHome(){ | |
if($user->isRegistered()){ | |
if($this->user->isAdmin()){ | |
$this->_indexAdmin(); | |
}else{ | |
$this->_indexRegistered(); | |
} | |
}else{ | |
$this->_indexPublic(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment