<?php require __DIR__ . '/../../share/app.php'; $id = intval($_GET['id']); $file = null; foreach (ts_query() as $job) { if ($job['id'] == $id) { $file = $job['output']; } } ?> <pre><?php e(file_get_contents($file)); ?> </pre>
<?php require "php/db.inc"; require "php/util.inc"; $page = php_reqvar("page", "1"); $limit = php_reqvar("limit", 50); $reply["code"] = 0; $reply["msg"] = "ok"; $reply["feedback"] = ts_query($page, $limit); echo json_encode($reply); function ts_query($page, $limit) { $sql = sprintf("select * from ts order by datetime desc"); // page $page = $page < 1 ? 1 : $page; $sql = $sql . sprintf(" limit %d,50", ($page - 1) * 50); // query $db = dbopen("feedback"); if ($db->connect_errno) { echo "mysql error " . $db->connect->error; return; } $res = $db->query($sql); $items = array(); while ($row = $res->fetch_assoc()) { $item = array(); $item["user"] = $row["user"]; $item["datetime"] = $row["datetime"]; $item["content"] = $row["content"]; $item["contact"] = $row["contact"]; $items[] = $item;
<table class="table table-condensed table-striped table-bordered table-hover"> <thead> <tr> <th>ID</th> <th>State</th> <th>Output</th> <th>E-Level</th> <th>Times (r/u/s)</th> <th>Command</th> <th></th> </tr> </thead> <tbody> <?php foreach (ts_query() as $row) { ?> <tr> <td><?php e($row['id']); ?> </td> <td><?php e($row['state']); ?> </td> <td><a href="#" data-toggle="modal" data-target="#modal-cat" ic-get-from="ajax/cat.php?id=<?php e($row['id']); ?> " ic-target="#modal-cat-body" ic-indicator="#modal-cat-progress"><?php e($row['output']);