public function update($request, $response) { $id = $request->id; //被修改的userid $userInfo = $request->data; //被修改的userid //获取当前操作用户id $user = UserClient::getInstance()->getCurrentUser(); $userInfo['modiferid'] = $user->id; $updateUser = DAL::get()->find('user', $id); $valueUserMobile = isset($userInfo['mobile']) ? UserClient::getInstance()->getSpaceByUserMobile($userInfo['mobile'], $id) : ''; if (isset($userInfo['mobile']) && $userInfo['mobile'] && false == XString::isMobile($userInfo['mobile'])) { $msg = "您填写的手机号码不合要求,请修改后重新提交"; } else { if ($updateUser->hasConfirmedSpace() && $updateUser->space->isDoctor() && isset($userInfo['mobile']) && $valueUserMobile) { $msg = "此手机号码已经绑定了注册医生,请重新确定手机号"; } else { if ($updateUser->hasSpace() && $userInfo['realName']) { //自动更新space上冗余的spacehostname SpaceClient::getInstance()->setProperties($id, array('name' => $userInfo['realName'])); } $userId = UserClient::getInstance()->modifyInfoNew($id, $userInfo); if ($userId) { $msg = "操作成功了 "; } else { $msg = "操作失败了 "; } } } if (DoctorComment::hasRightToUpdateUserContent($this->inspector->id)) { //获取被操作的用户 $operationedUser = DAL::get()->find('User', $request->id); $logId = S3LogClient::getInstance()->add($this->inspector, $operationedUser->getLogable()->action(UserLog::ACTION_ADMIN_CONTENT, $request->adminContent)); } $url = $response->router->urlfor('user/showuserdetail', array('id' => $id, 'msg' => $msg)); $response->setRedirect($url); }
" size="60"></td> </tr> <?php if ($privilege->value & Privilege::PRV_SECRETDATA_WRITE && isset($user->patientIndex)) { ?> <tr> <td align="right">信用值</td> <td><input name="data[patientIndex]" type="text" id="patientIndex" value="<?php echo $user->patientIndex; ?> "> (0-40)</td> </tr> <?php } ?> <? if(DoctorComment::hasRightToUpdateUserContent($inspector->id)) { ?> <tr> <td align="right">备注</td> <td><textarea name = "adminContent" id = "adminContent" rows="3" cols="64"></textarea></td> </tr> <? foreach ($logLists as $logList) { $logDto = CommentDoctorLog::load($logList); ?> <tr><td align="right"><?php echo $logList->ctime . ' ' . $logDto->ownerName; ?> 备注</td> <td><?php echo $logList->content;
public function addDoctorCommentPost($request, $response) {/*{{{*/ $dcId = $request->commentid; $dcpContent = $request->dcpContent; $doctorComment = DoctorCommentClient::getInstance()->getDoctorComment($dcId); if(mb_strlen($dcpContent, 'gbk') > 500) { MsgHtml::msg('你发表的内容超过500字限制', $doctorComment->getUrl(), array('delay' => '10', 'button' => 'back')); } Crumb::ensure(DoctorCommentClient::getInstance()->genCommentCrumbKey(), $request->crumb, self::TTL); $user = $this->curUser; if ($user->isNull()) { $user = DoctorComment::getGuestUser(); } $gid = UserClient::getInstance()->checkGuest(); try { $res = DoctorCommentPostClient::getInstance()->addDoctorCommentPost($doctorComment, $user, $dcpContent, XIpLocation::getIp(), $gid); } catch(BizException $ex) { MsgHtml::msg($ex->getMessage(), $doctorComment->doctor->getUrl(), array('delay' => '10', 'button' => 'close')); } $this->cleanUrlCache($doctorComment->getUrl()); $this->cleanUrlCache($doctorComment->doctor->getUrl()); $response->setRedirect($doctorComment->getUrl()."?from=1"); }/*}}}*/
} ?> <div class="placeholder"><?php echo $str; ?> </a> 时间 <?php echo $doctorComment->ctime->toString(); ?> </div> </div> <span class="info_tit">点评类型</span> <div class="info_con"> <div class="placeholder"> <?php echo DoctorComment::getCommentTypeDesc($doctorComment); ?> </div> </div> </div> <?php if ($doctor->commentdoctor->isNeedEvidence()) { ?> <div class="placeholder" style="margin-left:15px"> <span class="red">该点评需要上传缴费单</span></div> <?php } ?> <div class="doc_info"> <span class="info_tit">医生信息</span>