本文整理汇总了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;
}
示例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));
}/*}}}*/
示例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;
}/*}}}*/
示例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, '您没有认领汇款权限');
}
示例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;
}
示例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();
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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)));
}
示例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);
}/*}}}*/