1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- namespace app\admin;
- class ios_device extends Base
- {
- 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 = [])
- {
- $_var_0 = SafeRequest("udid", "get");
- if ($_var_0) {
- $map[] = ["udid", "=", $_var_0];
- }
- $_var_1 = SafeRequest("iss", "get");
- if ($_var_1) {
- $map[] = ["cert_iss", "=", $_var_1];
- }
- $_var_2 = SafeRequest("page", "get");
- $_var_3 = db("ios_device")->where($map)->group("udid")->order("version 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();
- ?><table class="tb tb2">
- <tr><th class="partition">设备列表</th></tr>
- </table>
- <table class="tb tb2">
- <tr class="header">
- <th>ID</th>
- <th>设备UDID</th>
- <th>设备型号</th>
- <th>设备版本</th>
- <th>操作</th>
- </tr>
- <?php
- if ($_var_6 == 0) {
- ?><tr><td colspan="2" class="td27">没有设备管理</td></tr>
- <?php
- }
- function eachrow($_var_7, $_var_8 = '<b></b>')
- {
- $_var_9 = db("super_sign")->where("udid", $_var_7["udid"])->count();
- ?><tr class="hover">
- <td class="td25"><?php echo $_var_7["id"];?></td>
- <td><a href="?c=super_sign&a=index&udid=<?php echo $_var_7["udid"];?>"><?php echo $_var_7["udid"];?></a></td>
- <td><?php echo $_var_7["product"];?></td>
- <td><?php echo $_var_7["version"];?></td>
- <td><?php echo $_var_9 ? "<a href=\"?c=super_sign&a=index&udid=" . $_var_7["udid"] . "\">签名记录(" . $_var_9 . ")</a>" : "";?></td></tr><?php
- }
- if ($_var_4) {
- foreach ($_var_4 as $_var_10) {
- eachrow($_var_10);
- }
- }
- ?></table></div><?php echo $_var_5;?><?php
- }
- }
|