Jeff PHP framework  0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
user.controller.php
Go to the documentation of this file.
00001 <?php
00028 class userController extends controller {
00029 
00033         private $_class_privilege;
00034 
00038         private $_admin_privilege;
00039 
00045         function __construct() {
00046 
00047                 parent::__construct();
00048 
00049                 $this->_cpath = dirname(__FILE__);
00050                 $this->_mdl_name = "user";
00051 
00052                 // privileges
00053                 $this->_class_privilege = $this->_mdl_name;
00054                 $this->_admin_privilege = 1;
00055         }
00056         
00063         public function manage() {
00064         
00065                 access::check($this->_class_privilege, $this->_admin_privilege, array("exitOnFailure"=>true));
00066 
00067                 $s_fields = array(
00068                         "password"=>array(
00069                                 "type"=>"password",
00070                                 "edit_lable"=>__("userEditPwdLabel")
00071                         ),
00072                         "groups"=>array(
00073                                 "type"=>"multicheck",
00074                                 "required"=>true,
00075                                 "value_type"=>'int',
00076                                 "table"=>TBL_SYS_GROUPS,
00077                                 "field"=>"label",
00078                                 "where"=>null,
00079                                 "order"=>"id"
00080                         )
00081                 );
00082 
00083                 $at = new adminTable(TBL_USERS, array("edit_deny"=>array(1)));
00084                 $at->setSpecialFields($s_fields);
00085 
00086                 $table = $at->manage();
00087 
00088                 $this->_view->setTpl('manage_table');
00089                 $this->_view->assign('title', __("ManageTable")." ".TBL_USERS);
00090                 $this->_view->assign('table', $table);
00091 
00092                 return $this->_view->render();
00093         }
00094 
00095 }
00096 
00097 ?>