public function checkPassword($request, $response)
 {/*{{{*/
     $err = '';
     $password = $request->password;
     if ($password == '')
     {
         $err = '对不起,您的密码输入有误。请输入正确的密码。';
     }
     $nowAction = $request->parentaction ? $request->parentaction : 'index';
     $nowAction = $nowAction == 'showorderlist' ? $nowAction.'?type=5' : $nowAction;
     if(empty($err))
     {
         $user = UserClient::getInstance()->checkPassword($this->_newSpace->user->name, $password, time()+1200);
         if ($user->isNull())
         {
             $err = '对不起,您的密码输入有误。请输入正确的密码。';
         }
         else
         {
             $response->setRedirect($response->router->urlfor('adminpayment/'.$nowAction));
             return true;
         }
     }
     $response->setRedirect($response->router->urlfor("adminpayment/inputpassword?err=$err&parentaction=".$nowAction));
 }/*}}}*/
   public function doSuggestion($request, $response)
   {/*{{{*/
       $suggestion = iconv("utf8", "gbk", $request->suggestion);
       $contactInfo = iconv("utf8", "gbk", $request->contactInfo);
       if ($suggestion == '' || $suggestion == '请填写您在使用中遇到的问题(目前暂时不提供疾病咨询服务)')
       {
            echo '{"res":"failure", "msg":"请填写您在使用中遇到的问题!"}';
            return self::DIRECT_OUTPUT;
       }
       if ($contactInfo == '' || $contactInfo == '手机或邮箱')
       {
            echo '{"res":"failure", "msg":"请填写您的联系方式!"}';
            return self::DIRECT_OUTPUT;
       }
       $from = $request->from;

       $content = "来自 ".$from." 的用户(触屏版)发送了一条意见或建议, 内容如下:\n";
       $content .= "----------------------------------------------------------------------------\n";
       $content .= $suggestion."\n\n";
       $content .= "联系方式: $contactInfo\n";
       $content .= "----------------------------------------------------------------------------\n";
       $content .= XDateTime::now()->toString();
       $userId = 0;
       $result = UserClient::getInstance()->addUserAdvice('意见建议', $content, $userId);
       if ($result)
       {
            echo '{"res":"success"}';
        }
        else
        {
            echo '{"res":"failure", "msg":"对不起,信息提交失败!"}';
        }
        return self::DIRECT_OUTPUT;
   }/*}}}*/
Пример #3
0
 public function __construct($request, $response)
 {
     /*{{{*/
     parent::__construct($request, $response);
     $clients = array('auditorClient', 'threadCateClient', 'userClient', 'spaceClient', 'doctorClient', 'hospitalClient', 'hospitalFacultyClient', 'PatientClient', 'DoctorPatientPostClient', 'inspectClient');
     foreach ($clients as $client) {
         $this->{$client} = new ClientProxy($client);
     }
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     if ($userId) {
         $this->curUser = DAL::get()->find('user', $userId);
     } else {
         $this->curUser = new NullEntity();
     }
     $response->curUser = $this->curUser;
     $response->staticUrl = 'http://i1.hdfimg.com/in/case';
     $response->leftWidth = '40%';
     //$response->leftWidth = '43%';
     $response->controller = $request->controller;
     $response->action = $request->action;
     $response->showContent = $request->showContent;
     $this->user = $response->user;
     $this->curInspector = $response->curInspector;
     $this->auditor = $response->auditor;
     if (false == $this->auditor instanceof Auditor) {
         $auditor = $this->curInspector->getAuditorEntity4auditfront();
         $this->auditor = $auditor;
     }
     $response->args = array();
     $response->isAjax = $request->ajax_status;
 }
Пример #4
0
 public function __construct()
 {
     // echo "ta aqui.".UserClient::getTypeId();exit();
     if (!UserClient::isAlive() || UserClient::getTypeId() != Config::ADMIN_USER_TYPE_ID && UserClient::getTypeId() != Config::DEVELOPER_USER_TYPE_ID) {
         $urlTo = Navigation::getURI(Config::$URL_ROOT_APPLICATION);
         Navigation::redirect("backend/login/to/" . implode("/", $urlTo));
     }
 }
	public function before($context)
	{
        $userId = UserClient::getInstance()->getCheckedSeed('id');      
        $user = DAL::get()->mustFind('user', $userId);
        $inspector = DAL::get()->find_actived('inspector', $user);
        $hasClaimPaymentPower = $inspector->isInRenLingHuiKuanGroup();
        DBC::requireTrue($hasClaimPaymentPower, '您没有认领汇款权限');
	}
