123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <?php
- namespace app\admin;
- class super_device extends Base
- {
- public $statusText = [-2 => "签名失败", -1 => "解析失败", "未签名", "准备中", "正在解析", "正在签名", "正在打包", "签名完成"];
- public function initialize()
- {
- parent::initialize();
- $this->Administrator(6);
- $this->header();
- }
- public function __destruct()
- {
- ?> <script>
- $('input[name=sort]').on('input', function () {
- var sort = $(this).val();
- if (sort != $(this).attr('data-sort'))
- $.ajax({
- url: '?c=ajax&a=ios_device_sort',
- data: {id: $(this).attr('data-id'), sort: sort},
- type: 'post',
- success: function (ret) {
- console.log(ret)
- }
- });
- });
- </script>
- <?php
- $this->footer();
- }
- function index($map = [])
- {
- $this->search = SafeRequest("search", "get");
- $this->search && ($map[] = ["in_name|app_id|device_name|product|udid|cert_iss", "like", "%" . $this->search . "%"]);
- $_var_0 = SafeRequest("app_id", "get");
- if (is_numeric($_var_0)) {
- $map[] = ["app_id", "=", $_var_0];
- } else {
- $map[] = ["app_id", ">", "0"];
- }
- $this->cert_dec = SafeRequest("cert_dec", "get");
- is_numeric($this->cert_dec) && ($map[] = ["cert_dec", "=", $this->cert_dec]);
- $this->steal_time = SafeRequest("steal_time", "get");
- is_numeric($this->steal_time) && ($map[] = ["steal_time", $this->steal_time ? ">" : "=", "0"]);
- $_var_1 = SafeRequest("udid", "get");
- $_var_1 && ($map[] = ["udid", "=", $_var_1]);
- $_var_2 = SafeRequest("page", "get");
- $this->mapTime("create_time", true, $map);
- $_var_3 = db("ios_device")->alias("d")->join("appid a", "a.in_id=d.app_id", "left")->field("d.*,a.in_name app_name")->where($map)->order("create_time desc")->paginate(["page" => $_var_2]);
- $_var_4 = $_var_3->items();
- $_var_5 = getRender($_var_3, $_var_2);
- $_var_6 = $_var_3->total();
- ?><div class="container"><?php
- $this->nav3();
- $this->searchForm("", "", function () {
- ?> <select name="steal_time" onchange="document.btnsearch.submit();">
- <option value="">是否偷量</option>
- <option value="1" <?php echo $this->steal_time ? "selected=\"selected\"" : "";?>>是</option>
- <option value="0" <?php echo is_numeric($this->steal_time) && !$this->steal_time ? "selected=\"selected\"" : "";?>>
- 否
- </option>
- </select>
- <select name="cert_dec" onchange="document.btnsearch.submit();">
- <option value="">是否消耗证书</option>
- <option value="1" <?php echo $this->cert_dec ? "selected=\"selected\"" : "";?>>是</option>
- <option value="0" <?php echo is_numeric($this->cert_dec) && !$this->cert_dec ? "selected=\"selected\"" : "";?>>
- 否
- </option>
- </select>
- <?php
- });
- ?><table class="tb tb2">
- <tr><th class="partition">设备记录列表</th></tr>
- </table>
- <table class="layui-table">
- <thead>
- <tr>
- <th>ID</th>
- <th>app名称</th>
- <th>设备UDID</th>
- <th>设备名称</th>
- <th>设备型号</th>
- <th>设备版本</th>
- <th>所用证书</th>
- <th>偷量</th>
- <th>消耗证书</th>
- </tr>
- </thead>
- <?php
- if ($_var_6 == 0) {
- ?><tr><td colspan="22" style="margin:auto;text-align:center" >暂无数据</td></tr>
- <?php
- }
- if ($_var_4) {
- foreach ($_var_4 as $_var_7) {
- ?><tr class="hover">
- <td class="td25"><?php echo $_var_7["id"];?></td>
- <td><a href="?c=app&app_id=<?php echo $_var_7["app_id"];?>">[<?php echo $_var_7["app_id"];?>] - <?php echo $_var_7["app_name"] ?: "应用已删除";?></a></td>
- <td><a href="?c=ios_device&udid=<?php echo $_var_7["udid"];?>"><?php echo $_var_7["udid"];?></a></td>
- <td><?php echo $_var_7["device_name"] ?: "*";?></td>
- <td><?php echo $_var_7["product"] ?: "*";?></td>
- <td><?php echo $_var_7["version"] ?: "*";?></td>
- <td><a href="?c=super_cert&iss=<?php echo $_var_7["cert_iss"];?>"><?php echo $_var_7["cert_iss"];?></a></td>
- <td><?php echo $_var_7["steal_time"] ? "是" : "否";?></td>
- <td><?php echo $_var_7["cert_dec"] ? "是" : "否";?></td>
- </tr><?php
- }
- }
- ?></table></div><?php echo $_var_5;?><?php
- }
- }
|