123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace app\admin;
- class user_aclog extends Base
- {
- public function initialize()
- {
- parent::initialize();
- $this->Administrator(6);
- $this->header();
- }
- public function __destruct()
- {
- $this->footer();
- }
- function index($map = [])
- {
- $this->IN_ACLOG_TYPE = json_decode(IN_ACLOG_TYPE, true);
- $_var_0 = SafeRequest("page", "get");
- $_var_1 = SafeRequest("user_id", "get");
- $_var_1 && ($map[] = ["user_id", "=", $_var_1]);
- $this->type = SafeRequest("type", "get");
- $this->type && ($map[] = ["type", "=", $this->type]);
- $this->search = SafeRequest("search", "get");
- $this->search && ($map[] = ["u.in_username|note", "like", "%" . $this->search . "%"]);
- $this->mapTime("create_time", true, $map);
- $_var_2 = db("user_aclog")->alias("ua")->join("user u", "u.in_userid=ua.user_id")->field("ua.*,u.in_username")->where($map)->order("id desc")->paginate(["page" => $_var_0]);
- $_var_3 = $_var_2->items();
- $_var_4 = $_var_2->total();
- $_var_5 = getRender($_var_2, $_var_0);
- ?><div class="container"><?php
- $this->nav3();
- $this->searchForm("可以输入用户名、描述等关键词进行搜索", "", function () {
- ?> <select name="type" onchange="document.btnsearch.submit();">
- <option value="">全部类型</option>
- <?php
- foreach ($this->IN_ACLOG_TYPE as $_var_6 => $_var_7) {
- ?> <option value="<?php echo $_var_6;?>" <?php echo $this->type == $_var_6 ? "selected=\"selected\"" : "";?>>
- <?php echo $_var_7;?> </option>
- <?php
- }
- ?> </select>
- <?php
- });
- ?>
- <table class="layui-table">
- <thead>
- <tr>
- <th>ID</th>
- <th>用户</th>
- <th>描述</th>
- <th>类型</th>
- <th>变更前</th>
- <th>数值</th>
- <th>变更后</th>
- <th>变更时间</th>
- </tr>
- </thead>
- <?php
- if ($_var_4 == 0) {
- ?><tr><td colspan="22" style="margin:auto;text-align:center" >暂无数据</td></tr>
- <?php
- }
- if ($_var_3) {
- foreach ($_var_3 as $_var_8) {
- ?><tr><td><?php echo $_var_8["id"];?></td><td><?php echo $_var_8["in_username"];?></td><td><?php echo $_var_8["note"];?></td><td><?php echo $this->IN_ACLOG_TYPE[$_var_8["type"]];?></td><td><?php echo str_replace(".00", "", $_var_8["before_value"]);?></td><td><?php echo str_replace(".00", "", $_var_8["value"] > 0 ? "+" . $_var_8["value"] : $_var_8["value"]);?></td><td><?php echo str_replace(".00", "", $_var_8["after_value"]);?></td><td><?php echo date("Y-m-d H:i:s", $_var_8["create_time"]);?></td></tr><?php
- }
- }
- ?></table>
- <?php echo $this->render($_var_5);?>
- </div>
- <?php
- }
- }
|