Пример #6
0
 public function __construct($request, $response)
 {
     parent::__construct($request, $response);
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     $this->curOperatorUser = DAL::get()->mustFind('user', $userId);
     $response->curOperatorUser = $this->curOperatorUser;
     $this->inspector = DAL::get()->find_actived('inspector', $this->curOperatorUser);
     $response->inspector = $this->inspector;
 }
Пример #7
0
 /**
  * @return para poder inserir
  */
 public function insert()
 {
     //		echo "cocococo";exit();
     if (UserClient::getTypeId() == Config::DEVELOPER_USER_TYPE_ID) {
         return $this->createFormData();
     } else {
         Navigation::redirect("admin/");
     }
 }
Пример #8
0
 public function __construct($request, $response)
 {
     parent::__construct($request, $response);
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     if ($userId) {
         $this->_newUser = DAL::get()->find('user', $userId);
     } else {
         $this->_newUser = new NullEntity();
     }
 }
    public function before($context)
    {
    	$userId = UserClient::getInstance()->getCheckedSeed('id');
    	$user = DAL::get()->find('user', $userId);
    	if($user->isNull())
    	{
    		header('Location: http://m.haodf.com/touch');
			exit;
    	}
    }
Пример #10
0
 /**
  * envie por post uma array de ids de files, só os ids
  * file/get_ziped_files
  */
 public function getZipedFiles()
 {
     if (!UserClient::getId() > 0) {
         //nao tem permissao
         Navigation::redirect("405");
         exit;
     }
     $array_file_ids = DataHandler::getValueByArrayIndex($_POST, "file_id");
     //Debug::print_r($_REQUEST);
     $array_file_vo = array();
     if (is_array($array_file_ids)) {
         foreach ($array_file_ids as $id) {
             $FileVO = new FileVO();
             $Result = $FileVO->setId($id, TRUE);
             if ($Result->success == TRUE) {
                 $array_file_vo[] = $FileVO;
             }
         }
     } else {
         //erro, não é uma array, verifica se pelo menos é 1 único id
         $id = DataHandler::forceInt($array_file_ids);
         if ($id > 0) {
             //é um id único
             $FileVO = new FileVO();
             $Result = $FileVO->setId($id, TRUE);
             if ($Result->success == TRUE) {
                 $array_file_vo[] = $FileVO;
             }
         } else {
             //erro mesmo, esse dado é zoado, estoura excessão
             throw new Exception("No ids sended", 404);
             exit;
         }
     }
     //a pasta zip precisa existir
     DataHandler::createFolderIfNotExist("upload/zip/");
     //verifica o nome do arquivo baseado nos ids enviados conforme regra inventada agora
     $zip_name = "upload/zip/" . md5(implode("|", $array_file_ids));
     DataHandler::createFolderIfNotExist($zip_name);
     $zip_name = $zip_name . "/teto.zip";
     if (!file_exists($zip_name)) {
         //echo Debug::li($zip_name);exit();
         $Zip = new ZipArchive();
         $Zip->open($zip_name, ZipArchive::CREATE);
         foreach ($array_file_vo as $FileVO) {
             $url = $FileVO->getUrl();
             $array = explode("/", $url);
             $file = $array[count($array) - 1];
             $Zip->addFile($url, $file);
         }
         $Zip->close();
     }
     header("Location: " . Config::getRootPath($zip_name));
     exit;
 }
	public function ajaxSetRead($request, $response)
	{
		$str = '';
		if (UserClient::getInstance()->isLogin() && $request->msgid)
		{
			$data = array('UserId' => $this->user->id, 'MsgId' => $request->msgid);
			StationLetterClient::getInstance()->setMsgRead($data['UserId'], $data['MsgId']);	
			$str = "²Ù×÷³É¹¦";
		}
		$response->callBack = $request->callback;
		$response->msg = $str;
	}
