예제 #1
0
 public function getUserAccessInfo($sql)
 {
     $db = RsvAcl_Model_DbTable_DbUserAccess::getAdapter();
     $stm = $db->query($sql);
     $row = $stm->fetchAll();
     if (!$row) {
         return NULL;
     }
     return $row;
 }
예제 #2
0
 public function updateStatusAction()
 {
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         $db = new RsvAcl_Model_DbTable_DbUserAccess();
         $user_type_id = $post['user_type_id'];
         $acl_id = $post['acl_id'];
         $status = $post['status'];
         $data = array('acl_id' => $acl_id, 'user_type_id' => $user_type_id);
         if ($status === "yes") {
             $where = "user_type_id='" . $user_type_id . "' AND acl_id='" . $acl_id . "'";
             $db->delete($where);
             echo "no";
         } elseif ($status === "no") {
             $db->insert($data);
             echo "yes";
         }
         //write log file
         $userLog = new Application_Model_Log();
         $userLog->writeUserLog($acl_id);
     }
     exit;
 }