combine.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace app\admin;
  3. class combine extends Base
  4. {
  5. public function initialize()
  6. {
  7. parent::initialize();
  8. $this->Administrator(3);
  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. $_var_2 = db("combine")->order("ctime desc")->paginate(["page" => $_var_1]);
  19. $_var_3 = $_var_2->items();
  20. $_var_4 = $_var_2->total();
  21. $_var_5 = getRender($_var_2, $_var_1);
  22. ?><div class="container"><?php
  23. $this->nav3();
  24. ?>
  25. <table class="layui-table">
  26. <thead>
  27. <tr>
  28. <th>编号</th>
  29. <th>安卓地址</th>
  30. <th>IOS地址</th>
  31. <th>合并地址</th>
  32. <th>用户名</th>
  33. <th>用户ID</th>
  34. <th>添加时间</th>
  35. <th>操作</th>
  36. </tr>
  37. </thead>
  38. <?php
  39. if ($_var_4 == 0) {
  40. ?><td colspan="22" style="margin:auto;text-align:center" >暂无合并</td>
  41. <?php
  42. } else {
  43. foreach ($_var_3 as $_var_8) {
  44. ?><tr class="hover">
  45. <td><?php echo $_var_8["id"];?></td>
  46. <td><?php echo $_var_8["android"];?></td>
  47. <td><?php echo $_var_8["ios"];?></td>
  48. <td><?php echo $_var_8["link"];?></td>
  49. <td><?php echo $_var_8["username"];?></td>
  50. <td><?php echo $_var_8["userid"];?></td>
  51. <td><?php echo date("Y-m-d H:i:s", $_var_8["ctime"]);?></td>
  52. <td><a class="layui-btn layui-btn-danger layui-btn-xs" href="?c=combine&a=del&id=<?php echo $_var_8["id"];?>"><i class="layui-icon layui-icon-delete"></i>删除</a></td>
  53. </tr>
  54. <?php
  55. }
  56. }
  57. ?></table>
  58. <?php echo $this->render($_var_5);?>
  59. </div>
  60. <?php
  61. }
  62. function del()
  63. {
  64. $_var_9 = SafeRequest("id", "get");
  65. db("combine")->where("id", $_var_9)->delete();
  66. $this->ShowMessage("恭喜您,删除成功!", $_SERVER["HTTP_REFERER"], "infotitle2", 3000, 1);
  67. }
  68. }