/** * @brief 医生提出导出数据请求 * @author meihao * @exampleUrl http://dev.mobile-api.haodf.com/doctorapi/patientclub_postExportRequest?userId=1&email=11&xdoc=1 * * @Param $userId 用户id * @Param $email 邮箱地址 * * @Returns */ public function postExportRequest($userId, $email) {/*{{{*/ if(empty($email)) { $this->setErrorCode(817); return 0; } if(!Xstring::isEmail($email)) { $this->setErrorCode(818); return 0; } $user = DAL::get()->find('user', $userId); if($user->isNull()) { $this->setErrorCode(107); return 0; } $source = "客户端数据导出"; $content = "用户名:".$user->name."\n邮箱:".$email."\n"; $id = UserClient::getInstance()->addUserAdvice($source, $content, $user->id); if(empty($id)) { $this->setErrorCode(816); return 0; } $this->content = $id; }/*}}}*/
if( '' == $tel ) { MsgHtml::msg('请填写科室电话', '', array('button'=>'back')); } if( '' == $mobtel ) { MsgHtml::msg('请填写您的手机,以便与您联系。', '', array('button'=>'back')); } if( '' == $email ) { MsgHtml::msg('请填写您的邮箱,以便与您联系。', '', array('button'=>'back')); } elseif (!Xstring::isEmail($email)) { MsgHtml::msg('邮件格式错误,请正确填写您的邮箱。', '', array('button'=>'back')); } $verifyOk = Captcha::verify($request->door, XIpLocation::getIp(), 'dcapply', $user->id, $request->token); if($verifyOk != 1) { MsgHtml::msg('验证码输入错误', '', array('button'=>'back')); } $recipients = "*****@*****.**"; $title = "医生基本信息 (".date("y-m-d H:i").")"; $content = ""; $content .= "来自 ".$_SERVER['REMOTE_ADDR']." 的用户发送了一条医生信息, 内容如下:\n"; if ($from == 'search') $content .= "从搜索来的\n"; $content .= "所提交的医院科室: <a href='".$hospitalFaculty->getUrl()."' target=\"_blank\">".$hospitalFaculty->hospital->name.$hospitalFaculty->name."</a>\n"; $content .= "----------------------------------------------------------------------------\n";