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


PHP UserClient::getInstance方法代码示例

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


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

示例1: __construct

 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;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:basecontroller.php

示例2: checkPassword

 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));
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:25,代码来源:adminpaymentcontroller.php

示例3: doSuggestion

   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;
   }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:34,代码来源:suggestioncontroller.php

示例4: before

	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, '您没有认领汇款权限');
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:8,代码来源:claimremitinterceptor.php

示例5: __construct

 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;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:9,代码来源:basecontroller.php

示例6: __construct

 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();
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:10,代码来源:basecontroller.php

示例7: before

    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;
    	}
    }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:10,代码来源:touchauthinterceptor.php

示例8: ajaxSetRead

	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;
	}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:12,代码来源:internalmessagecontroller.php

示例9: __construct

 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;
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:13,代码来源:basecontroller.php

示例10: __construct

    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;
    }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:15,代码来源:basecontroller.php

示例11: before

 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;
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:16,代码来源:adminauthinterceptor.php

示例12: before

 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;
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:followupauthinterceptor.php

示例13: before

    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;
    	}
    }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:testerauthinterceptor.php

示例14: modifyPost

 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)));
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:18,代码来源:projectoperatormgrcontroller.php

示例15: createConf

 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);
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:19,代码来源:meetingcontroller.php


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