forked from pplulee/appleid_auto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshare.php
56 lines (55 loc) · 2.17 KB
/
share.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
include "include/common.php";
if (!isset($_GET['link'])) {
echo "分享链接不存在";
exit;
}
$account = new account(get_share_account_id($_GET['link']));
if ($account->id == -1) {
echo "分享链接不存在";
exit;
}
?>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>账号分享</title>
</head>
<body>
<script>
var clipboard = new ClipboardJS('.btn');
function alert_success() {
Swal.fire({
icon: 'success',
title: '提示',
text: '复制成功',
timer: 1000,
timerProgressBar: true
});
}
</script>
<div class="container"
style="align-self: center; position: absolute;width: <?php echo((isMobile()) ? "auto" : "20%"); ?>; margin-top:1rem">
<div class="card border border-3 border-info shadow-lg" style="width: 20rem;">
<div class="card-body">
<h5 class="card-title">账号信息</h5>
<h6 class="card-text"><?php echo $account->username ?></h6>
<?php
if ($account->frontend_remark != "") {
echo "<p class='card-subtitle mb-2 text-muted'>备注:$account->frontend_remark</p>";
}
?>
<p class="card-subtitle mb-2 text-muted">上次检测时间:<?php echo $account->last_check ?></p>
<p class="card-subtitle mb-2 text-muted">
状态:<?php echo ($account->message == "正常" && ((time() - strtotime($account->last_check)) < (($account->check_interval + 2) * 60))) ? "<img src='resources/img/icons8-checkmark.svg' width='30' height='30'><span style='color: #549A31'>正常</span>" : "<img src='resources/img/icons8-cancel.svg' width='30' height='30'><span style='color: #B40404'>异常</span>" ?></p>
<button id="username" class="btn btn-primary" data-clipboard-text="<?php echo $account->username ?>"
onclick='alert_success()'>复制账号
</button>
<button id="password" class="btn btn-success" data-clipboard-text="<?php echo $account->password ?>"
onclick='alert_success()'>复制密码
</button>
</div>
</div>
</div>
</body>
</html>