price_rec.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. session_start();
  3. if (isset($_SESSION["account"])) {
  4. ?>
  5. <?php require_once('common/header.php'); ?>
  6. <?php require_once('common/sidebar.php'); ?>
  7. <div class="main-content app-content mt-0">
  8. <div class="side-app">
  9. <!--占位-->
  10. <div class="card"> </div>
  11. <!--占位-->
  12. <!-- CONTAINER -->
  13. <div class="main-container container-fluid">
  14. <!-- PAGE-HEADER -->
  15. <div class="row row-sm">
  16. <div class="col-lg-12">
  17. <div class="card">
  18. <div class="card-header">
  19. <h3 class="card-title">余额变动记录</h3>
  20. </div>
  21. <div class="card-body">
  22. <div class="table-responsive">
  23. <table class="table table-bordered text-nowrap border-bottom" id="responsive-datatable">
  24. <thead>
  25. <tr>
  26. <th class="wd-10p border-bottom-0">账号</th>
  27. <th class="wd-10p border-bottom-0">订单号</th>
  28. <th class="wd-10p border-bottom-0">收件人</th>
  29. <th class="wd-10p border-bottom-0">订单状态</th>
  30. <th class="wd-10p border-bottom-0">类型</th>
  31. <th class="wd-10p border-bottom-0">金额</th>
  32. <th class="wd-10p border-bottom-0">状态</th>
  33. <th class="wd-10p border-bottom-0">备注</th>
  34. <th class="wd-10p border-bottom-0">创建时间</th>
  35. <th class="wd-10p border-bottom-0">到账时间</th>
  36. </tr>
  37. </thead>
  38. <tbody id="revenue-table">
  39. </tbody>
  40. </table>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <!-- CONTAINER CLOSED -->
  48. </div>
  49. </div>
  50. <?php
  51. session_start();
  52. include_once("../untils/conn.php");
  53. mysqli_query($con, "set names utf8");
  54. // 获取当前正在登录的账号信息的代理
  55. $proxy_acc = $_SESSION["account"];
  56. // 查询proxy表中的数据
  57. $query = "SELECT proxy_rename_sta FROM proxy WHERE proxy_acc = '$proxy_acc'";
  58. $result = mysqli_query($con, $query);
  59. $row = mysqli_fetch_assoc($result);
  60. if ($row) {
  61. $proxy_rename_sta = $row['proxy_rename_sta'];
  62. ?>
  63. <div class="modal fade" id="modaldemo5" data-bs-backdrop="static" data-bs-keyboard="false">
  64. <div class="modal-dialog modal-dialog-centered text-center" role="document">
  65. <div class="modal-content tx-size-sm">
  66. <div class="modal-body text-center p-4 pb-5">
  67. <i class="icon icon-close fs-70 text-danger lh-1 my-5 d-inline-block"></i>
  68. <h4 class="text-danger">警告: 您的账号未实名!</h4>
  69. <p class="mg-b-20 mg-x-20">平台要求所有代理商必须实名!否则无法使用平台功能!</p>
  70. <a href="profile.php" class="btn btn-primary pd-x-25">去实名</a>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. <!--/div-->
  76. <script src="assets/js/jquery.min.js"></script>
  77. <script>
  78. $(document).ready(function() {
  79. $.ajax({
  80. url: "controller/GetRevenue.php",
  81. type: "GET",
  82. dataType: "json",
  83. success: function(data) {
  84. var html = "";
  85. for (var i = 0; i < data.length; i++) {
  86. var row = data[i];
  87. var oderstaText = (row.odersta == 0 ? "未处理" : (row.odersta == 1 ? "已下单" : (row.odersta == 2 ? "已发货" : (row.odersta == 3 ? "已完成" : "开卡失败"))));
  88. var typeText = (row.type == 0 ? "返佣" : "扣费");
  89. var statusText = (row.status == 0 ? "待结算" : (row.status == 1 ? "结算中" : (row.status == 2 ? "已结算" : (row.status == 3 ? "已扣费" : "未知状态"))));
  90. html += `<tr>
  91. <td>${row.account}</td>
  92. <td>${row.oderid}</td>
  93. <td>${row.name}</td>
  94. <td>${oderstaText}</td>
  95. <td>${typeText}</td>
  96. <td>¥${row.price}</td>
  97. <td>${statusText}</td>
  98. <td>${row.notes}</td>
  99. <td>${row.crtime}</td>
  100. <td>${row.dztime}</td>
  101. </tr>`;
  102. }
  103. $("#revenue-table").html(html);
  104. },
  105. error: function(error) {
  106. console.log(error);
  107. }
  108. });
  109. });
  110. $(document).ready(function() {
  111. <?php
  112. if ($proxy_rename_sta == 0) {
  113. // 未实名认证
  114. echo '$("#modaldemo5").modal("show");';
  115. echo '$("#modaldemo5").modal({backdrop: "static", keyboard: false});';
  116. } elseif ($proxy_rename_sta == 1) {
  117. // 已实名认证
  118. echo '$("#modaldemo5").modal("hide");';
  119. }
  120. ?>
  121. });
  122. </script>
  123. <?php
  124. } else {
  125. // 未找到相关数据
  126. // echo '数据不存在';
  127. }
  128. ?>
  129. <?php require_once('common/footer.php'); ?>
  130. <?php
  131. } else {
  132. echo "<script>alert('登录过过期,没有权限访问该页面');location.href='login.html';</script>";
  133. }