Пример #12
0
 public function __construct($request, $response) 
 {
     parent::__construct($request, $response);
     $configs = BeanFinder::get('configs');
     $response->imgUrl = $configs->imgUrl;
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     if ($userId)
         $this->_newUser = DAL::get()->find('user',$userId);
     else
         $this->_newUser = new NullEntity();
      
     $response->newUser = $this->_newUser;
 }
Пример #13
0
    public function __construct($request, $response) 
    {
        parent::__construct($request, $response);
        
        $response->_debugger = new Debugger();
        $response->_start = $response->_debugger->getTimeStamp();
        
        $userId = UserClient::getInstance()->getCheckedSeed('id');
		$this->user = DAL::get()->find('user', $userId);
		$this->tester = DAL::get()->find_by_userid('tester', $userId);
        $response->user  = $this->user;
		$response->tester = $this->tester;
		
		$response->preMsg = $request->preMsg;
    }
Пример #14
0
 public function __construct($arrayRestFolder = NULL)
 {
     //verifica se o sujeito está logado e se é admin
     if (!UserClient::isAlive()) {
         Navigation::redirect("admin/login");
     } else {
         if (UserClient::getTypeId() != Config::ADMIN_USER_TYPE_ID && UserClient::getTypeId() != Config::DEVELOPER_USER_TYPE_ID) {
             //o sujeito ou não está logado ou ele não é admin
             Navigation::redirect("admin/login");
         }
     }
     if ($arrayRestFolder != NULL) {
         $this->arrayVariable = Navigation::getVariableArraySlug($arrayRestFolder);
         $this->arrayRestFolder = $arrayRestFolder;
     }
 }
 public function before($context)
 {
     $spaceUserName = WebUtil::getSpaceUserName($context->request);
     $space = SpaceClient::getInstance()->getSpaceByUserName($spaceUserName);
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     $user = DAL::get()->find('user', $userId);
     if ($space->isNull()) {
         header('Location: http://www.haodf.com');
         exit;
     }
     if (empty($userId) || $space->user->id != $userId && false == $user->isAdmin()) {
         $msg = rawurlencode('你没有权限操作!');
         header('Location: ' . $space->getUrl() . 'index/showmessage?msg=' . $msg);
         exit;
     }
 }
 public function before($context)
 {
     $spaceUserName = WebUtil::getSpaceUserName($context->request);
     $space = SpaceClient::getInstance()->getSpaceByUserName($spaceUserName);
     $userId = UserClient::getInstance()->getCheckedSeed('id');
     $user = DAL::get()->find('user', $userId);
     if ($space->isNull()) {
         header('Location: http://www.haodf.com');
         exit;
     }
     $auditor = DAL::get()->find_by_userid('auditor', $userId);
     if (empty($userId) || $space->user->id != $userId && $userId != 6 && FollowupAssistantClient::getInstance()->hasAssistRights($userId, $space->id) == false && $auditor->isNull()) {
         $msg = rawurlencode('你没有权限操作!');
         header('Location: ' . $space->getUrl() . 'index/showmessage?msg=' . $msg);
         exit;
     }
 }
    public function before($context) 
    {
    	$spaceUserName = WebUtil::getSpaceUserName($context->request);
    	$space = SpaceClient::getInstance()->getSpaceByUserName($spaceUserName);
        /**
         * 测试医院下所有space只能在办公区访问 
         *
         **/
    	$userId = UserClient::getInstance()->getCheckedSeed('id');
    	$user = DAL::get()->find('user', $userId);
        $hdferUserNames = array('verygoodman', 'willowliu', 'dvsj', 'yangshiqi');
        if(in_array($user->name, $hdferUserNames) == false && $space->host instanceof Doctor && $space->host->hospitalfaculty->hospital->isInnerTestHospital() && false == RequestDelegate::isOfficeIp())
        {
    		header('Location: http://www.haodf.com');
			exit;
    	}
    }
 public function modifyPost($request, $response)
 {
     /*{{{*/
     $this->myProjectOperator->checkAdminAuthOrQuit('update');
     $projectOperatorId = $request->projectOperatorId;
     $userName = $request->userName;
     $user = UserClient::getInstance()->getByUserName($userName);
     DBC::requireTrue($user instanceof User, "User {$userName} 不存在.");
     $params = array();
     $params['userId'] = $user->id;
     $params['name'] = $request->name;
     $params['role'] = $request->role;
     $params['status'] = $request->status;
     $params['projectOrgId'] = $request->projectOrgId;
     ProjectOperatorClient::getInstance()->modifyProjectOperator($projectOperatorId, $params, $this->myProjectOperator->id);
     $preMsg = "操作员 {$projectOperatorId} 信息修改成功";
     $response->setRedirect($response->router->urlfor('projectoperatormgr/modify', array('preMsg' => $preMsg, 'projectOperatorId' => $projectOperatorId)));
 }
