Exemplo n.º 1
0
 public function ajaxShowAction()
 {
     $globalId = (int) Request::getPOST('global-id');
     $problemInfo = OjProblemInterface::getById(array('id' => $globalId));
     if (empty($problemInfo)) {
         $this->renderError('题目不存在!');
     }
     if (!$problemInfo['hidden']) {
         $this->renderError('题目已经显示!');
     }
     OjProblemInterface::show(array('id' => $globalId));
     $this->setNotice(FrameworkVars::NOTICE_SUCCESS, '显示成功!');
     $this->renderAjax(0);
 }