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