Пример #19
0
 public function createConf($request, $response)
 {/*{{{*/
     $orderid = $request->sId;
     $curOwner = $this->currentOwner;
     $adminTelephone = DAL::get()->find_by_ownerid('AdminTelephone',$curOwner->id);
     $order = DAL::get()->find('telorder', $orderid, true);
     $executer = $order->executer;
     DBC::requireFalse($executer->isNull(), '会议室里没有医生');
     $phones = array($adminTelephone->telselected, 
         $order->patient->getPatientExt()->phone1, 
         $order->patient->getPatientExt()->phone2,
         $executer->getSpaceExt()->phone1, 
         $executer->getSpaceExt()->phone2, 
         $executer->getSpaceExt()->phone3);
     $admin = UserClient::getInstance()->getCurrentUser();
     DBC::requireTrue($admin instanceof User ,'请先登录吧~');
     $teleconfId = MeetingClient::getInstance()->createMeeting($order->id, $phones, $admin->id, $admin->name, $order->getMeetingDuration());
     $response->setRedirect('/paymentfront/telorder/orderexecutenew?orderid='. $orderid);
 }/*}}}*/
Пример #20
0
    public function __construct($request, $response) 
    {/*{{{*/
        parent::__construct($request, $response);
		
        $response->controller = $request->controller;
        $response->action = $request->action;

        if ($_SERVER['HTTP_HOST'] == 'wenda.health.msn.com.cn') 
        {
            $imageUrl = 'https://wenda.health.msn.com.cn/partner';
        }
        else
        {
            $imageUrl = 'http://i1.hdfimg.com/partner';
        }
        $response->imageUrl = $imageUrl;
        
        $scheduleImgsArray = Schedule::$imgsArray;
       	$scheduleColorArray = array('普通' => 'normal', '专家' => 'expert', '专科' => 'special', '特需' => 'unique', 
       						 '会诊' => 'consultation', '夜间' => 'night', '其他' => 'other');
       	
       	$response->scheduleImgsArray = $scheduleImgsArray;
       	$response->scheduleTimeArray = array('上午', '下午', '夜间');
       	$response->scheduleTimeArray1 = array('上', '下', '夜');
       	$response->scheduleColorArray = $scheduleColorArray;
       	
       	$keys = array('DoctorCount','HospitalCount');
		$response->configInfo = DoctorClient::getInstance()->getConfigInfo($keys);

        $this->_newUser = UserClient::getInstance()->getCurrentUser();
        $this->_newSpace = new NullEntity();
        if(false == $this->_newUser->isNull())
        {
            if($this->_newUser->hasSpace())
            {
                $this->_newSpace = DAL::get()->find('space', $this->_newUser->id);
            }
        }
        $response->_newSpace = $this->_newSpace;
        $response->newUser = $this->_newUser;
        $response->_newUser = $this->_newUser;
    }/*}}}*/
Пример #21
0
 public function checkPhoneForTourist($request, $response)
 {/*{{{*/
     $buyerPhone = $request->buyerPhone;
     $userIds = UserClient::getInstance()->getIdsByUserPhone('user', $buyerPhone);
     $users = DAL::get()->find('user', $userIds);
     $userNames = array();
     foreach($users as $key => $value)
     {
         $userNames[] = $value->name;
     }
     if(empty($userNames))
     {
         echo 'fail';
         return parent::DIRECT_OUTPUT; 
     }
     else
     {
         $response->userNames = $userNames;
     }
 }/*}}}*/
Пример #22
0
	public function __construct($request, $response){
		//如果出现$user, $ssUser,则改为$newUser
		$userId = UserClient::getInstance()->getCheckedSeed('id');
        if($request->userId != null)
        {
            $userId = $request->userId;
        }
		if ($userId)
		    $this->_newUser = DAL::get()->find('user',$userId);
        else
            $this->_newUser = new NullEntity();
            	
        $response->newUser = $this->_newUser;
        
        $configs = BeanFinder::get('configs');
        $response->zixunBaseUrl = $configs->zixunBaseUrl;
        $response->imgBaseUrl = $configs->imgUrl;
		$response->domain = $request->getRequest('domain', URL_PREFIX.'zixun.haodf.com');
        $response->askSpace = AskSessionInfo::getBindSpace();
	}
