Ejemplo n.º 1
0
 /**
  * 弹窗——添加用户
  */
 public function userboxAction()
 {
     $this->_helper->layout->disableLayout();
     $id = $this->_request->getParam("id");
     if ($_SESSION['user']['Type'] == 1 && $_SESSION['user']['DeptID'] == 0) {
     } else {
         echo "非法访问";
         exit;
     }
     $DeptMapper = new Application_Model_DepartmentMapper();
     $arrDept = $DeptMapper->findAllDept();
     $this->view->arrDept = $arrDept;
     if (empty($id)) {
         $this->view->isEdit = 0;
     } else {
         $this->view->isEdit = 1;
         $UserMapper = new Application_Model_UserMapper();
         $User = $UserMapper->findUserByID($id);
         $this->view->User = $User;
     }
 }