1 Star 1 Fork 0

雪饮 / jt.hoheng.cn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
a.php 3.20 KB
一键复制 编辑 原始数据 按行查看 历史
雪饮 提交于 2020-02-08 15:40 . no message
<?php
function detail()
{
global $_W;
global $_GPC;
$id = intval($_GPC['id']);
$log = pdo_fetch('select * from ' . tablename('ewei_shop_creditshop_log') . ' where id=:id and uniacid=:uniacid limit 1', array(':id' => $id, ':uniacid' => $_W['uniacid']));
$log['goods_num'] = max(1, intval($log['goods_num']));
if (empty($log))
{
$this->message('兑换记录不存在!', referer(), 'error');
}
$member = m('member')->getMember($log['openid']);
$goods = $this->model->getGoods($log['goodsid'], $member, $log['optionid']);
$goods['money'] *= $log['goods_num'];
$goods['credit'] *= $log['goods_num'];
if (empty($goods['id']))
{
$this->message('商品记录不存在!', referer(), 'error');
}
$set = m('common')->getPluginset('creditshop');
$canexchange = true;
if ($log['status'] == 2)
{
if (empty($log['paystatus']))
{
$canexchange = false;
}
if (empty($log['dispatchstatus']) && (0 < $log['dispatch']))
{
$canexchange = false;
}
if (($goods['isverify'] == 1) && empty($log['storeid']))
{
$canexchange = false;
}
}
else
{
$canexchange = false;
}
$log['canexchange'] = $canexchange;
$verifys = array();
if (!(empty($goods['isverify'])))
{
if (0 < $log['merchid'])
{
if (!(empty($log['storeid'])))
{
$verifys = pdo_fetchall('select cv.verifytime,cv.verifier,s.storename,s.address,m.realname,m.nickname,m.mobile from ' . tablename('ewei_shop_creditshop_verify') . ' as cv' . "\r\n\t\t\t" . ' left join ' . tablename('ewei_shop_merch_store') . ' as s on s.uniacid = cv.uniacid and s.id = cv.storeid and s.merchid = cv.merchid' . "\r\n\t\t\t" . ' left join ' . tablename('ewei_shop_member') . ' as m on m.openid = cv.verifier and m.uniacid = cv.uniacid ' . "\r\n\t\t\t" . ' where cv.logid = :logid and cv.uniacid = :uniacid order by cv.verifytime DESC ', array(':logid' => $log['id'], ':uniacid' => $_W['uniacid']));
}
}
else if (!(empty($log['storeid'])))
{
$verifys = pdo_fetchall('select cv.verifytime,cv.verifier,s.storename,s.address,m.realname,m.nickname,m.mobile from ' . tablename('ewei_shop_creditshop_verify') . ' as cv' . "\r\n\t\t\t" . ' left join ' . tablename('ewei_shop_store') . ' as s on s.uniacid = cv.uniacid and s.id = cv.storeid' . "\r\n\t\t\t" . ' left join ' . tablename('ewei_shop_member') . ' as m on m.openid = cv.verifier and m.uniacid = cv.uniacid ' . "\r\n\t\t\t" . ' where cv.logid = :logid and cv.uniacid = :uniacid order by cv.verifytime DESC ', array(':logid' => $log['id'], ':uniacid' => $_W['uniacid']));
}
}
else
{
$address = iunserializer($log['address']);
$address = array_filter($address);
if (empty($address))
{
$address = pdo_fetch('select realname,mobile,address,province,city,area from ' . tablename('ewei_shop_member_address') . ' where id=:id and uniacid=:uniacid limit 1', array(':id' => $log['addressid'], ':uniacid' => $_W['uniacid']));
}
}
include $this->template();
}
1
https://gitee.com/xy220807/jt.hoheng.cn.git
git@gitee.com:xy220807/jt.hoheng.cn.git
xy220807
jt.hoheng.cn
jt.hoheng.cn
master

搜索帮助