Пример #23
0
    public function __construct($request, $response) 
    {/*{{{*/
        parent::__construct($request, $response);

        $userId = UserClient::getInstance()->getCheckedSeed('id');      
        $this->curUser = new NullEntity();
        $this->currentOwner = new NullEntity();
        if ($userId)
        {
            $this->curUser = DAL::get()->find('user', $userId);
    	    DBC::requireFalse($this->curUser->isNull(),"没有这个用户");
            if (false == $this->curUser->isNull())
            {
                $this->currentOwner = TelOwnerClient::getInstance()->createOwner($this->curUser);
            }
        }
        $response->curUser = $this->curUser;
        $response->currentOwner = $this->currentOwner;

    }/*}}}*/
Пример #24
0
 public function insert($echo_json = TRUE)
 {
     //para inserir imagem precisa estar logado como admin
     if (UserClient::getTypeId() == Config::ADMIN_USER_TYPE_ID && UserClient::getActiveTime() && UserClient::getActive()) {
         //se tiver ok, blz, o que me importa é o else
     } else {
         //exit();//sem explicações
     }
     $this->infoPost = new ImageInfoPostVO();
     $this->infoPost->file_data = $_FILES["Filedata"];
     //passando como null o table, ele não linka
     $this->infoPost->table = NULL;
     $retorno = parent::insert();
     if ($retorno->success) {
         //vai pegar a url da imagem
         include_once "library/facil3/core/modules/image/vo/ImageVO.class.php";
         $ImageVO = new ImageVO();
         $ImageVO->setId($retorno->result, TRUE);
         if ($this->infoPost->table_id) {
             //foi enviado para linkar, então pega o id
             $url = $ImageVO->getUrl();
             //pre-conceito na moral de que se uma imagem é enviada, é para produto
             include_once Config::FOLDER_APPLICATION . "modules/product_model/vo/ProductModelQuadroVO.class.php";
             $ProductModelQuadroVO = new ProductModelQuadroVO();
             $retorno_product = $ProductModelQuadroVO->setId($this->infoPost->table_id, TRUE);
             //ve se existe o produto
             if ($retorno_product->success) {
                 //atualiza url
                 $ProductModelQuadroVO->setQuadroImagePath($url);
                 //grava
                 $ProductModelQuadroVO->commit();
             }
         }
     }
     if ($echo_json) {
         echo utf8_encode($retorno->toJson());
         exit;
     } else {
         return $retorno;
     }
 }
Пример #25
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);
 }
 public function updatePost($request, $response)
 {
     /*{{{*/
     //dodo::psq
     $trustIndex = $request->getRequest('trustIndex', 0);
     $commentDoctorId = $request->getRequest('commentDoctorId', 0);
     $punishDay = $request->getRequest('punishDay', 0);
     $remark = $request->reason;
     $this->checkDates($trustIndex, $punishDay, $remark, $commentDoctorId);
     $user = UserClient::getInstance()->getCurrentUser();
     $commentDoctor = DAL::get()->find('commentdoctorext', $commentDoctorId);
     $punishEndTime = $this->getPunishEndTime($commentDoctor, $punishDay);
     $remarkOfDoctor = "医生信用值由<font color='red' >" . $commentDoctor->trustIndex . "</font>改成<font color='red'>" . $trustIndex . "</font>;" . ($punishDay > 0 ? "点评入口操作:惩罚时间到<font color='red'>" . $punishEndTime . "</font>" : "") . ($punishDay < 0 ? "点评入口操作:<font color='red'>打开点评口</font>" : ";") . "<br>管理员备注:<font color='red'>" . $remark . "</font>";
     $isRole = $this->checkRole($commentDoctor, $request->trustIndex);
     if ($isRole == false) {
         $response->setRedirect("/commentdoctor/edit?id=" . $commentDoctorId . "&msg=" . urlencode('更新失败,没有权限修改信用值'));
         return false;
     }
     $id = CommentDoctorExtClient::getInstance()->modify($commentDoctorId, $user, $remark, $trustIndex, $punishEndTime, $request->needevidence);
     if ($id) {
         S3LogClient::getInstance()->add($this->inspector, $commentDoctor->getLogable()->action(CommentDoctorLog::ACTION_MODIFY_DOCTORINFO, $remarkOfDoctor));
         $response->setRedirect("/commentdoctor/edit?id={$id}&msg=" . urlencode('更新成功'));
     }
 }
