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


PHP XString::toGbkDeep方法代码示例

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


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

示例1: modifyDoctorInfo

    /**
     * modifyDoctorInfo 
     * 修改医生信息 
     * @param mixed $userId 
     * @param mixed $infos 
     * @access public
     * @return void
     */
    public function modifyDoctorInfo($userId, $key, $value)
    {/*{{{*/
        $doctorOwner = DAL::get()->find_by_userid('DoctorOwner', $userId);
        if($doctorOwner->isNull())
        {
            $this->setErrorCode(819);
            return 0;
        }
        if($key == "sex")
        {
            $value = $this->getSexValue($value);
            if($doctorOwner->isSpace() == false)
            {
                //user实体性别的定义和doctor相反
                $value = $value ? 0 : 1;
            }
        }
        $inputInfos = array('sex', 'birthday', 'grade', 'educateGrade', 'specialize', 'intro');
        $infos = array();
        foreach($inputInfos as $info)
        {
            if($info == $key)
            {
                $infos[$info] = $value;
            }
            else if($doctorOwner->isSpace())
            {
                $infos[$info] = $doctorOwner->source->getInfoDataByKey($info); 
            }
        }
        if($doctorOwner->isSpace())
        {
            $grade = $infos['grade'];
            $infos = XString::toGbkDeep($infos);
            if (isset($infos['grade']) && ($infos['grade'] == 'zhuyuanyishi' || $grade == '住院医师'))
            {
                $infos['grade'] = '住院医师';
            }
            if (isset($infos['birthday']) && $infos['birthday'])
            {
                $infos['birthday'] = XDateTime::valueOf($infos['birthday']);
            }
            if (isset($infos['educateGrade']) && $infos['educateGrade'] == '无职称')
            {
                $infos['educateGrade'] = '';
            }
            DoctorClient::getInstance()->modifyByDoctor($doctorOwner->source->host->id, $infos);
        }
        else
        {
            $user = $doctorOwner->source->user; 
            $sex = isset($infos['sex']) ? $infos['sex'] : $user->sex;
            $birthday = isset($infos['birthday']) ? $infos['birthday'] : $user->birthday;
			UserClient::getInstance()->modifyInfo($user->id,$sex,$user->email,$user->phone,
			$user->mobile,(string)$birthday,$user->province,$user->city,$user->district);
        }
        $this->content = array('UserId'=>$userId);
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:66,代码来源:doctoruserdatabucket.php

示例2: stopAddSignPost

	public function stopAddSignPost($request, $response)
	{
		ini_set('display_errors', false); // json output do no error information
		$vars      = $request->var;
		$vars      = XString::toGbkDeep($vars);
		$beginTime = $vars["year1"].'-'.$vars['month1'].'-'.$vars['day1'].' '.$vars['time1'].':00:00';
		$endTime   = $vars["year2"].'-'.$vars['month2'].'-'.$vars['day2'].' '.$vars['time2'].':00:00';
		$beginTime = $beginTime;
		$endTime   = $endTime;
		$doctorUserId = $this->_newSpace->id;
		if ($beginTime > $endTime){
			
			echo json_encode(array(
				'status'   => 1,
				'content'  => XString::convertToUnicode('开始时间大于结束时间'),
			));
			exit;
		} else {
			$orderList = BookingClient::getInstance()->getSendSmsOrderList($this->_newSpace->id, $beginTime, $endTime);
			if (empty($orderList)){
				echo json_encode(array(
					'status'   => 1,
					'content'  => XString::convertToUnicode('选择时间内没有加号信息'),
					));
				exit;
			} else {
				foreach ($orderList as $order) {
					try {
						$user = DAL::get()->find('User', $this->_newSpace->id);
						BookingClient::getInstance()->doctorCancelOrder($user, $order->id);
					} catch(Exception $e) {
						$msg = '发送失败,原因是可能你已经发送过了';	
					}
				}
				$msg = '停诊通知已告知相应患者';
				echo json_encode(array(
					'status'   => 0,
					'content'  => XString::convertToUnicode($msg),
					));
				exit;
			}
		}
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:43,代码来源:admindoctorcontroller.php


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