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


PHP DBC::requireEquals方法代码示例

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


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

示例1: replenish

 public function replenish($request, $response)
 {/*{{{*/
     $intention = DAL::get()->find('intention', $request->intentionid);
     $user = $this->user;
     DBC::requireEquals($this->user->id, $intention->user->id, '你不能操作别人的数据');
     if($intention->isFromThread() && $intention->hasSpace())
     {
         DBC::requireTrue($intention->space->isCaseOpen(), '医生已经关闭咨询区,不能补充意向了');
     }
     $content = $request->content;
     $attachmentIds = array_filter(explode(",", $request->attachmentIds));
     $patient = $intention->patient;
     $intention = IntentionClient::getInstance()->replenishFromIntention($intention, Intention::SRC_WEB, $content, $attachmentIds);
     $url = $intention->getUrl();
     $url .= "&fromReplenish=1";
     $response->setRedirect($url);
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:intentioncontroller.php

示例2: deleteBingLi

 public function deleteBingLi($request,$response)
 {/*{{{*/
     $patientAttachment = DAL::get()->find('PatientAttachment', $request->paid);
     DBC::requireEquals($this->user->id, $patientAttachment->user->id, '你不能删除别人的病历');
     $user = $this->user;
     $paId = $request->paid;
     $pageNum = $request->p;
     $pageNum = ($pageNum > 0) ? $pageNum : 1;
     $pageSize = 15;
     BingliClient::getInstance()->doDelete($paId);
     $res =  BingliClient::getInstance()->getAllAttachment($user->id, $request->patientid, $type='', $pageNum, $pageSize);
     if(empty($res['patientattachment']))
     {
         $pageNum = $pageNum-1;
     }
     $response->setRedirect($response->router->urlfor('mycase/binglilist',array('p'=>$pageNum,'patientid'=>$request->patientid)));
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:17,代码来源:mycasecontroller.php

示例3: receiveProofSMS

	public function receiveProofSMS($request, $response)
	{/*{{{*/
		$orderId = $request->id;
		$order = DAL::get()->find('BookingOrder', $orderId);
        $proposal = $order->notification->proposal;
		DBC::requireEquals($order->userid, $this->user->id, '您无权操作别人的订单!');
			
		$now = XDateTime::now("Y-m-d H:i:s");
		$before1Schedule = $order->schedule->addDay(-1)->setHour("16")->setMinute("00");
		$before2Schedule = $order->schedule->addDay(-2)->setHour("20")->setMinute("00");
		//在加号日期两天之前显示的内容
		if($now < $before2Schedule)
		{
			$response->message = "<div align='left'>暂时不能领取加号凭证,<br/>请您在".date('Y-m-d H:i', strtotime($before2Schedule))."至".date('Y-m-d H:i', strtotime($before1Schedule))."到此页面领取加号凭证短信,若操作有困难,也可在".date('Y-m-d', strtotime($before1Schedule))."日9点半至16点致电客服协助您完成操作,客服电话".BookingOrder::BU_PHONE_1."</div>";
			MsgHtml::msg($response->message, 'http://'.URL_PREFIX.'passport.haodf.com/proposal/showbookinglist', array('delay' => 10, 'button' => 'back'));
			exit();
		}
		$response->order = $order;
		$response->proposal = $proposal;

	}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:21,代码来源:mybookingcontroller.php

示例4: showTelAccount

    public function showTelAccount($request, $response)
    {/*{{{*/

        /********开始:处理未支付的订单*******/
        $presentOrderId = $request->orderId;
        $response->orderId = $presentOrderId;
        $from = $request->from;

        $orderId4show = $request->orderId;
        if(Pay::ORDER_TYPE_FLOW == $from)
        {
            $orderId4show = $this->getFlowOrder($request, $response)->id;
        }
        $response->orderId4show = $orderId4show;

        $response->refId = 0; 
        $response->payType = 0; 
        $response->ceilPrice = null; 
        $response->from = ($from == self::FROM_TYPE_MSG) ? Pay::ORDER_TYPE_PRESENT : $from;
        $response->sourceType = $request->sourceType?$request->sourceType:0;
        $presentOrder = new NullEntity();
        $response->rechargePhone = $request->rechargePhone;
        $response->bankType = $request->getRequest('pay', PresentOrder::PAY_UNION_PAY);
        $response->isRecharge = (($presentOrderId == '' || $presentOrderId == 0 ) && $from == '')?true:false;
        $response->payType = $request->getRequest('pay', PresentOrder::PAY_UNION_PAY);

        if(Pay::ORDER_TYPE_FLOW != $from)
        {
            $cookie = new HdfCookie();
            $cookie->clear('rechargeSourceFlow');
        }

        if($from == Pay::ORDER_TYPE_PRESENT || $from == self::FROM_TYPE_MSG)
        {/*{{{*/
            if(false == empty($presentOrderId))
            {
                $presentOrder = DAL::get()->find_by_id_and_status('presentOrder', $presentOrderId, PresentOrder::STATUS_PAID_NO);
                if(($presentOrder->isNull() || $presentOrder->present->isValid() == false) && $from == self::FROM_TYPE_MSG)
                {
                    if (false == empty($presentOrder))
                    {
                        $presentOrder = DAL::get()->find_by_id('presentOrder', $presentOrderId);
                    }
                    $response->presentOrder = $presentOrder;
                    $response->space = $presentOrder->space;
                    $flow = new NullEntity();
                    if($presentOrder->patientid)
                    {
                        $flow = DAL::get()->find_by_patientid_and_spaceid('DoctorPatientRef', $presentOrder->patientid, $presentOrder->space->id);
                    }
                    $response->ref = $flow;
                    return 'notice';
                }
                DBC::requireEquals($presentOrder->user->id, $this->user->id, '您无权操作别人的订单!');
            }

            if($presentOrder->isNull())
            {
                $patientIds = array_keys($this->user->patients);
                $presentOrder = PresentClient::getInstance()->getOneUnpaidPresentOrderByPatientIds($patientIds);
            }

            if($presentOrder instanceof PresentOrder)
            {
                $response->presentOrder = $presentOrder;
                $response->present = $presentOrder->present;
                $response->space = $presentOrder->space;
                $response->price = $presentOrder->present->price;
                list($response->featAmount, $response->heartImgHtml) = ScoreClient::getInstance()->showFlagsforPage($presentOrder->space->user->id);
                $recycleTime = $presentOrder->getRecycleTime();
                $response->recycleTime = $recycleTime['recycleTime'];
                $response->countDown = (0 < $recycleTime['countDown'])?$recycleTime['countDown']:0;

                return 'payment';
            }
            /********结束:处理未支付的订单*******/
        }/*}}}*/
        if($from == Pay::ORDER_TYPE_FLOW)
        {/*{{{*/
           $price = 0;
           $response->refId = $presentOrderId; 
           if(false == empty($presentOrderId))
           {
               $ref = DAL::get()->find('DoctorPatientRef', $presentOrderId);
               DBC::requireEquals($ref->user->id, $this->user->id, '您无权操作别人的订单!');
               $product = ProductClient::getInstance()->getDoctorChargeFlowProduct($ref->space);
               $price = $product->salePrice;
               $response->space = $ref->space;
           }
           $response->price = $price;
           $response->countDown = 0;

           return 'payment';
        }/*}}}*/
        return 'default';
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:96,代码来源:telpaymentcontroller.php

示例5: receiveProofSMS

 public function receiveProofSMS($request, $response)
 {
     /*{{{*/
     $ref = DAL::get()->find('DoctorPatientRef', $request->refid);
     if ($ref->isNull()) {
         header('Location: ' . $this->space->url);
         return;
     }
     $orderId = $request->id;
     $order = DAL::get()->find('BookingOrder', $orderId);
     DBC::requireEquals($order->userid, $this->user->id, '您无权操作别人的订单!');
     $now = XDateTime::now("Y-m-d H:i:s");
     $beforeStartSchedule = $order->schedule->addDay(-1)->setHour("16")->setMinute("00");
     $beforeEndSchedule = $order->schedule->addDay(-2)->setHour("20")->setMinute("00");
     //在加号日期两天之前显示的内容
     if ($now < $beforeEndSchedule) {
         $response->message = "<div align='left'>暂时不能领取加号凭证,<br/>请您在" . date('Y-m-d H:i', strtotime($beforeEndSchedule)) . "至" . date('Y-m-d H:i', strtotime($beforeStartSchedule)) . "到此页面领取加号凭证短信,若操作有困难,也可在" . date('Y-m-d', strtotime($beforeStartSchedule)) . "日9点半至16点致电客服协助您完成操作,客服电话" . BookingOrder::BU_PHONE_1 . "</div>";
         $this->message($response->message, $response, array('url' => $ref->url));
     } else {
         $response->setRedirect($ref->url);
     }
 }
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:22,代码来源:bookingcontroller.php

示例6: replenish

 public function replenish($request, $response)
 {/*{{{*/
     $proposal = DAL::get()->find('proposal', $request->proposalid);
     $user = $this->user;
      DBC::requireEquals($this->user->id, $proposal->user->id, '你不能操作别人的数据');
     $content = $request->content;
     $attachmentIds = array_filter(explode(",", $request->attachmentIds));
     $src = Intention::SRC_WEB;
     $intention = IntentionClient::getInstance()->replenishByProposal($proposal, $src, $content, $attachmentIds);
     $url = $intention->getUrl();
     $url .= "&fromReplenish=1";
     $response->setRedirect($url);
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:13,代码来源:proposalcontroller.php

示例7: paybank

 public function paybank($request, $response)
 {/*{{{*/
     $response->title = "";
     $from = $request->getRequest("from", "");
     if ($from == Pay::ORDER_TYPE_FLOW)
     {
         $ref = DAL::get()->find('DoctorPatientRef', $request->orderid);
         DBC::requireEquals($ref->user->id, $this->user->id, '您无权操作别人的订单!');
         $response->order = $ref;
         $response->patientPhone = $ref->patient->mobile;
     }
     else
     {
         $order = $this->getPayable($request->orderid);
         if ($order->isNull())
         {
             $this->_exit404();
         }
         $response->order = $order;
         $response->patientPhone = $order->patient->mobile;
     }
     $response->from = $from;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:23,代码来源:telcontroller.php

示例8: modifyPasswordForUser

    private function modifyPasswordForUser(User $user, $oldPassword, $newPassword, $newPasswordSure)
    {/*{{{*/
        $errorMsg = "";
        if((empty($oldPassword) && empty($newPassword) && empty($newPasswordSure)))
        {
			$errorMsg = "您并未修改密码但成功修改了邮箱";
        }
        else
        {
            DBC::requireNotEmptyString($newPassword, '新密码不能为空');
            DBC::requireNotEmptyString($newPasswordSure, '确认密码不能为空');
            DBC::requireEquals($newPasswordSure, $newPassword, '新密码和确认密码不一致');
            
            if(false == $user->validatePassword($oldPassword))
            {
                $errorMsg = "原登录密码输入错误,请重新输入";
            }    
        }
        if(empty($errorMsg))
        {
            UserClient::getInstance()->updatePassword($user->id, $newPassword);
            DAL::get()->cleanCache('user', $user->id);
            $errorMsg = "修改密码或邮箱成功";
        }
           return $errorMsg;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:26,代码来源:usercontroller.php


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