eregi php5.3 废弃

preg_match
apple 支付页面
master
tpingzhang 5 years ago
parent 2ba3b915b9
commit e9f8449468

@ -2,229 +2,204 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes"> <title></title>
<meta name="mobile-web-app-capable" content="yes"> <link href="__CSS__/index.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <style>input{outline:none;-webkit-appearance:none;}
<meta name="format-detection" content="telephone=no"> html{font-size:12px;}
<link rel="stylesheet" href="__CSS__/weui.min.css"> body {background:#F3F2F7;font-size:inherit;}
<script src="__JS__/flex.min.js"></script> i{font-style:normal;font-weight:normal;}
<script src="__JS__/jquery-1.11.1.min.js"></script> .recharge_table {display:table;width:100%;}
<title>支付中心</title> .recharge_table .recharge_cell {display:table-cell;vertical-align:middle;text-align:center;}
</head> .recharge_content {margin:0 auto;}
<style> .recharge_content span {display:block;}
html, .recharge_money {height:5.818rem;background:#FFF;}
body { .recharge_content_number {color:#01B1EC;font-size:1.3rem;}
background-color: #F5F5F5; .recharge_content_coin,.recharge_game_name {color:#999;}
min-height: 100vh; .recharge_content_number i {font-size:1.636rem;}
.recharge_game {background:#FFF;font-size:1.2rem;height:3.727rem;line-height:3.737rem;border-top:2px solid #DEE2E5;}
} .recharge_game .recharge_value {padding:0 1.13rem;}
.recharge_way {height:10.8rem;}
.weui-cells { .recharge_way_title {height:2.7rem;line-height:2.7rem;text-align:center;font-size:1.07rem;}
border-radius: .2rem; .recharge_way_content,.recharge_way_wrap {height:8rem;}
box-shadow: 0px 0px .05rem rgba(0, 0, 0, .2); .recharge_way_btn {height:7.2rem;display:inline-block;}
margin-top: 0px; .recharge_way_btn img{width:6.84rem;height:6.84rem;display:inline-block;margin-top:.18rem;}
} .recharge_way_btn_alipay img{width:6.84rem;height:6.84rem;margin-top:0;}
.weui-cell { .platform_pop {position:absolute;top:0;left:0;width:100%;height:100%;display:none;}
height: 0.85rem; .platform_pop_table {width:100%;height:100%;}
font-size: .28rem; .platform_box {color:#999;position:relative;top:0;left:auto;right:auto;width:24rem;display:block;margin:0 auto;background:#FFF;border-radius:.3rem;}
color: #292929; .platform_pop_close {position:absolute;top:0.8rem;right:0.8rem;color:#999;}
padding: 0px .3rem; .platform_pop_close img {width:1.7rem;height:1.7rem;}
} .platform_title {line-height:3.4rem;font-size:1.8rem;}
.platform_content {padding:0 0.8rem;text-align:left;font-size:1.5rem;}
.platform_notice {color:#333;line-height:1.4;}
img { .platform_notice span {color:red;}
width: .72rem; .platform_radio {padding-top:.2rem;padding-bottom:0.2rem;}
height: .72rem; .platform_radio .platform_radio_item {display:block;line-height:1.8;position:relative;}
margin-right: .2rem; .platform_radio_item input {position:absolute;top:0;left:0;z-index:-1;width:1.8rem;height:1.8rem;}
/* margin: .3rem; */ .platform_radio_item input~i{width:1.6rem;height:1.6rem;background:url(__IMG__/btn_check_n.png) center center no-repeat;background-size:100% 100%;display:inline-block;vertical-align:middle;margin-top:-.3rem;margin-right:0.2rem;}
} .platform_radio_item input:checked~i{background-image:url(__IMG__/btn_check_s.png);}
.paylist .weui-cell { .platform_btn {padding:0.2rem .8rem 1rem;}
padding: .2rem .3rem; .platform_btn input {background:#F9AB42;color:#FFF;line-height:1.8;font-size:1.8rem;border:none;width:100%;border-radius:.3rem;}
height: 1rem; @media screen and (max-width:400px) {
} .recharge_game {border-top-width:1px;}
.paylist .weui-cell__hd {
display: flex;
} }
</style>
<script src="__JS__/jquery-1.11.1.min.js"></script>
<script src="__STATIC__/layer_mobile/layer.js"></script>
.weui-cells:after { </head>
border: 0px;
}
.weui-cells:before { <body>
border: 0px; <div class="containers">
}
@media screen and (orientation: portrait) { <div class="recharge_money recharge_table">
.box{ <div class="recharge_cell">
padding:.3rem; <div class="recharge_content">
} <span class="recharge_content_number"><i>{$data.price}</i></span>
.bottombutton{ <span class="recharge_content_coin">{$data.coin}</span>
height:1rem;background-color: #21B1EB;color: #ffffff;font-size: .32rem;text-align: center;line-height:1rem;bottom: 0px; </div>
position: fixed;left: 0;right: 0; </div>
} </div>
} <eq name="data.code" value="1">
@media screen and (orientation: landscape) { <div class="recharge_game">
/*横屏 css*/ <div class="recharge_value">
.box{ <span class="recharge_game_name">游戏名称:</span>
padding:.3rem .5rem; <span>{$data.game_name}</span>
} </div>
.bottombutton{ </div>
height:1rem;background-color: #21B1EB;color: #ffffff;font-size: .32rem;text-align: center;line-height:1rem; </eq>
width: 7.5rem;border-radius: .2rem;position: absolute;left: 50%;margin: .5rem 0 .5rem -3.75rem;
}
body{
padding-bottom: .50rem;
}
.paylist-box{
display: flex;
height: auto;
flex-wrap:wrap;
} <div class="recharge_way">
.paylist-box .weui-cell{ <div class="recharge_way_title">请选择支付方式</div>
min-width: 30%; <div class="recharge_way_content">
box-sizing: content-box; <div class="recharge_way_wrap recharge_table">
margin-left: 3%; <if condition="C('wei_xin.status') eq 1 or C('weixin_gf.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.wx') eq 1) or (C('heepay.status') eq 1 and C('heepay.wxp') eq 1)">
padding: .2rem .0rem; <div class="recharge_cell">
/* padding: .4rem .3rem; */ <a href="{:U('Apple/apple_weixin_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_wechat"><img src="__IMG__/btn_pay_wechat@3x.png"></a>
} </div>
.paylist-box .weui-cell:before{ </if>
content: none; <if condition="C('alipay.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.zfb') eq 1) or (C('sqpay.status') eq 1 and C('sqpay.zfb') eq 1)">
} <div class="recharge_cell">
} <!-- <a href="{:U('Apple/apple_alipay_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay"><img src="__IMG__/btn_pay_alipay@3x.png"></a>
.border-half-line{ -->
width: 97%; <a href="javascript:;" data-url="/sdk.php?s=/Apple/apple_alipay_pay&user_id={:I('user_id')}&game_id={:I('game_id')}" id="alipaybtn" class="recharge_way_btn recharge_way_btn_alipay"><img src="__IMG__/btn_pay_alipay@3x.png"></a>
margin-left: 3%;
float:left;
height:1px;
background-color: #e5e5e5;
-webkit-transform:scale(1,0.5);
transform:scale(1,0.5);
-webkit-transform-origin:top center;
transform-origin: top center
}
@media screen and (orientation: portrait) { <!--
.box{ <a href="{$alipayurl}" data-url="" id="alipaybtn" class="recharge_way_btn recharge_way_btn_alipay"><img src="__IMG__/btn_pay_alipay@3x.png"></a>
padding:.3rem; -->
} </div>
</if>
<if condition="C('sqpay.status') eq 1 and C('sqpay.union') eq 1">
<div class="recharge_cell">
<a href="{:U('Apple/apple_union_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay">
<img src="__IMG__/unionpay.png"></a>
</div>
</if>
} <if condition="pay_set_status('ptb_pay') eq 1 and $data['code'] eq 1">
@media screen and (orientation: landscape) { <div class="recharge_cell">
/*横屏 css*/ <a href="javascript:;" id="platform_id" class="recharge_way_btn recharge_way_btn_platform"><img src="__IMG__/btn_pay_platform@3x.png"></a>
.box{ </div>
padding:.3rem .5rem; </if>
}
.bottombutton{
height:1rem;background-color: #21B1EB;color: #ffffff;font-size: .32rem;text-align: center;line-height:1rem;
width: 7.5rem;border-radius: .2rem;position: absolute;left: 50%;margin: .5rem 0 .5rem -3.75rem;
}
body{
padding-bottom: .50rem;
}
}
</style> <if condition="pay_set_status('bind_pay') eq 1 and $data['code'] eq 1">
<div class="recharge_cell">
<a href="javascript:;" id="platform_id1" class="recharge_way_btn recharge_way_btn_platform"><img src="__IMG__/icon_bangbi@3x.png"></a>
</div>
</if>
<body> <if condition="C('sqpay.status') eq 1 and C('sqpay.shortcut') eq 1">
<div class="box"> <div class="recharge_cell">
<div class="weui-cells"> <a href="{:U('WapPay/wap_shortcut_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay">
<div class="weui-cell"> <img src="__IMG__/unionpay.png"></a>
<div class="weui-cell__bd">
<p>订单金额:</p>
</div> </div>
<div class="weui-cell__ft" style="color: red">¥{$data['price']}元</div> </if>
</div> </div>
<div class="weui-cell">
<div class="weui-cell__bd">
<p>您的账户余额:</p>
</div> </div>
<div class="weui-cell__ft" style="color: #A9A9A9;">{$balance+$bind_balance}平台币</div>
</div> </div>
<div class="platform_pop" id="platform_pop">
<div class="platform_pop_table recharge_table">
<div class="recharge_cell">
<form class="platform_box" action="{:U('Apple/apple_platform_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" enctype="multipart/form-data" method="post">
<a href="javascript:;" id="platform_pop_close" class="platform_pop_close"><img src="__IMG__/icon_close@3x.png" ></a>
<div class="platform_title">平台币</div>
<div class="platform_content">
<div class="platform_notice">应付款平台币数量:<span>{$data.price}</span></div>
<div class="platform_radio">
<label class="platform_radio_item"><input type="radio" name="way" value="1" checked><i></i>平台币余额:<span>{$balance}</span></label>
</div> </div>
<div class="weui-cells" style="margin-top: .3rem;">
<div class="weui-cell">
<div class="weui-cell__bd">
<p>适用平台余额:</p>
</div> </div>
<div class="weui-cell__ft" style="color: #292929">-¥{$balance+$bind_balance}</div> <div class="platform_btn">
<input type="submit" value="立即支付" style="background-color:<notempty name='btncolor'>#{$btncolor}<else />#F9AB42</notempty>">
</div> </div>
<div class="weui-cell"> </form>
<div class="weui-cell__bd">
<p>还需支付:</p>
</div> </div>
<div data-pay_price="{$pay_price}" id="pay_price" class="weui-cell__ft" style="color: red">¥{$pay_price}</div>
</div> </div>
</div> </div>
<div class="weui-cells paylist" style="margin-top: .3rem;">
<div class="weui-cells__title" style="line-height: .85rem;color: #a9a9a9;font-size:.28rem;margin: 0px;">
请选择支付方式</div>
<div class="border-half-line" style="position: absolute;"></div>
<div class="paylist-box">
<if condition="C('alipay.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.zfb') eq 1) or (C('sqpay.status') eq 1 and C('sqpay.zfb') eq 1)">
<a id="alipaybtn" class="weui-cell" href="javascript:;" data-url="/sdk.php?s=/Apple/apple_alipay_pay&user_id={:I('user_id')}&game_id={:I('game_id')}" id="alipaybtn" class="recharge_way_btn recharge_way_btn_alipay">
<div class="weui-cell__hd"><img src="__IMG__/alipay.png"></div> <div class="platform_pop" id="platform_pop1">
<div class="weui-cell__bd"> <div class="platform_pop_table recharge_table">
<p style="color: #292929;font-size:.28rem;">支付宝支付</p> <div class="recharge_cell">
<p style="color: #a9a9a9;font-size:.2rem;">推荐支付宝用户使用</p> <form class="platform_box" action="{:U('Apple/apple_platform_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" enctype="multipart/form-data" method="post">
<a href="javascript:;" id="platform_pop_close1" class="platform_pop_close"><img src="__IMG__/icon_close@3x.png" ></a>
<div class="platform_title">绑币平台币</div>
<div class="platform_content">
<div class="platform_notice">应付款绑币数量:<span>{$data.price}</span></div>
<div class="platform_radio">
<label class="platform_radio_item"><input type="radio" name="way" value="2" checked><i></i>绑定平台币余额:<span>{$bind_balance}</span></label>
</div> </div>
</a>
</if>
<if condition="$pay_price elt C('WX_PAY_LIMIT')">
<if condition="C('wei_xin.status') eq 1 or C('weixin_gf.status') eq 1 or (C('goldpig.status') eq 1 and C('goldpig.wx') eq 1) or (C('heepay.status') eq 1 and C('heepay.wxp') eq 1)">
<a class="weui-cell" href="{:U('Apple/apple_weixin_pay',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_wechat">
<div class="weui-cell__hd"><img src="__IMG__/wxpay.png"></div>
<div class="weui-cell__bd">
<p style="color: #292929;font-size:.28rem;">微信支付</p>
<p style="color: #a9a9a9;font-size:.2rem;">推荐微信用户使用</p>
</div> </div>
</a> <div class="platform_btn">
</if> <input type="submit" value="立即支付" style="background-color:<notempty name='btncolor'>#{$btncolor}<else />#F9AB42</notempty>">
</if> </div>
<if condition="C('sqpay.status') eq 1 and C('sqpay.union') eq 1"> </form>
<a class="weui-cell" href="{:U('Apple/apple_union_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay">
<div class="weui-cell__hd"><img src="__IMG__/cardpay.png"></div>
<div class="weui-cell__bd">
<p style="color: #292929;font-size:.28rem;">银行卡支付</p>
<p style="color: #a9a9a9;font-size:.2rem;">使用银行卡支付</p>
</div> </div>
</a>
</if>
<if condition="C('sqpay.status') eq 1 and C('sqpay.shortcut') eq 1">
<a class="weui-cell" href="{:U('WapPay/wap_shortcut_pay', array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}" class="recharge_way_btn recharge_way_btn_alipay">
<div class="weui-cell__hd"><img src="__IMG__/onlinepay.png"></div>
<div class="weui-cell__bd">
<p style="color: #292929;font-size:.28rem;">快捷支付</p>
<p style="color: #a9a9a9;font-size:.2rem;">可在线快捷支付</p>
</div> </div>
</a>
</if>
</div> </div>
</div> </div>
</div>
<botton id="platform_pay" class="bottombutton">
确认支付
</botton>
</body> </body>
<script> <script>
$(function() {
if ($("#pay_price").data("pay_price") == 0) { var html=document.getElementsByTagName('html')[0];
$("#platform_pay").show(); function fontsizechange() {
$(".paylist").hide(); var rate = html.clientWidth/640;
} else { var basesize = 22;
$("#platform_pay").hide(); html.style.fontSize = (rate>1?basesize:basesize*rate)+'px';
$(".paylist").show(); }
fontsizechange();
window.onresize = function() {
fontsizechange();
} }
$("#platform_pay").click(function() {
var url = "{:U('Apple/platform_coin_deduction',array('user_id'=>I('user_id'),'game_id'=>I('game_id')))}"; $(function() {
window.location.href = url; $(".recharge_way_wrap a").one("click",function(){
$(this).click(function (){return false;});
});
$('#platform_id').on('click',function() {
$('#platform_pop').fadeIn().find('#platform_pop_close').on('click',function() {
$(this).closest('#platform_pop').fadeOut();
return false;
});
return false;
});
$('#platform_id1').on('click',function() {
$('#platform_pop1').fadeIn().find('#platform_pop_close1').on('click',function() {
$(this).closest('#platform_pop1').fadeOut();
return false;
});
return false;
}); });
$('#alipaybtn').on('click',function() { $('#alipaybtn').on('click',function() {
@ -247,8 +222,11 @@ $(function() {
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url); window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
} }
else { else {
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url); window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
} }
} else { } else {
layer.open({ layer.open({
content: result.msg content: result.msg
@ -266,5 +244,6 @@ $(function() {
}); });
}); });
</script> </script>
</html> </html>

@ -406,7 +406,8 @@ class UnifiedOrder_pub extends Wxpay_client_pub
$ips=explode (', ', $_SERVER['HTTP_X_FORWARDED_FOR']); $ips=explode (', ', $_SERVER['HTTP_X_FORWARDED_FOR']);
if($ip){ array_unshift($ips, $ip); $ip=FALSE; } if($ip){ array_unshift($ips, $ip); $ip=FALSE; }
for ($i=0; $i < count($ips); $i++){ for ($i=0; $i < count($ips); $i++){
if(!eregi ('^(10│172.16│192.168).', $ips[$i])){ if(!preg_match ('/^(10│172.16│192.168)./', $ips[$i])){
// if(!eregi ('^(10│172.16│192.168).', $ips[$i])){
$ip=$ips[$i]; $ip=$ips[$i];
break; break;
} }

Loading…
Cancel
Save