コード例 #1
0
 public function doAddnewEducationAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $user = PR_Session::getSession(PR_Session::SESSION_USER);
     $UserID = $user["UserID"];
     $request = $this->getRequest();
     $params = $request->getParams();
     $core = new PR_Api_Core_CandidateClass();
     if (isset($params["display"])) {
         $params["display"] = 1;
     } else {
         $params["display"] = 0;
     }
     $result = $core->addEducation($UserID, $params["institution_name"], $params["title"], $params["startdate"], $params["enddate"], $params["comments"], $params["display"]);
     $return["success"] = 1;
     $response = $this->getResponse();
     $response->clearAllHeaders()->clearBody();
     $return = json_encode($return);
     $response->setHeader('Content-type', 'application/json');
     $response->setHeader('Content-Length', strlen($return), true)->setBody($return);
     // echo ("tetstt:<pre>");print_r($params);echo("</pre>");
 }