商城支付流程

商城支付流程_第1张图片
{list site=SITE_ID action=module module=mall order=updatetime page=1 pagesize=5}

		

{dr_date(strtotime($t.inputtime),'Y年m月d日H时i分')}

{dr_strcut($t.title,24)}

{php $yuedu=dr_goumai($member.uid,$t.id);} {if !$member} {fc_lang('购买')} {else if $yuedu==1} {fc_lang('免费阅读')} {else} {fc_lang('购买')} {/if} {fc_lang('预览')} {if SITE_ID==1}

价格:¥{$t.order_price}

{else if SITE_ID===2}

PRICE:${$t.order_price}

{/if}
{/list}

调用购买的方法:

` function dr_goumai( u i d , uid, uid,id) {
if($uid){
$ci= &get_instance();
KaTeX parse error: Double subscript at position 19: …1="select imt_1_̲mall.*,imt_memb…uid and imt_member_paylog.status=1 and imt_1_mall.id=$id and imt_1_mall.id = imt_member_paylog.order_id";
d a t a = data= data=ci->db->query($sql1);
d a t a = data= data=data->result_array();
KaTeX parse error: Double subscript at position 27: …ct * from imt_1_̲mall where id=id and sfmf=0";
d a t a 2 = data2= data2=ci->db->query($sql2);
d a t a 2 = data2= data2=data2->result_array();

    if($data || $data2){
        return 1;
    }else{
        return 0;
    }
}else{
    
    $ci= &get_instance();
    $sql1="select imt_1_mall.*,imt_member_paylog.* from imt_1_mall,imt_member_paylog where imt_member_paylog.status=1 and imt_1_mall.id=$id and imt_1_mall.id = imt_member_paylog.order_id";
    $data=$ci->db->query($sql1);
    $data=$data->result_array();
    $sql2 ="select * from imt_1_mall where id=$id and sfmf=0";
    $data2=$ci->db->query($sql2);
    $data2=$data2->result_array();
    
    if($data || $data2){
        return 1;
    }else{
        return 0;
    }
}

}`
商城支付流程_第2张图片
商城支付流程_第3张图片

你可能感兴趣的:(php)