【调度系统】广东民航医疗快线调度系统源代码
克樊道人
2024-12-02 61ce8cc6883e5f94e6470141df3484167caf31ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?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>