dwproxy.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <?php
  2. session_start();
  3. if (isset($_SESSION["username"])) {
  4. ?>
  5. <?php require_once('common/header.php'); ?>
  6. <!--页面主要内容-->
  7. <main class="lyear-layout-content">
  8. <div class="container-fluid">
  9. <div class="row">
  10. <div class="col-lg-12">
  11. <div class="card">
  12. <div class="card-toolbar clearfix">
  13. </div>
  14. <div class="card-body">
  15. <div class="table-responsive">
  16. <form name="form1" id="form1" method="post" action="controller/deleteall.php">
  17. <table class="table table-bordered">
  18. <?php
  19. $proxy_id = $_GET['proxy_id'];
  20. include_once("../untils/conn.php");
  21. mysqli_query($con, "set names utf8");
  22. if ($con) {
  23. if ($db) {
  24. //获取数据总行数
  25. $sql = "SELECT * FROM proxy WHERE proxy_upid = '$proxy_id'";
  26. $data = mysqli_query($con, $sql);
  27. $maxrows = mysqli_num_rows($data);
  28. //计算总页数
  29. $page_size = 10; //每页显示数
  30. if ($maxrows % $page_size == 0) {
  31. $maxpage = (int)($maxrows / $page_size);
  32. } else {
  33. $maxpage = (int)($maxrows / $page_size) + 1;
  34. }
  35. //获取当前页
  36. if (isset($_GET['curpage'])) {
  37. $page = $_GET['curpage'];
  38. } else {
  39. $page = 1;
  40. }
  41. //分段取出数据
  42. $start = $page_size * ($page - 1);
  43. $get_sql = "SELECT * FROM proxy WHERE proxy_upid = '$proxy_id' LIMIT $start,$page_size";
  44. //得到数据显示
  45. $data = mysqli_query($con, $get_sql);
  46. ?>
  47. <?php
  48. $proxy_upid = $row["proxy_upid"]
  49. ?>
  50. <thead>
  51. <tr>
  52. <th>代理ID</th>
  53. <th>代理账号</th>
  54. <th>代理名称</th>
  55. <th>手机号码</th>
  56. <th>代理余额</th>
  57. <th>代理实名</th>
  58. <th>身份证号</th>
  59. <th>上级代理</th>
  60. <th>支付宝</th>
  61. <th>支付宝账号</th>
  62. <th>银行卡</th>
  63. <th>银行卡号</th>
  64. <!--<th>邀请码</th>-->
  65. <th>账号状态</th>
  66. <th>实名状态</th>
  67. <th>类型</th>
  68. <th>操作</th>
  69. </tr>
  70. </thead>
  71. <tbody>
  72. <?php
  73. while ($row = mysqli_fetch_array($data)) {
  74. // 获取上级代理名称
  75. $proxy_upid = $row["proxy_upid"];
  76. if ($proxy_upid != "") {
  77. $get_up_proxy_name_sql = "SELECT proxy_name FROM proxy WHERE proxy_id = $proxy_upid";
  78. $get_up_proxy_name_result = mysqli_query($con, $get_up_proxy_name_sql);
  79. $up_proxy_name = mysqli_fetch_array($get_up_proxy_name_result)["proxy_name"];
  80. } else {
  81. $up_proxy_name = "直属平台";
  82. }
  83. ?>
  84. <tr>
  85. <td style="width:5%;">
  86. <?php echo $row["proxy_id"] ?>
  87. </td>
  88. <td style="width:5%;">
  89. <?php echo $row["proxy_acc"] ?>
  90. </td>
  91. <td style="width:5%;">
  92. <?php echo $row["proxy_name"] ?>
  93. </td>
  94. <td style="width:5%;">
  95. <?php echo $row["proxy_phone"] ?>
  96. </td>
  97. <td style="width:5%;">
  98. ¥<?php echo $row["proxy_balance"] ?>
  99. </td>
  100. <td style="width:5%;">
  101. <?php echo $row["proxy_rename"] ?>
  102. </td>
  103. <td style="width:5%;">
  104. <?php echo $row["proxy_uid"] ?>
  105. </td>
  106. <td style="width:5%;">
  107. <?php echo $up_proxy_name ?>
  108. </td>
  109. <td style="width:5%;">
  110. <?php echo $row["proxy_alipay_name"] ?>
  111. </td>
  112. <td style="width:5%;">
  113. <?php echo $row["proxy_alipay"] ?>
  114. </td>
  115. <td style="width:5%;">
  116. <?php echo $row["proxy_yihname"] ?>
  117. </td>
  118. <td style="width:5%;">
  119. <?php echo $row["proxy_yhnum"] ?>
  120. </td>
  121. <td style="width:5%;">
  122. <?php echo $row["proxy_intcode"] ?>
  123. </td>
  124. <td style="width:5%;">
  125. <?php
  126. if ($row["proxy_sta"] == 1) {
  127. echo '<span class="label label-success">账号正常</span>';
  128. } else {
  129. echo '<span class="label label-danger">封禁状态</span>';
  130. }
  131. ?>
  132. </td>
  133. <td style="width:5%;">
  134. <?php
  135. if ($row["proxy_rename_sta"] == 1) {
  136. echo '<span class="label label-info">已实名</span>';
  137. } else {
  138. echo '<span class="label label-info">未实名</span>';
  139. }
  140. ?>
  141. </td>
  142. <td style="width:5%;">
  143. <?php
  144. if ($row["proxy_type"] == 0) {
  145. echo '<span class="label label-info">个人</span>';
  146. } else {
  147. echo '<span class="label label-info">企业</span>';
  148. }
  149. ?>
  150. </td>
  151. <td style="width:15%;">
  152. <?php if($row["proxy_sta"] == 1) {?>
  153. <a href="controller/Doproxy_sta.php?proxy_id=<?php echo $row["proxy_id"] ?>" class="btn btn-danger btn-sm" target="_blank">封禁账号</a>
  154. <?php } else { ?>
  155. <a href="controller/Doproxy_sta.php?proxy_id=<?php echo $row["proxy_id"] ?>" class="btn btn-success btn-sm" target="_blank">解封账号</a>
  156. <?php } ?>
  157. <!--<a href="" onclick=" return del()" class="btn btn-warning btn-sm">下级代理</a>-->
  158. </td>
  159. </tr>
  160. <?php
  161. }
  162. ?>
  163. </tbody>
  164. <tfoot>
  165. <tr>
  166. <td colspan="12" style="text-align: right;">
  167. <?php
  168. echo "<p>共 $maxpage 页&nbsp;&nbsp;";
  169. echo "每页 $page_size 项&nbsp;&nbsp;";
  170. //设置上一页
  171. if ($page > 1) {
  172. $prepage = $page - 1;
  173. echo "<a href='?curpage=$prepage'>上一页</a>&nbsp;&nbsp;";
  174. }
  175. //设置下一页
  176. if ($page < $maxpage) {
  177. $nextpage = $page + 1;
  178. echo "<a href='?curpage=$nextpage'>下一页</a>&nbsp;&nbsp;";
  179. }
  180. echo "&nbsp;&nbsp;第 $page 页</p>";
  181. }
  182. }
  183. ?>
  184. </td>
  185. </tr>
  186. </tfoot>
  187. </table>
  188. </form>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </main>
  197. <!--End 页面主要内容-->
  198. <?php require_once('common/footer.php'); ?>
  199. <?php
  200. } else {
  201. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  202. }