Пример #1
0
 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);
 }
Пример #2
0
" 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;
    ?>
">&nbsp;(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;