Exemplo n.º 1
0
 public function action()
 {
     //页面展示
     $AdminAjaxModel = new AdminAjaxModel();
     $result = $AdminAjaxModel->getResult();
     $type = $result['params']['safe']['type'];
     if ($type == 'user') {
         $DaoUser = new DaoUser();
         $result = $DaoUser->getUserInfoByUsername($result['params']['safe']['userName']);
         if ($result) {
             echo '1';
         } else {
             echo '0';
         }
     } else {
         if ($type == 'fenlei') {
             $DaoFenlei = new DaoFenlei();
             $result = $DaoFenlei->getFenleiInfoByName($result['params']['safe']['fenleiName']);
             if ($result) {
                 echo '1';
             } else {
                 echo '0';
             }
         }
     }
 }