Ejemplo n.º 1
0
 private function canSendPresent($patientId, $presentId = 0)
 {
     /*{{{*/
     $result = true;
     $msg = '';
     if ($presentId) {
         $present = DAL::get()->find('Present', $presentId, true);
         if ($present->isNull() || false == $present->isValid()) {
             $result = false;
             $msg = "礼物无效!";
         }
     }
     if ($result && $patientId) {
         $patient = DAL::get()->find('patient', $patientId);
         if ($this->user->id != $patient->user->id) {
             $result = false;
             $msg = "您不能给{$this->space->name}医生送礼物!";
         }
     }
     if ($result) {
         $sentCount = PresentClient::getInstance()->getTodaySentCount4Patient($patientId, $this->space->id, $this->user->id);
         if (PresentOrder::patientSendLimit($sentCount)) {
             $result = false;
             $msg = "您今天已经赠送了太多的礼物给" . $this->space->name . "医生!";
         }
     }
     return array($result, $msg);
 }
                        <div class="rechargeCenter f12">
<!--start presentRecharge-->
<div class="presentRecharge-present mt10">
<?php
$orderId = empty($refId) ? $presentOrder->id :$refId;
include_once('_banks.php'); ?>
    <!--start presentRecharge-way-->
    <div class="clearfix mt10">
<?php 
if($payType == "_payment_default")
{
    include_once("_payment_default.php");
}
else
{
    include_once(PresentOrder::getPayTemp($payType));
}
?>
    </div>
    <!--end presentRecharge-way-->
    <!--start presentRecharge-note-->
    <div class="presentRecharge-note clearfix mt10">
      <?php if($isPresent){?>
        <div class="fl presentRecharge-note-l">请注意:</div>
        <div class="fl presentRecharge-note-r fn">
            <p>未支付的礼物,系统将帮您保留到<?=$recycleTime?>(<span class="orange">剩余<span id="H"><?=intval($countDown/3600)?></span>小时<span id="m"><?=intval($countDown/60%60)?></span>分<span id="s"><?=intval($countDown%60)?></span>秒</span>),您也可以 <a class="unl" href="<?=$router->urlfor('telpayment/returnPresentOrder', array('from'=>'present', 'orderId'=>$presentOrder->id))?>">取消礼物</a>。</p>
            <p>客服电话(工作日9:30-19:00):<?=hdfPhoneNumber::PHONE_FENZHEN?>&nbsp;&nbsp; 客服邮箱&nbsp;&nbsp; pingtaifuwu@haodf.com</p>
            <?php if($payType == PresentOrder::PAY_UNDERLIN) { ?>
            <p class="red">银行汇款方式可通过柜台、ATM、网上银行、电话银行、手机银行等方式向我们的账户转账汇款。汇款请记清汇款时间、汇款方式、具体金额,完成后,请务必尽快联系我们核对到账情况,联系电话:<?=hdfPhoneNumber::PHONE_FENZHEN?>(工作日9:30-19:00),否则我们将无法帮您认领您的汇款。</p>
            <?php } ?>
        </div>