• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP UserClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: 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


示例3: __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


示例4: __construct

 public function __construct()
 {
     // echo "ta aqui.".UserClient::getTypeId();exit();
     if (!UserClient::isAlive() || UserClient::getTypeId() != Config::ADMIN_USER_TYPE_ID && UserClient::getTypeId() != Config::DEVELOPER_USER_TYPE_ID) {
         $urlTo = Navigation::getURI(Config::$URL_ROOT_APPLICATION);
         Navigation::redirect("backend/login/to/" . implode("/", $urlTo));
     }
 }
开发者ID:reytuty,项目名称:facil,代码行数:8,代码来源:DefautAdmin.php


示例5: 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


示例6: __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


示例7: insert

 /**
  * @return para poder inserir
  */
 public function insert()
 {
     //		echo "cocococo";exit();
     if (UserClient::getTypeId() == Config::DEVELOPER_USER_TYPE_ID) {
         return $this->createFormData();
     } else {
         Navigation::redirect("admin/");
     }
 }
开发者ID:reytuty,项目名称:facil,代码行数:12,代码来源:Home.php


示例8: __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


示例9: 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


示例10: getZipedFiles

 /**
  * envie por post uma array de ids de files, só os ids
  * file/get_ziped_files
  */
 public function getZipedFiles()
 {
     if (!UserClient::getId() > 0) {
         //nao tem permissao
         Navigation::redirect("405");
         exit;
     }
     $array_file_ids = DataHandler::getValueByArrayIndex($_POST, "file_id");
     //Debug::print_r($_REQUEST);
     $array_file_vo = array();
     if (is_array($array_file_ids)) {
         foreach ($array_file_ids as $id) {
             $FileVO = new FileVO();
             $Result = $FileVO->setId($id, TRUE);
             if ($Result->success == TRUE) {
                 $array_file_vo[] = $FileVO;
             }
         }
     } else {
         //erro, não é uma array, verifica se pelo menos é 1 único id
         $id = DataHandler::forceInt($array_file_ids);
         if ($id > 0) {
             //é um id único
             $FileVO = new FileVO();
             $Result = $FileVO->setId($id, TRUE);
             if ($Result->success == TRUE) {
                 $array_file_vo[] = $FileVO;
             }
         } else {
             //erro mesmo, esse dado é zoado, estoura excessão
             throw new Exception("No ids sended", 404);
             exit;
         }
     }
     //a pasta zip precisa existir
     DataHandler::createFolderIfNotExist("upload/zip/");
     //verifica o nome do arquivo baseado nos ids enviados conforme regra inventada agora
     $zip_name = "upload/zip/" . md5(implode("|", $array_file_ids));
     DataHandler::createFolderIfNotExist($zip_name);
     $zip_name = $zip_name . "/teto.zip";
     if (!file_exists($zip_name)) {
         //echo Debug::li($zip_name);exit();
         $Zip = new ZipArchive();
         $Zip->open($zip_name, ZipArchive::CREATE);
         foreach ($array_file_vo as $FileVO) {
             $url = $FileVO->getUrl();
             $array = explode("/", $url);
             $file = $array[count($array) - 1];
             $Zip->addFile($url, $file);
         }
         $Zip->close();
     }
     header("Location: " . Config::getRootPath($zip_name));
     exit;
 }
开发者ID:reytuty,项目名称:facil,代码行数:59,代码来源:File.php


示例11: 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


示例12: __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


示例13: __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


示例14: __construct

 public function __construct($arrayRestFolder = NULL)
 {
     //verifica se o sujeito está logado e se é admin
     if (!UserClient::isAlive()) {
         Navigation::redirect("admin/login");
     } else {
         if (UserClient::getTypeId() != Config::ADMIN_USER_TYPE_ID && UserClient::getTypeId() != Config::DEVELOPER_USER_TYPE_ID) {
             //o sujeito ou não está logado ou ele não é admin
             Navigation::redirect("admin/login");
         }
     }
     if ($arrayRestFolder != NULL) {
         $this->arrayVariable = Navigation::getVariableArraySlug($arrayRestFolder);
         $this->arrayRestFolder = $arrayRestFolder;
     }
 }
开发者ID:reytuty,项目名称:facil,代码行数:16,代码来源:GenericAdminController.class.php


示例15: 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


示例16: 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


示例17: 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


示例18: 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


示例19: 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


示例20: __construct

    public function __construct($request, $response) 
    {/*{{{*/
        parent::__construct($request, $response);
		
        $response->controller = $request->controller;
        $response->action = $request->action;

        if ($_SERVER['HTTP_HOST'] == 'wenda.health.msn.com.cn') 
        {
            $imageUrl = 'https://wenda.health.msn.com.cn/partner';
        }
        else
        {
            $imageUrl = 'http://i1.hdfimg.com/partner';
        }
        $response->imageUrl = $imageUrl;
        
        $scheduleImgsArray = Schedule::$imgsArray;
       	$scheduleColorArray = array('普通' => 'normal', '专家' => 'expert', '专科' => 'special', '特需' => 'unique', 
       						 '会诊' => 'consultation', '夜间' => 'night', '其他' => 'other');
       	
       	$response->scheduleImgsArray = $scheduleImgsArray;
       	$response->scheduleTimeArray = array('上午', '下午', '夜间');
       	$response->scheduleTimeArray1 = array('上', '下', '夜');
       	$response->scheduleColorArray = $scheduleColorArray;
       	
       	$keys = array('DoctorCount','HospitalCount');
		$response->configInfo = DoctorClient::getInstance()->getConfigInfo($keys);

        $this->_newUser = UserClient::getInstance()->getCurrentUser();
        $this->_newSpace = new NullEntity();
        if(false == $this->_newUser->isNull())
        {
            if($this->_newUser->hasSpace())
            {
                $this->_newSpace = DAL::get()->find('space', $this->_newUser->id);
            }
        }
        $response->_newSpace = $this->_newSpace;
        $response->newUser = $this->_newUser;
        $response->_newUser = $this->_newUser;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:42,代码来源:basecontroller.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP UserConfig类代码示例发布时间:2022-05-23
下一篇:
PHP UserClass类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap