Jeff PHP framework
0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
|
00001 <?php 00028 class indexController extends controller { 00029 00035 function __construct() { 00036 00037 parent::__construct(); 00038 00039 $this->_cpath = dirname(__FILE__); 00040 00041 } 00042 00049 public function index() { 00050 00051 if($this->_registry->site=='admin') return $this->adminIndex(); 00052 00053 return $this->publicIndex(); 00054 00055 } 00056 00062 public function publicIndex() { 00063 00064 access::check('public_view', null, array("exitOnFailure"=>true)); 00065 00066 $this->_view->setTpl('index_public', array('css', 'index')); 00067 00068 return $this->_view->render(); 00069 } 00070 00076 public function userIndex() { 00077 00078 access::check('private_view'); 00079 00080 $this->_view->setTpl('index_user', array('css'=>'index')); 00081 00082 return $this->_view->render(); 00083 } 00084 00090 public function adminIndex() { 00091 00092 access::check('admin_view'); 00093 00094 $this->_view->setTpl('index_admin', array('css', 'index')); 00095 00096 return $this->_view->render(); 00097 00098 } 00099 00100 } 00101 00102 ?>