buylog.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. // by 请勿倒卖,已申请软著,否则追究法律责任
  3. namespace app\admin;
  4. class buylog extends Base
  5. {
  6. public function initialize()
  7. {
  8. parent::initialize();
  9. $this->Administrator(6);
  10. $this->header();
  11. }
  12. public function __destruct()
  13. {
  14. $this->footer();
  15. }
  16. function index($map = [])
  17. {
  18. $_var_0 = SafeRequest("page", "get");
  19. $this->status = SafeRequest("status", "get");
  20. is_numeric($this->status) && ($map[] = ["in_lock", "=", $this->status]);
  21. $this->search = SafeRequest("search", "get");
  22. $this->search && ($map[] = ["in_title|in_uname", "like", "%" . $this->search . "%"]);
  23. $_var_1 = db("buylog")->where($map)->order("in_id desc")->paginate(["page" => $_var_0]);
  24. $_var_2 = $_var_1->items();
  25. $_var_3 = $_var_1->total();
  26. $_var_4 = getRender($_var_1, $_var_0);
  27. ?><div class="container"><?php
  28. $this->nav3();
  29. $this->searchForm("可以输入订单号、支付会员等关键词进行搜索", "", function () {
  30. ?> <select name="status" onchange="document.btnsearch.submit();">
  31. <option value="">全部状态</option>
  32. <?php
  33. foreach (["支付成功", "支付失败"] as $_var_5 => $_var_6) {
  34. ?> <option value="<?php echo $_var_5;?>" <?php echo is_numeric($this->status) && $this->status == $_var_5 ? "selected" : "";?>>
  35. <?php echo $_var_6;?> </option>
  36. <?php
  37. }
  38. ?> </select>
  39. <?php
  40. });
  41. ?>
  42. <table class="tb tb2">
  43. <tr class="header">
  44. <th>订单号</th>
  45. <th>购买类型</th>
  46. <th>支付金额</th>
  47. <th>支付状态</th>
  48. <th>支付会员</th>
  49. <th>支付时间</th>
  50. </tr>
  51. <?php
  52. if ($_var_3 == 0) {
  53. ?><tr><td colspan="2" class="td27">没有购钥记录</td></tr>
  54. <?php
  55. }
  56. if ($_var_2) {
  57. foreach ($_var_2 as $_var_7) {
  58. ?><tr class="hover">
  59. <td><?php echo lightnum($_var_7["in_title"], SafeRequest("key", "get"));?></td>
  60. <td><?php echo $_var_7["in_tid"] > 1 ? $_var_7["in_tid"] > 2 ? "包年" : "包季" : "包月";?></td>
  61. <td><?php echo $_var_7["in_money"];?></td>
  62. <td><?php
  63. if ($_var_7["in_lock"] == 0) {
  64. ?>成功<?php
  65. } else {
  66. ?><?php echo lightnum("失败");?><?php
  67. }
  68. ?></td>
  69. <td><a href="?c=buylog&a=index&search=<?php echo $_var_7["in_uname"];?>" class="act"><?php echo lightnum($_var_7["in_uname"], SafeRequest("key", "get"));?></a></td>
  70. <td><?php echo lightnum($_var_7["in_addtime"], date("Y-m-d", strtotime($_var_7["in_addtime"])) == date("Y-m-d"));?></td>
  71. </tr>
  72. <?php
  73. }
  74. }
  75. ?></table>
  76. <?php echo $this->render($_var_4);?>
  77. </div>
  78. <?php
  79. }
  80. }