123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <?php
- // by 请勿倒卖,已申请软著,否则追究法律责任
- namespace app\admin;
- class report extends Base
- {
- public function initialize()
- {
- parent::initialize();
- $this->Administrator(4);
- $this->header();
- }
- public function __destruct()
- {
- $this->footer();
- }
- function index($_var_0 = [])
- {
- $_var_1 = SafeRequest("page", "get");
- $this->search = SafeRequest("search", "get");
- $this->search && ($_var_0[] = ["appname", "like", "%" . $this->search . "%"]);
- $this->reason = SafeRequest("reason", "get");
- $this->reason && ($_var_0[] = ["reason", "=", $this->reason]);
- $this->mapTime("addtime", false, $_var_0);
- $_var_2 = db("report")->alias("r")->join("appid a", "r.appid=a.in_id", "left")->join("user u", "r.app_uid=u.in_userid", "left")->field("r.*,a.in_uname,a.in_uid,a.in_applock,u.in_username")->where($_var_0)->order("id desc")->paginate(["page" => $_var_1]);
- $_var_3 = $_var_2->items();
- $_var_4 = $_var_2->total();
- $_var_5 = getRender($_var_2, $_var_1);
- ?><script src="static/pack/layer/jquery.js"></script>
- <script src="static/pack/layer/lib.js"></script>
- <div class="container"><?php
- $this->nav3();
- $this->searchForm("", "", function () {
- ?> <select name="reason" onchange="document.btnsearch.submit();">
- <option value="">全部类型</option>
- <?php
- foreach (["盗版", "黄色", "欺诈", "其他"] as $_var_6) {
- ?> <option value="<?php echo $_var_6;?>" <?php echo $this->reason == $_var_6 ? "selected=\"selected\"" : "";?>>
- <?php echo $_var_6;?> </option>
- <?php
- }
- ?> </select>
- <?php
- });
- ?><table class="tb tb2">
- <tr><th class="partition">应用举报列表</th></tr>
- </table>
- <form name="form" method="post" action="?c=report&a=allsave">
- <table class="tb tb2">
- <tr class="header">
- <th>编号</th>
- <th>应用ID</th>
- <th>应用名称</th>
- <th>所属用户</th>
- <th>应用状态</th>
- <th>举报类型</th>
- <th width="20%">举报内容</th>
- <th>联系邮箱</th>
- <th>举报时间</th>
- </tr><?php
- if ($_var_4 == 0) {
- ?><tr><td colspan="2" class="td27">没有应用举报信息</td></tr><?php
- }
- if ($_var_3) {
- foreach ($_var_3 as $_var_7) {
- ?><td><input class="checkbox" type="checkbox" name="in_id[]" id="in_id" value="<?php echo $_var_7["id"];?>"><?php echo $_var_7["id"];?></td>
- <td><?php echo $_var_7["appid"];?></td>
- <td><a href="?c=app&a=index&app_id=<?php echo $_var_7["appid"];?>"><?php echo $_var_7["appname"];?></a></td>
- <td><a href="?c=user&a=index&user_id=<?php echo $_var_7["in_uid"] ?: $_var_7["app_uid"];?>"><?php echo $_var_7["in_uname"] ?: $_var_7["in_username"];?></a></td>
- <td><?php echo $_var_7["in_applock"] == 1 ? "锁定" : ($_var_7["in_applock"] === 0 ? "正常" : "已删除");?></td>
- <td><?php echo $_var_7["reason"];?></td>
- <td><?php echo $_var_7["note"];?></td>
- <td><?php echo $_var_7["email"];?></td>
- <td><?php echo $_var_7["addtime"];?></td>
- <td>
- </tr>
- <?php
- }
- }
- ?></table>
- <?php echo $this->render($_var_5);?>
- <table class="tb tb2">
- <tbody>
- <tr><td><input type="checkbox" id="chkall" class="checkbox" onclick="CheckAll(this.form);">
- <label for="chkall">全选</label>
- <select id="in_allsave" name="in_allsave" onchange="all_save(this.form);">
- <option value="3">删除举报</option>
- </select>
- <input type="submit" name="allsave" class="btn" value="批量操作"></td></tr>
- </tbody>
- </table>
- </form>
- </div>
- </div>
- <?php
- }
- function allsave()
- {
- if (!submitcheck("allsave")) {
- $this->ShowMessage("表单验证不符,无法提交!", $_SERVER["PHP_SELF"], "infotitle3", 3000, 1);
- }
- $_var_8 = RequestBox("in_id");
- $_var_9 = SafeRequest("in_allsave", "post");
- if ($_var_8 == 0) {
- $this->ShowMessage("批量操作失败,请先勾选要删除的应用!", $_SERVER["HTTP_REFERER"], "infotitle3", 3000, 1);
- } else {
- if ($_var_9 == 3) {
- db("report")->where("id", "in", $_var_8)->delete();
- $this->ShowMessage("恭喜您,举报批量删除成功!", $_SERVER["HTTP_REFERER"], "infotitle2", 1000, 1);
- }
- }
- }
- }
|