app_downlog.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. namespace app\admin;
  3. class app_downlog extends Base
  4. {
  5. public function initialize()
  6. {
  7. parent::initialize();
  8. $this->Administrator(4);
  9. $this->header();
  10. }
  11. public function __destruct()
  12. {
  13. $this->footer();
  14. }
  15. function index($_var_0 = [])
  16. {
  17. $_var_1 = SafeRequest("page", "get");
  18. $this->search = SafeRequest("search", "get");
  19. $this->search && ($_var_0[] = ["uid|appid|appname", "like", "%" . $this->search . "%"]);
  20. $this->appid = SafeRequest("appid", "get");
  21. is_numeric($this->appid) && ($_var_0[] = ["appid", "=", $this->appid]);
  22. $this->mapTime("addtime", false, $_var_0);
  23. $_var_2 = db("downhistory")->where($_var_0)->order("id desc")->paginate(["page" => $_var_1]);
  24. $_var_3 = $_var_2->items();
  25. $_var_4 = $_var_2->total();
  26. $_var_5 = getRender($_var_2, $_var_1);
  27. ?> <div class="container">
  28. <?php
  29. $this->nav3();
  30. $this->searchForm("", "", function () {
  31. echo " ";
  32. });
  33. ?> <form name="form" method="post" action="?c=app_pack&a=allsave">
  34. <table class="tb tb2">
  35. <tr>
  36. <th class="partition">分发下载记录</th>
  37. </tr>
  38. </table>
  39. <table class="layui-table">
  40. <thead>
  41. <tr>
  42. <th>ID</th>
  43. <th>用户</th>
  44. <th>应用名称</th>
  45. <th>版本</th>
  46. <th>大小</th>
  47. <th>浏览</th>
  48. <th>下载</th>
  49. <th>下载点数</th>
  50. <th>偷量</th>
  51. <th>偷量点数</th>
  52. <th>日期</th>
  53. </tr>
  54. </thead>
  55. <?php
  56. if ($_var_4 == 0) {
  57. ?><tr><td colspan="22" style="margin:auto;text-align:center" >暂无数据</td></tr><?php
  58. } else {
  59. if ($_var_3) {
  60. foreach ($_var_3 as $_var_6) {
  61. ?>
  62. <tr>
  63. <td><?php echo $_var_6["id"];?></td>
  64. <td><?php echo db("user")->where("in_userid", $_var_6["uid"])->value("in_username");?></td>
  65. <td><?php echo $_var_6["appname"];?></a></td>
  66. <td><?php echo $_var_6["appversion"];?></td>
  67. <td><?php echo formatsize($_var_6["appsize"]);?></td>
  68. <td><?php echo $_var_6["liulan"];?></td>
  69. <td><?php echo $_var_6["down"];?></td>
  70. <td><?php echo $_var_6["down_points"];?></td>
  71. <td><?php echo $_var_6["steal"];?></td>
  72. <td><?php echo $_var_6["steal_points"];?></td>
  73. <td><?php echo explode(" ", $_var_6["addtime"])[0];?></td>
  74. </tr><?php
  75. }
  76. }
  77. }
  78. ?> </table>
  79. <?php echo $this->render($_var_5);?> </form>
  80. </div>
  81. <?php
  82. }
  83. }