forked from pplulee/appleid_auto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.php
33 lines (33 loc) · 1.54 KB
/
task.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
include("header.php");
?>
<title>任务管理</title>
<div class="container" style="padding-top:70px;">
<div class="col-md-12 center-block" style="float: none;">
<div class="table-responsive">
<a href='task_edit.php?action=add' class='btn btn-secondary'>添加任务</a>
<table class="table table-striped">
<thead>
<tr>
<th>任务ID</th>
<th>账号</th>
<th>检查间隔</th>
<th>启用通知</th>
<th>操作</th>
</tr>
</thead>
<?php
global $conn;
$result = $conn->query("SELECT id,account_id,check_interval,tgbot_chatid,tgbot_token FROM task WHERE owner = '{$_SESSION['user_id']}';");
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$account_name = get_account_username($row['account_id']);
$enable_tgbot = ($row['tgbot_chatid'] != "" && $row['tgbot_token'] != "") ? "是" : "否";
echo "<tr><td>{$row['id']}</td><td>$account_name</td><td>{$row['check_interval']}</td><td>$enable_tgbot</td><td><a href='task_edit.php?action=edit&id={$row['id']}' class='btn btn-secondary'>编辑</a> <a href='task_edit.php?action=delete&id={$row['id']}' class='btn btn-danger'>删除</a></td></tr>";
}
}
?>
</table>
</div>
</div>
</div>