本文整理汇总了PHP中DBC::requireFalse方法的典型用法代码示例。如果您正苦于以下问题:PHP DBC::requireFalse方法的具体用法?PHP DBC::requireFalse怎么用?PHP DBC::requireFalse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBC
的用法示例。
在下文中一共展示了DBC::requireFalse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newPost
public function newPost($request, $response)
{
/*{{{*/
$verifyOk = Captcha::verify($request->verifyStr, XIpLocation::getIp(), 'article', $request->article_id, $request->token);
DBC::requireTrue($verifyOk, "您输入的验证码有误!");
//禁用词检查
$title = $request->title;
$result = DoctorClient::getInstance()->getProfanityCheck($title);
DBC::requireFalse($result['CODE'] < 0, "文章 评论添加失败");
DBC::requireFalse($result['CODE'] == 2, "文章 评论添加成功");
$title = $result['CONTENT'];
$content = htmlspecialchars($request->getRequest('content'), ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
$result = DoctorClient::getInstance()->getProfanityCheck($content);
DBC::requireFalse($result['CODE'] < 0, "文章 评论添加失败");
DBC::requireFalse($result['CODE'] == 2, "文章 评论添加成功");
$content = $result['CONTENT'];
$article = DAL::get()->find('article', $request->article_id);
$feilds = array();
$feilds['ip'] = XIpLocation::getIp();
$feilds['ipLocation'] = XIpLocation::getLocationArea();
$userId = $this->user->isNull() == false ? $this->user->id : '';
$comment = ArticleClient::getInstance()->addComment($article, $userId, $title, $content, $feilds);
squid::clean($article->getUrl(), true);
$this->message('您发表的评论已经提交,待网站审核通过后即可展示。', $response);
}
示例2: detail
public function detail($request, $response)
{/*{{{*/
$articleId = intval($request->getRequest('article_id', 0));
$article = DAL::get()->find('article', $articleId);
if($article->isNull())
{
$this->_exit404();
}
DBC::requireFalse($article->isDelete(), "文章已经被删除了!");
DBC::requireFalse($article->isShield(), "文章正在审核中!");
if ($article->isAuditing())
{
$result = $this->filterArticle($article);
if (false == empty($result['title']) || false == empty($result['content']))
{
DBC::requireFalse(true, "文章正在审核中!");
}
}
$isShare = $request->getRequest('isShare', '');
//分享文章阅读量统计
if(false == empty($isShare))
{
HitClient::getInstance()->increaseArticleHitsForShare($article->id);
}
$response->article = $article;
$response->topTitle = XString::truncate($article->title, 18);
$response->title = $article->title."_好大夫在线";
$articleAttachmentRef = new NullEntity();
if ($article->hasDocAttachment())
{
$articleAttachmentRef = ArticleClient::getInstance()->getValidAttachmentRef($article->id);
}
$response->articleAttachmentRef = $articleAttachmentRef;
}/*}}}*/
示例3: before
public function before($context)
{
parent::before($context);
$mark = DAL::get()->find('flowproposalmark', $context->request->markId);
DBC::requireFalse($mark->isNull(), '无效的标记');
$inspectNames = array($mark->inspector->user->name, 'lihao120', 'sunnysmell', 'lyly006', 'pilack');
$context->request->validAccess = in_array($context->response->curInspector->user->name, $inspectNames);
}
示例4: before
public function before($context)
{
/*{{{*/
parent::before($context);
$userInfo = $context->request->getCookie('userinfo');
$auditor = DAL::get()->find_by_userid('auditor', $userInfo['id']);
$followupAuditor = DAL::get()->find_by_auditorid_and_deleted('FollowupAuditor', $auditor->id, FollowupAuditor::DELETED_NO);
DBC::requireFalse($followupAuditor->isNull(), '没有权限, 不是随访审核员');
$context->response->followupAuditor = $followupAuditor;
$context->response->auditor = $auditor;
}
示例5: confirmToVisit
public function confirmToVisit($request, $response)
{/*{{{*/
$orderId = $request->id;
$order = DAL::get()->find('BookingOrder', $orderId);
//患者自己确认去就诊相当于患者电话确认
DBC::requireTrue(in_array($order->status, array(BookingOrder::STATUS_CONFIRM)), '当前状态不能领取加号凭证');
$now = XDateTime::now("Y-m-d H:i:s");
$before2Schedule = $order->schedule->addDay(-2)->setHour("20")->setMinute("00");
DBC::requireFalse($now < $before2Schedule, '当前状态不能领取加号凭证');
BookingClient::getInstance()->patientConfirmOrder($order->user,$orderId);
$response->order = $order;
}/*}}}*/
示例6: onlineBankPay
public function onlineBankPay($request,$response)
{
$bankid = $request->paycard;
$spaceid = $request->spaceid;
$productid = $request->productid;
$fuProduct = DAL::get()->find('FollowupProduct', $productid);
DBC::requireFalse($fuProduct->isNull(), '无效的随访商品');
$space = DAL::get()->find('space', $spaceid);
DBC::requireFalse($space->isNull(), '无效的随访space');
$realPrice = 0;//$fuProduct->price;
if($fuProduct->isNoPriceProduct())
{
$realPrice = $request->price;
DBC::requireTrue((int)$realPrice > 0, '无效的续费金额');
}
$order = FollowupClient::getInstance()->getFollowupOrder($this->user->id, $productid, $spaceid, $realPrice);
DBC::requireFalse($order->isNull(), '无效的订单');
$binds = array();
$binds['payType'] = FollowupOrder::PAYTYPE_ALIPAY;
$form = '';
if ($bankid == 'alipay')
{
$form = $this->getAlipayForm4FollowupOrder($order);
$binds['payType'] = FollowupOrder::PAYTYPE_ALIPAY;
}
else if($bankid == '00')//快钱
{
$form = $this->getQpayForm4FollowupOrder($order, $bankid);
$binds['payType'] = FollowupOrder::BANK_NAME_ONLLINE; //设置订单状态为网银支付
}
else//网银(支付宝纯网关)
{
$callbackUrl = BeanFinder::get('configs')->alipay_gateway_callback_url;
$frontUrl = BeanFinder::get('configs')->alipay_gateway_callback_returnurl;
$price = $order->price;//原价
//dodo::zhb 创建充值单
$depositeOrder = OrderClient::getInstance()->createDepositeOrder($this->user, $price,
DepositeOrder::RECHARGE_TYPE_ALIPAY, array($order));
$description = '';
$form = GatewayAlipay::getInstance()->getPayUrl($depositeOrder->id, Pay::TYPE_FOLLOWUPORDER, $price, $callbackUrl, $order->product->title, $order->product->title, $frontUrl, $bankid);
$binds['payType'] = FollowupOrder::PAYTYPE_ALIPAY;
}
$response->form = $form;
$response->orderId = $order->id;
FollowupClient::getInstance()->updateFollowupOrder($order->id,$binds);
unset($binds);
}
示例7: addAdwordPost
public function addAdwordPost($request, $response)
{
/*{{{*/
$vars = $request->vars;
$template = $request->template;
$adObjectList = $this->getAdObjectList($request, $response);
DBC::requireFalse(empty($adObjectList), "页面和位置不对应,请重新编辑");
DBC::requireTrue($vars['name'], "name不能为空");
DBC::requireTrue($vars['htmlContent'], "BAIDU广告不能为空");
$startTime = $vars['startTime'] . " " . $vars['startTimeHour'] . ":" . $vars['startTimeMinute'] . ":00";
$endTime = $vars['endTime'] . " " . $vars['endTimeHour'] . ":" . $vars['endTimeMinute'] . ":00";
$startTime = XDateTime::valueof($startTime);
$endTime = XDateTime::valueof($endTime);
$adstuffId = AdWordClient::getInstance()->addAd($vars['name'], $vars['htmlContent'], $startTime, $endTime, $adObjectList);
$this->cleanCacheUrls($adstuffId);
$response->setRedirect($response->router->urlfor("adword/{$template}", array('type' => 'vaild', 'msg' => '增加成功')));
}
示例8: updatePost
public function updatePost($request, $response)
{
$id = $request->id;
if (false == $id) {
$userId = $request->userId;
$content = $request->getRequest('content');
$source = $request->source;
$id = UserClient::getInstance()->addUserAdvice($source, $content, $userId);
} else {
$response->userAdvice = DAL::get()->find('UserAdvice', $id);
DBC::requireFalse($response->userAdvice->isNull(), '空对象');
$vars['content'] = $request->getRequest('content');
$vars['source'] = $request->source;
$admin = UserClient::getInstance()->getCurrentUser();
UserClient::getInstance()->modifyUserAdvice($id, $vars, $admin);
}
$response->setRedirect('/useradvice/edit?id=' . $id . '&msg=' . urlencode('操作成功'));
}
示例9: 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);
}/*}}}*/
示例10: __construct
public function __construct($request, $response)
{/*{{{*/
parent::__construct($request, $response);
$userId = UserClient::getInstance()->getCheckedSeed('id');
$this->curUser = new NullEntity();
$this->currentOwner = new NullEntity();
if ($userId)
{
$this->curUser = DAL::get()->find('user', $userId);
DBC::requireFalse($this->curUser->isNull(),"没有这个用户");
if (false == $this->curUser->isNull())
{
$this->currentOwner = TelOwnerClient::getInstance()->createOwner($this->curUser);
}
}
$response->curUser = $this->curUser;
$response->currentOwner = $this->currentOwner;
}/*}}}*/
示例11: edit
public function edit($request, $response)
{
/*{{{*/
$args = array();
foreach (array('id', 'name', 'note', 'cateIds', 'leaderId', 'enableCaseGroup') as $param) {
$args[$param] = $request->{$param};
}
DBC::requireFalse(0 == $args['leaderId'], '必须要选中一名组长');
if (false == is_array($args['cateIds'])) {
$args['cateIds'] = array();
}
if ($args['id']) {
$id = AuditorClient::getInstance()->updateGroup($this->auditor, $args);
} else {
$leader = DAL::get()->find('auditor', $args['leaderId']);
$args['id'] = AuditorClient::getInstance()->addGroup($this->auditor, $args['name'], $args['cateIds'], $leader, $args['note'], $args['enableCaseGroup']);
}
$this->genJS();
$url = $response->router->urlfor('group/show', array('id' => $args['id']));
$response->setRedirect($url);
}
示例12: addOrModifyRemitApplication
public function addOrModifyRemitApplication($request, $response)
{
/*{{{*/
$oldRemark = "";
if ($request->telRemitAppId) {
$this->execute($request->telRemitAppId, TelRemitApplication::STATUS_CANCEL, "取消认领记录");
$oldTelRemitApp = DAL::get()->find('telremitapplication', $request->telRemitAppId);
$oldRemark = $oldTelRemitApp->remark;
}
//$accountUser = DAL::get()->find('user',$request->accountUserId);
//$accountPatient = DAL::get()->find('patient',$request->accountPatientId);
$remitHour = $request->remitHour != "" ? $request->remitHour : 0;
$remitMinute = $request->remitMinute != "" ? $request->remitMinute : 0;
DBC::requireFalse($remitHour > 24 || $remitMinute > 60, '时间格式不对');
$dateInfos = explode('-', $request->remitTime);
$remitTime = mktime($remitHour, $remitMinute, 0, $dateInfos[1], $dateInfos[2], $dateInfos[0]);
$remitTime = XDateTime::valueOfTime($remitTime);
$params = array('accountUserName' => $request->userName, 'accountPatientName' => $request->patientName, 'patientMobile' => $request->patientMobile, 'remitProvince' => $request->remitProvince, 'remitCity' => $request->remitCity, 'remitBank' => $request->remitBank, 'remitAmount' => $request->remitAmount, 'remitUserName' => $request->remitUserName, 'remitChannel' => $request->remitChannel, 'remitTime' => $remitTime, 'collectAccount' => $request->collectAccount, 'remitAccount' => $request->remitAccount, 'remark' => $oldRemark);
$newTelRemitAppId = TelRemitApplicationClient::getInstance()->addTelRemitApplication($this->curInspector->user, TelRemitApplication::TYPE_CLAIM_MONEY, $params);
if ($request->remark) {
TelRemitApplicationClient::getInstance()->addRemark($newTelRemitAppId, $this->curInspector->user, $request->remark);
}
$response->setRedirect($response->router->urlfor('comprehensivetask/remitapplicationlist', array('applicationStatus' => TelRemitApplication::STATUS_UN_CLAIM)));
}
示例13: update
public function update($request, $response)
{
$id = $request->id;
$deleted = $request->deleted;
$post = null;
$ticket = DAL::get()->find('ticket', $request->ticketid);
if ($ticket->isNull()) {
if ($deleted) {
$post = new TrashDoctorCommentPost($id);
} else {
$post = new DoctorCommentPost($id);
}
} else {
if (false == $ticket->isWaiting()) {
echo '当前工单已经审核完了';
exit;
}
$post = $ticket->getInspectSource();
}
$response->commentPost = $post;
$response->ticket = $ticket;
DBC::requireFalse($response->commentPost->isNull(), '修改目标为空');
$response->title = '点评回帖编辑';
}
示例14: evaluation2Customer
public function evaluation2Customer($request, $response)
{
/*{{{*/
$customerId = $request->customerid;
$followupCustomer = DAL::get()->find('FollowupCustomer', $customerId);
DBC::requireFalse($followupCustomer->isNull(), '没找到改销售患者,请核对!');
$response->followupCustomer = $followupCustomer;
$followupCustomerEvealuation = DAL::get()->find_by_customerId('FollowupCustomerEvaluation', $customerId);
if (false == $followupCustomerEvealuation->isNull()) {
$response->followupCustomerEvealuation = $followupCustomerEvealuation;
}
}
示例15: ajaxSetUpdateSession
private function ajaxSetUpdateSession($request, $response)
{/*{{{*/
if (!session_id())
{
session_start();
}
$intentionInfos = $request->intentionInfos;
$params = array();
foreach ($intentionInfos as $key => $intentionInfo)
{
foreach ($intentionInfo as $type => $value)
{
DBC::requireFalse($type == 'diseaseInfos' && $value['diseaseName'] == "", "疾病信息不能为空");
$_SESSION['askUpdateMemory'][$request->intentionid][$type][$key] = XString::convertArrayToGbk($value);
}
}
}/*}}}*/