Пример #27
0
	public function _update($request, $response) {
		if ($request->confirm) {
			$title = $request->title;
			$id = ZhuantiTopicClient::getInstance()->update(array(
				'id' => $request->id, 
				'title' => $request->title,
				'content' =>$request->getUnSafeData('content'),
				'url' => $request->url,
				'doctorId' => $request->doctorId,
			    'img'=>$request->imgId
            ));	
            if (isset($_FILES['headimage']) && $_FILES['headimage']['tmp_name'] != '') {
                $doctor = DAL::get()->find('Doctor', $request->doctorId);
                $userId = $doctor->hasSpace() ? $doctor->space->user->id : 0;
                if ($userId != 0) {
                    $imgId = TuClient::getInstance()->uploadImage($_FILES['headimage']);
                    UserClient::getInstance()->updateHeadImage($userId, $imgId);
                }
            }
			$msg = '更新成功';
			$url = $response->router->urlfor('topic/edit', array ('id' => $request->id, 'msg' => $msg,'zhuantiid'=>$request->zhuantiid));
            $response->setRedirect($url);
		} 
		$topic = DAL::get()->find('topic', $request->id);   
		if($topic->doctorId != 0){
            $doctor = DAL::get()->find('doctor', $topic->doctorId);
            $headImageId = $doctor->hasSpace() ? $doctor->space->user->headImage : '';
            if (empty($headImageId) == false) {
                $response->headImageUrl = TuClient::getInstance()->getThumbnailUrl($headImageId, 200, 200, TuClient::TYPE_ZOOM);
            }
		    $response->doctor = $doctor;
		}
		$response->zhuanti = DAL::get()->find('zhuanti', $request->zhuantiid);      
	    $response->topic = $topic;
        $response->msg = $request->msg;
	}
 public function auth($request, $response)
 {
     /*{{{*/
     $userName = $request->field1;
     $password = $request->field4;
     $userToken = $request->bk2;
     if (false == empty($userName) && false == empty($password)) {
         $user = UserClient::getInstance()->checkPassword($userName, $password);
         if ($user->isNull()) {
             echo "系统错误,请联系技术人员!!!!";
             exit;
         } else {
             if (false == isset($_COOKIE['bk']) || $userToken != $_COOKIE['bk']) {
                 if (@setcookie('bk', $userToken, 0, '/', 'haodf.com')) {
                     $_COOKIE['bk'] = $userToken;
                 }
             }
             $ip = RequestDelegate::getIp();
             PrivilegeClient::getInstance()->bindUser($user->id, $userToken, $ip);
             echo "成功";
             exit;
         }
     }
 }
 /**
     * @brief 重置密码
     * @author meihao
     * @exampleUrl 
     *
     * @Param $userId
     * @Param $password
     * @Param $rePassword
     *
     * @Returns   
  */
 public function resetPassWord($applyId, $password, $rePassword)
 {/*{{{*/
     $user = DAL::get()->find('user', $applyId);
     if($password == '')
     {
         $this->setErrorCode(823);
         return 0;	
     }
     if ($password != $rePassword)
     {
         $this->setErrorCode(824);
         return 0;
     }
     if (!preg_match("/^[0-9a-zA-Z]{4,16}$/", $password))
     {
         $this->setErrorCode(8251);
         return 0;
     }
     if($this->isSimplePWD($password, $user->name))
     {
         $this->setErrorCode(825);
         return 0;
     }
     UserClient::getInstance()->updatePassword($applyId, $password);
     $this->content = array('message' => '修改成功');
 }/*}}}*/
    public function askOtherPeople($request, $response)
    {/*{{{*/
		UserClient::getInstance()->logout();
		$host_user_id = $request->getRequest('host_user_id', 0);
		$response->setRedirect('/hzhospitalthread/ask.htm?host_user_id='.$host_user_id);
	}/*}}}*/