打赏页源码——支持二开

文章目录[隐藏]

bdb9869eda232007

本打赏页源码支持支付宝、QQ、微信、财付通渠道打赏,支持二开,带有后台管理。

源码内可以自己添加打赏列表,也有累计打赏统计,但是没有写对接数据库之类的信息,可以自己加一下。

打赏列表:

把69~78行的代码替换为

<?php
$data = curl_get($alipay_config['apiurl'] . "api.php?act=orders&limit=10&pid=" . $alipay_config['partner'] . "&key=" . $alipay_config['key'] . "&url=" . $_SERVER["HTTP_HOST"]);
$arr = json_decode($data, true);
if ($arr["code"] == 0 - 2)sysmsg("易支付配置信息有误!");
echo "<div class=\"col-xs-12 col-sm-10 col-lg-8 center-block\" style=\"float: none;\"><div class=\"panel panel-primary\"><div class=\"panel-heading\" style=\"background: linear-gradient(to right,#b221ff,#14b7ff,#8ae68a);\"><center><font color=\"#000000\"><b>大佬们的打赏记录</b></font></center></div><div class=\"table-responsive\">\r\n<table class=\"table table-striped\">\r\n<thead><tr><th>订单号</th><th>打赏方式</th><th>打赏金额</th><th>状态</th></tr></thead>\r\n<tbody>";
	foreach ($arr["data"] as $res) {
	echo "<tr><td>" . $res["trade_no"] . "</td><td>".($res['type']=='qqpay'?'QQ':null).($res['type']=='wxpay'?'微信':null).($res['type']=='alipay'?'支付宝':null).($res['type']=='tenpay'?'财付通':null).($res['type']=='no'?'未知方式':null).($res['type']==''?'未知方式':null)."</b></td><td>" . $res["money"] . "元</b></td><td>" . ($res["status"] == 1 ? "<font color=green>已完成打赏</font>" : "<font color=red>未完成打赏</font>") . "</td></tr>";
	}
echo "</tbody>\r\n</table>\r\n</div>\r\n\t</div>";
?>

打赏统计:

在第83行处加上

<div class="panel panel-info">
<div class="panel-heading" style="background: linear-gradient(to right,#14b7ff,#5ccdde,#b221ff);"><center><font color="#000000"><b>站点日志</b></font></center></h3></div>
<table class="table table-bordered">
<tbody>
<tr>
<td align="center"><font color="#808080"><b>今日打赏总数</b></br><code><?php echo $info['orders_today']; ?></code></br>次</font></td>
<td align="center"><font color="#808080"><b>今日打赏金额</b></br><code><?php echo (round($info['order_today'],2))?></code></br>元</font></td>
</tr>
<tr>
<td align="center"><font color="#808080"><b>昨日打赏总数</b></br><code><?php echo $info['orders_lastday']; ?></code></br>次</font></td>
<td align="center"><font color="#808080"><b>昨日打赏金额</b></br><code><?php echo (round($info['order_lastday'],2))?></code></br>元</font></td>
</tr>
<tr height=50>
<td align="center"><font color="#808080"><b>累计打赏总数</b></br><code><?php echo $info['orders']; ?></code></br>次</font></td>
	<td align="center"><font color="#808080"><b>累计打赏金额</b></br><code><?php echo (round($info['order'],2))?></code></br>元</font></td>
<tbody>
</table>
</div>

©造梦空间论坛
© 版权声明
THE END
喜欢就支持一下吧
点赞6赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容