當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。