Exemple #1
0
 private function _rolesAdd()
 {
     if ($this->_isPost()) {
         $addArr = array('role_value' => $_POST['role_value'], 'role_name' => $_POST['role_name'], 'description' => $_POST['description'], 'date_created' => CURRENT_TIME, 'date_updated' => CURRENT_TIME);
         if ($this->_modelRoles->add($addArr)) {
             $this->_utilMsg->showMsg('角色增加成功', 1, Tools::url(CONTROL, ACTION));
         } else {
             $this->_utilMsg->showMsg('角色增加失败', -2);
         }
     } else {
         $this->_utilMsg->createNavBar();
         $this->_view->set_tpl(array('body' => 'User/RolesAdd.html'));
         $this->_view->display();
     }
 }