<?php require '/weixin/OAuth2.php';?>
|
<?php require '/inc/function.php';?>
|
<?php
|
$WEB_Name="优惠券";
|
?>
|
<!DOCTYPE html>
|
<html>
|
|
<head>
|
<?php require '/inc/New_ccs.php';?>
|
<title><?php echo $WEB_Name;?></title>
|
|
<!--Begin Page Level CSS -->
|
<link href="/css/assets/plugins/morris-chart/morris.css" rel="stylesheet">
|
<link href="/css/assets/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet"/>
|
<!--End Page Level CSS -->
|
|
<!-- BEGIN PAGE LEVEL STYLES -->
|
<link href="/css/assets/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
|
<!-- END PAGE LEVEL STYLES -->
|
</head>
|
<?php
|
$memu='CouponAdmin';
|
?>
|
<body class="sticky-header">
|
<!--Start left side Menu-->
|
<?php require 'New_menu_left.php';?>
|
<!--End left side menu-->
|
|
<!-- main content start-->
|
<div class="main-content" >
|
|
<!-- header section start-->
|
<?php require 'New_menu_header.php';?>
|
<!-- header section end-->
|
|
|
<!--body wrapper start-->
|
<div class="wrapper">
|
<!--Start Page Title-->
|
<!--End Page Title-->
|
|
<div class="page-title-box">
|
<h4 class="page-title">优惠券 </h4>
|
<ol class="breadcrumb">
|
<li>
|
<a href="CouponAdminApp.php">新建优惠券</a>
|
</li>
|
</ol>
|
<div class="clearfix"></div>
|
</div>
|
|
|
<!--Start row-->
|
<div class="row">
|
|
<!-- Start inbox widget-->
|
<div class="col-md-12">
|
<div class="white-box">
|
<h2 class="header-title"> 可派送优惠券 </h2>
|
<div class="table-responsive">
|
<table class="table table-hover">
|
<thead>
|
<tr>
|
<!--<th>#</th>-->
|
<th>名称</th>
|
<th>金额</th>
|
<th>有效期</th>
|
<th>状态</th>
|
</tr>
|
</thead>
|
<tbody>
|
<?php
|
//表列内容
|
$i=0;
|
$sql="select top 100 id,CouponNO,CouponName,CouponMoney,CouponDate_Ent=convert(varchar(21),CouponDate_Ent,111),CouponState from Coupon where CouponState=-1 and ToOAid=$adminID and CouponDate_Ent>GETDATE() order by id desc";
|
//$sql="select top 100 id,CouponNO,CouponName,CouponMoney,CouponDate_Ent=convert(varchar(21),CouponDate_Ent,111),CouponState from Coupon where CouponState=0 and ToOAid=0 and CouponDate_Ent>GETDATE() order by id desc";
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)!=0) {
|
while($rs = sqlsrv_fetch_array($data) ) {
|
$i++;
|
if (mb_strlen($rs["CouponName"],'UTF-8')>5){
|
$CouponName=mb_substr($rs["CouponName"],0,5)."...";
|
}else{
|
$CouponName=$rs["CouponName"];
|
}
|
?>
|
<tr>
|
<td><a href="admin_save.php?admin_save=17&ID=<?php echo $rs["id"]?>"><?php echo $CouponName;?></a></td>
|
<td><?php echo ceil($rs["CouponMoney"]);?></td>
|
<td><?php echo $rs["CouponDate_Ent"];?></td>
|
<td>
|
<?php
|
if ($rs["CouponState"]==-1){
|
echo "<span class='label label-primary' style='padding: 5px 6px 6px;min-width: 50px;'>未派送</span>";
|
}elseif ($rs["CouponState"]==0){
|
echo "<span class='label label-warning' style='padding: 5px 6px 6px;min-width: 50px;'>未使用</span>";
|
}elseif ($rs["CouponState"]==1){
|
echo "<span class='label label-success' style='padding: 5px 6px 6px;min-width: 50px;'>已使用</span>";
|
}else {
|
echo "<span class='label label-danger' style='padding: 5px 6px 6px;min-width: 50px;'>无效</span>";
|
}
|
?>
|
</td>
|
</tr>
|
<?php }?>
|
<?php }else{?>
|
<br><p style="padding: 10% 0;text-align: center;color:#FF5D5E;">没有找到相关的数据</p>
|
<?php }
|
}?>
|
|
</tbody>
|
</table>
|
</div>
|
|
|
</div>
|
</div>
|
<!-- Start inbox widget-->
|
</div>
|
<!--End row-->
|
|
</div>
|
<!-- End Wrapper-->
|
|
|
|
|
</div>
|
<!--End main content -->
|
|
<?php require 'New_vicgame.php';?>
|
|
|
<!-- BEGIN 页面JS -->
|
|
<script>
|
//--按钮操作--BEGIN
|
|
|
|
//--按钮操作--End
|
</script>
|
|
<!-- End PAGE 页面JS -->
|
|
</body>
|
|
</html>
|