<?php include "./inc/odbc.php"; ?>
|
<?php include "./inc/function.php"; ?>
|
<?php
|
//$openid="oAJ1cwegdmr12YVPyyM5hF1EhcOk";
|
include "./inc/OAuth2.php";
|
?>
|
<html>
|
<head>
|
<meta charset="utf-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<title>民航医疗快线</title>
|
<link rel="stylesheet" href="/css/webtyle.css">
|
<link rel="stylesheet" href="/css/bootstrap.css">
|
<link rel="stylesheet" href="/css/bootstrap-theme.min.css">
|
<script src="/js/jquery-1.10.2.min.js"></script>
|
<script src="/js/bootstrap.min.js"></script>
|
<script src="/js/app.js?v=1.8"></script>
|
<link rel="stylesheet" href="/css/app.css?v=1.9">
|
<link rel="stylesheet" href="/css/app_2.css?v=2.0">
|
</head>
|
<body class="ds_body">
|
<div style="text-align:center;margin-top:20px"><img src="img/top.png" width="90%" height="" border="0" alt=""></div>
|
<hr style="text-align:center;width:100%"></hr>
|
<style>
|
*{margin:0;padding:0;}
|
li{list-style:none;}
|
a{text-decoration:none;}
|
.clear{zoom:1;}
|
.clear:after{content:'';display:block;clear:both;}
|
.fl{float:left;}
|
.fr{float:right;}
|
|
body{ font-size:16px;}
|
section .title{padding-left:20px;background:#F3F3F3;line-height:40px;font-size:16px;}
|
section .wrap{background:#fff;padding:0 0 20px 0;position:relative;}
|
.wrap .left .time{padding-left:20px;line-height:40px;background-size:6%;height:40px;}
|
.wrap .add_wrap{/* padding-left:40px;background:url(/resources/images/20160527shoujiye02.png) no-repeat 14px 14px;background-size:3%; */}
|
.wrap .address{line-height:42px;font-size:16px;padding-left:40px;width:280px;overflow:hidden;height:42px; }
|
.bg-t{background:url(/img/20160527shoujiye04.png) no-repeat 14px 14px;}
|
.bg-b{background:url(/img/20160527shoujiye06.png) no-repeat 14px -22px;}
|
.bg-c{background:url(/img/20160527shoujiye05.png) no-repeat 14px -22px;}
|
|
.wrap .right{position:absolute;right:8px;top:10px;color:#A0A0A0;font-size:16px;}
|
|
.massage {
|
margin: 0 auto;
|
width: 90%;
|
margin-top: 10px;
|
border-bottom: 1px solid #CCC;
|
padding-bottom: 5px;
|
height: 70px;
|
}
|
|
</style>
|
|
<div class="box">
|
<?php
|
$sql="select wxID from weixinOpenIDToPhone where weixinState=1 and weixinOpenID='".$openid."' order by wxID";
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)==0) {
|
header("Location: /MyPhone.php?NEWPhone=1");exit;
|
}
|
}
|
|
$sql="select id,CouponNO,CouponMoney,CouponDate=convert(char,CouponDate,120),CouponDate_Ent=convert(char,CouponDate_Ent,120),CouponState,CouponRemarks,ServiceOrdIDPK from weixinOpenIDToPhone,ServiceOrder,Coupon where ServiceOrdIDPK=ServiceOrdID and ServiceOrdCoPhone=UserPhone and CouponState=0 and weixinOpenID='".$openid."' order by CouponDate desc";
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)!=0) {
|
echo "<ul class=\"couponUL\">";
|
while($rs = sqlsrv_fetch_array($data) ) {
|
$CouponID = $rs['id']; //优惠券ID
|
$CouponNO = $rs['CouponNO']; //优惠券号
|
$CouponMoney = $rs['CouponMoney']; //优惠券金额
|
$CouponDate = $rs['CouponDate']; //优惠券生成时间
|
$CouponDate_Ent = $rs['CouponDate_Ent'];//优惠券结束时间
|
$CouponState = $rs['CouponState']; //优惠券状态
|
$CouponRemarks = $rs['CouponRemarks']; //优惠券备注
|
$ServiceOrdID = $rs['ServiceOrdIDPK'];//相关服务单号
|
?>
|
|
<li>
|
<div class="li_txt fr">
|
<span class="couponSpan_1">优惠券</span>
|
<span class="couponSpan_2"><?php echo round($CouponMoney,0);?>元优惠券</span>
|
<p><?php echo $CouponNO;?></p>
|
<i class="fl"><?php echo date("Y/m/d",strtotime($CouponDate));?>-<?php echo date("Y/m/d",strtotime($CouponDate_Ent));?></i>
|
<a href="/MyOrder.php?ServiceOrdID=<?php echo $ServiceOrdID;?>" class="fr" style="display: none;">立即使用</a>
|
<div class="clear"></div>
|
</div>
|
<div class="clear"></div>
|
</li>
|
|
<?php
|
}
|
echo "</ul>";
|
}else{
|
?>
|
<div class="massage">
|
<a href="#" class="detailed">
|
<ul>
|
<li><p class="mas">暂无优惠券</p></li>
|
</ul>
|
</a>
|
</div>
|
<?php
|
}
|
}
|
?>
|
|
|
|
|
|
</div>
|
</body>
|
</html>
|