Пример #1
0
 function getBannerAction()
 {
     $request = $this->getRequest();
     if ('POST' == $request->getMethod()) {
         $ssotoken = $this->post()->get("ssotoken");
     } else {
         $ssotoken = $this->get("ssotoken");
     }
     $bannerModel = new SchoolModel();
     $userModel = new UserModel();
     $uid = $userModel->getUserId($ssotoken);
     if (is_array($uid)) {
         $this->displayJsonUdo(Common_Error::INVALID_TOKEN, "", $uid['msg']);
     }
     $banner = $bannerModel->getBanner($uid);
     if (!$banner) {
         $this->displayJsonUdo(Common_Error::ERROR_FAIL, "fail");
     }
     $this->displayJsonUdo(Common_Error::ERROR_SUCCESS, $banner);
 }