当前位置: 首页>>代码示例>>PHP>>正文


PHP XString::convertToGbk方法代码示例

本文整理汇总了PHP中XString::convertToGbk方法的典型用法代码示例。如果您正苦于以下问题:PHP XString::convertToGbk方法的具体用法?PHP XString::convertToGbk怎么用?PHP XString::convertToGbk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XString的用法示例。


在下文中一共展示了XString::convertToGbk方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: offlinePost

	public function offlinePost($request, $response)
	{
		$content = (string) $request->getUnSafeData('offline');
		if ($request->is_ajax)
			$content = XString::convertToGbk($content);
		
		$time = strtotime((string) $request->OfflineNoteValidTime);
		if ($time < time() && $content != '') {
			if ($request->is_ajax)
			{
				$results = array('status' => 1,'error' => XString::convertToUnicode('有效期必须在今天之后'),);
				echo json_encode($results);
				exit;
			} else {
				$this->message('有效期必须在今天之后', $response);
				return false;
			}
		}
		$note1 = htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
		SpaceClient::getInstance()->setProperties($this->_newSpace->id, array(
			'note1' => $note1,
			'offlineNoteValidTime' => $time
		));
		$this->buildBookingTask($note1);
		
		$this->message('停诊公告设置成功!', $response);
		if ($request->is_ajax) {
			
			$results = array('status' => 0, 'content' => XString::convertToUnicode($note1));
			echo json_encode($results);
			exit;
		}
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:33,代码来源:admindoctorcontroller.php

示例2: dealEvaluation

 public function dealEvaluation($request, $response)
 {
     /*{{{*/
     $this->privilegeManagement();
     //mark是标记,remark是备注
     $feedbackId = $request->id;
     $mark = $request->mark;
     $status = $request->status;
     $remark = $request->remark;
     $remark = XString::convertToGbk($remark);
     if (empty($remark)) {
         $remark = "";
     }
     UserFeedbackClient::getInstance()->dealEvaluation($feedbackId, $mark, $status, $remark, $this->curInspector->id);
     echo json_encode(array('success' => 1));
     return self::DIRECT_OUTPUT;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:userfeedbackcontroller.php

示例3: addAttach

	public function addAttach($request, $response) 
	{
		if (isset($_FILES['attach'])) {
			$file = $_FILES['attach'];
			if ($file['error']==0) {
                $file['name'] = XString::convertToGbk($file['name']);
                $file['name'] = TuClient::getInstance()->checkFileSuffixName($file);
                $filePath = TuClient::getInstance()->uploadAttach($file);
				$attach = AttachClient::getInstance()->addAttach($this->_newUser->id, $file['name'], $filePath, $file['type'], $file['size'], Attachment::TYPE_JPG, '', '');
				// 传入默认的patientid
				$bingLi = BingLiClient::getInstance()->addBingLi($this->_newUser->id, PatientAttachment::DEFAULT_PATIENTID, '', PatientAttachment::TYPE_PIC, 0, '', '', $attach->id);
				echo "<script>parent.tb_remove();parent.showMyAttach('el_my_attachment', 0, '".$bingLi->id."');</script>";
				//echo "<script>parent.showMyAttach('el_my_attachment', 0, '".$bingLi->id."');</script>";
			} 
		}
		exit();
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:attachcontroller.php

示例4: uploadFUAttachment

    public function uploadFUAttachment($userId, $checkupTicketId)
    {/*{{{*/
        $user = DAL::get()->find('user', $userId);
        if($user->isNull())
        {
            $this->setErrorCode(107);
            return 0;
        }
        if(empty($checkupTicketId))
        {
            $this->setErrorCode(401);
            return 0;
        }
        $followupOwner = $user->getFollowupPatientSignin();
        if (false == $followupOwner->isNull())
        {
            $patient = $followupOwner->patient;
        }
        if (isset($_FILES['content']))
        {
			$file = $_FILES['content'];
            if ($file['error']==0)
            {
                $file['name'] = XString::convertToGbk($file['name']);
                $file['name'] = TuClient::getInstance()->checkFileSuffixName($file);
                $filePath = TuClient::getInstance()->uploadAttach($file);
				$attach = AttachClient::getInstance()->addAttach($userId, $file['name'], $filePath, $file['type'], $file['size'], Attachment::TYPE_JPG, '', '');
				$bingLi = BingLiClient::getInstance()->addBingLi($userId, $patient->id, '', PatientAttachment::TYPE_PIC, 0, '', '', $attach->id);
                NfsClient::getInstance()->addAttachmentCheckupReportFromMbi($followupOwner, $bingLi->id, $checkupTicketId);
            }
            else
            {
                $this->setErrorCode('165');
                return 0;
            }
        }
        else
        {
            $this->setErrorCode('164');
            return 0;
        }
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:42,代码来源:followupdatabucket.php

示例5: ajaxPostMotto

 /** 设置网站座右铭 */
 public function ajaxPostMotto($request, $response)
 {
     /*{{{*/
     $mottoUtf8 = $request->motto;
     $motto = XString::convertToGbk($mottoUtf8);
     SpaceClient::getInstance()->setProperties($this->space->id, array('motto' => $motto));
     $results = array('res' => 'success', 'motto' => XString::convertToUnicode(trim($mottoUtf8) ? $mottoUtf8 : "编辑网站座右铭"));
     echo json_encode($results);
     return self::DIRECT_OUTPUT;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:11,代码来源:adminsetupcontroller.php

示例6: diseaseThread

 private function diseaseThread($request, $response)
 {
     /*{{{*/
     $lastCommonCaseNote = $this->space->commonCaseNote;
     $diseasesGbk = XString::convertToGbk($request->diseases);
     SpaceClient::getInstance()->setProperties($this->space->id, array('commonCaseNote' => $diseasesGbk));
     if ($lastCommonCaseNote != $diseasesGbk) {
         SpaceChangeLogClient::getInstance()->addLog($this->space->id, SpaceLog::$type[SpaceLog::SPACE_LOG_TYPE_CASE], $lastCommonCaseNote);
     }
     DZoneClient::getInstance()->replaceSpaceAttribute($this->space->id, Space::ATTR_RECOMMEND_COMMONCASENOTE_UPDATED, 1);
     $diseasesGbk = strlen($diseasesGbk) > 0 ? $diseasesGbk : '暂无';
     return $diseasesGbk;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:13,代码来源:adminthreadcontroller.php

示例7: ajaxSendInviteSMS

 public function ajaxSendInviteSMS($request, $response)
 {/*{{{*/
     $ownerId = $request->ownerid;
     $mobile = $request->mobile;
     $invateName = XString::convertToGbk($request->invatename);
     $myName = XString::convertToGbk($request->myname);
     $contentSelect = XString::convertToGbk($request->contentselect);
     $invateCode = XString::convertToGbk($request->invatecode);
     $content = "{$invateName}你好,我是{$myName}, 我通过好大夫在线与大夫直接通话,{$contentSelect}你也可以试试,预约时填写我的邀请码{$invateCode},即可获得10元优惠(限第一单)";
     $inviteLog = DAL::get()->find_by_ownerid_and_mobile('invitelog', $ownerId, $mobile);
     if((false == $inviteLog->isNull() && $inviteLog->cnt <= 3) || $inviteLog->isNull())
     {
         SMSClient::getInstance()->sendSMS(array($mobile), $content, SMSLog::OPT_TYPE_TEL_ZIXUN);
         TelOrderClient::getInstance()->createInviteLog($ownerId, $mobile, $content);
         echo 1;
     }
     return parent::DIRECT_OUTPUT;                                                                               
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:18,代码来源:telpaymentcontroller.php

示例8: searchDoctorAssistant

 /**
  * ajaxSearchDoctorAssistant
  * 查询医生助手
  * @author wangxiang 
  * @param mixed $request 
  * @param mixed $response 
  * @access public
  * @return void
  */
 public function searchDoctorAssistant($request, $response)
 {
     /*{{{*/
     $inspectorName = $request->inspectorName;
     $inspectorName = XString::convertToGbk($inspectorName);
     $response->inspectors = DAL::get()->find_all_byRealNameOrUserName('Inspector', $inspectorName);
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:16,代码来源:supdoctorcontroller.php

示例9: saveHopeHelp

 public function saveHopeHelp($request, $response)
 {/*{{{*/
     try{
         $hopeHelp = XString::convertToGbk($request->hopehelp);
         $hopeHelpDto = BingLiDto::createHopeHelpDto($hopeHelp);
         AskSessionInfo::modifyHopeHelp($hopeHelpDto);
         $hopeHelp = $hopeHelpDto->hopeHelp;
         echo nl2br($hopeHelp);
         return parent::DIRECT_OUTPUT; 
     }
     catch (IllegalWordsException $ex){
         echo '非法词汇';
         return parent::DIRECT_OUTPUT; 
     }
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:15,代码来源:newcasecontroller.php

示例10: ajaxAskFlow

 public function ajaxAskFlow($request, $response)
 {
     /*{{{*/
     $caseTitle = $request->getRequest('case_title', '');
     $response->case_title = XString::convertToGbk($caseTitle);
     $src = $request->getRequest('src', '');
     $response->src = $src;
     $srcflag = $request->getRequest('srcflag', '');
     $response->srcflag = $srcflag;
     $url = empty($srcflag) ? $this->space->getAskUrl() : $this->space->getAskUrlNoSrcflag() . '&srcflag=' . $srcflag;
     if ($this->user->isNull()) {
         $response->redirectUrl = $url . '&case_title=' . urlencode($response->case_title) . '&src=' . urlencode($src);
     }
     $flows = DAL::get()->find_all_by_spaceid_and_userid_and_status('doctorpatientref', $this->space->id, $this->user->id, DoctorPatientRef::STATUS_INIT);
     if (false == empty($flows)) {
         $response->refs = $flows;
     } else {
         $response->redirectUrl = $url . '&case_title=' . urlencode($response->case_title) . '&src=' . urlencode($src);
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:20,代码来源:indexcontroller.php

示例11: addPost

 public function addPost($request, $response)
 {/*{{{*/
     if ($response->isQQ)
     {
         $user = $this->checkLogin($request, $response);  
     }
     $arr = array();
     $arr['content'] = XString::convertToGbk($request->post_content);
     $user = UserClient::getInstance()->getCurrentUser();
     if (false == $user->isNull())
     {
         ThreadClient::getInstance()->userAddPostOrSpaceReply($user, $request->id, $arr);
     }
     $thread = DAL::get()->find('thread', $request->id);
     $response->setRedirect("/thread/detail.htm?id=".$thread->id);
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:16,代码来源:threadcontroller.php

示例12: ajaxDiseasePost

	public function ajaxDiseasePost($request, $response)
	{
        $lastCommonCaseNote = $this->_newSpace->commonCaseNote;
		$diseasesGbk = XString::convertToGbk($request->diseases);
        SpaceClient::getInstance()->setProperties($this->_newSpace->id, 
				array('commonCaseNote'=>$diseasesGbk));
        $spaceUserId = $this->_newSpace->id;
        if($lastCommonCaseNote != $diseasesGbk)
        {
            $type = SpaceLog::$type[SpaceLog::SPACE_LOG_TYPE_CASE];
            SpaceChangeLogClient::getInstance()->addLog($spaceUserId, $type, $lastCommonCaseNote);
            //非医生本人更改,记录到审核日志
            if($this->_adminIsLogin)
            {
                RecommendThreadCategoryClient::getInstance()->pushUserLog($spaceUserId, User::ADMIN_USERID, '更新了咨询范围');
            }
        }
		DZoneClient::getInstance()->replaceSpaceAttribute($this->_newSpace->id, Space::ATTR_RECOMMEND_COMMONCASENOTE_UPDATED, 1);
        $diseasesGbk = strlen($diseasesGbk) > 0? $diseasesGbk: '暂无';
		$commonCaseNoteMessage = array('status' => 0, 'disease' => XString::convertToUnicode($diseasesGbk));
	    $response->commonCaseNoteMessage = json_encode($commonCaseNoteMessage);
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:22,代码来源:adminthreadcontroller.php

示例13: ajaxSetSession

 public function ajaxSetSession($request, $response)
 {/*{{{*/
     if (!session_id())
     {
         session_start();
     }
     $_SESSION['flowMemory'][$request->refId]['content'] = XString::convertToGbk($request->postContent);
     $_SESSION['flowMemory'][$request->refId]['attachIds'] = $request->attachIds;
     return self::DIRECT_OUTPUT;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:10,代码来源:casecontroller.php

示例14: ajaxPostOffline

 public function ajaxPostOffline($request, $response)
 {
     /*{{{*/
     $content = (string) $request->getRequest('offline');
     $content = XString::convertToGbk($content);
     $time = strtotime((string) $request->OfflineNoteValidTime);
     if ($time > time()) {
         $note1 = htmlspecialchars($content, ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
         SpaceClient::getInstance()->setProperties($this->space->id, array('note1' => $note1, 'offlineNoteValidTime' => $time));
         $this->buildBookingTask($note1);
         $results = array('res' => 'success', 'content' => XString::convertToUnicode(trim($note1) ? $note1 : "暂无停诊公告"));
         echo json_encode($results);
     } else {
         echo '{"res":"failure", "msg":"有效期必须在今天之后"}';
     }
     return self::DIRECT_OUTPUT;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:admindoctorcontroller.php

示例15: notePost

 public function notePost($request, $response)
 {
     /*{{{*/
     $patientNote = $request->patient_note;
     if ($request->is_ajax) {
         $patientNote = XString::convertToGbk($patientNote);
     }
     SpaceClient::getInstance()->setProperties($this->space->id, array('vipCaseNote' => $patientNote));
     $this->message('提交欢迎词成功,将在1个工作日内审核后生效!', $response);
     if ($request->is_ajax) {
         echo json_encode(array('status' => 0));
         exit;
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:14,代码来源:adminpatientcontroller.php


注:本文中的XString::convertToGbk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。