-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathsubscribe.php
96 lines (89 loc) · 4.72 KB
/
subscribe.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php $title = '外洩事件訂閱';
require 'src/header.php';
?>
<header class="jumbotron jumbotron-fluid">
<div class="container">
<h1><?= $title ?></h1>
<p class="lead">在此檢視、更改或取消訂閱外洩事件</p>
</div>
</header>
<div class="padded container searchForm">
<h1 class="breach-title">請輸入 E-mail</h1>
<form id="subscription_status_form">
<div class="form-group">
<label for="email">E-mail</label>
<input type="email" class="form-control" id="email" placeholder="name@example.com" required />
</div>
<button class="btn btn-outline-dark btn-block" type="submit" id="query">送出</button>
<p>按下送出按鈕即代表您已閱讀並同意 <a href="/policy.php">網站營運原則</a></p>
</form>
</div>
<div class="padded container unSubForm" style="display:none">
<h1 class="breach-title">取消訂閱表單</h1>
<div class="alert alert-light text-center" role="alert">
此 E-mail <span style="color: green;">已訂閱</span> 洩漏訊息,請輸入相關資訊來取消訂閱。
</div>
<p>身分證字號會做去識別化後回傳,不會將資料本身傳送給我們。</p>
<form id="unsubscribe_form">
<div class="form-group">
<label for="unsubscribe_form_fullname">姓名</label>
<input type="text" class="form-control" id="unsubscribe_form_fullname" placeholder="姓名" required />
</div>
<div class="form-group">
<label for="nid">身分證字號後六碼</label>
<input type="text" class="form-control" id="unsubscribe_form_nid" maxlength="6" placeholder="身分證字號後六碼" autocomplete="off" required />
</div>
<div class="form-group">
<label for="unsubscribe_form_email">E-mail</label>
<input type="email" class="form-control" id="unsubscribe_form_email" placeholder="name@example.com" required disabled />
<button type="button" class="btn btn-link" onclick="location.reload()">重新輸入 E-mail</button>
</div>
<button class="btn btn-outline-danger btn-block" type="submit" id="unsubscribe">取消訂閱</button>
</form>
</div>
<div class="padded container subForm" style="display:none">
<h1 class="breach-title">訂閱表單</h1>
<div class="alert alert-light text-center" role="alert">
此 E-mail <span style="color: red;">尚未訂閱</span> 洩漏訊息,請輸入相關資訊來訂閱。
</div>
<p>身分證字號會做去識別化後回傳,不會將資料本身傳送給我們。<br/>訂閱後若發現大規模個資外洩時,且您在外洩清單內將會即時通知您。</p>
<form id="subscribe_form">
<div class="form-group">
<label for="subscribe_form_fullname">姓名</label>
<input type="text" class="form-control" id="subscribe_form_fullname" placeholder="姓名" required />
</div>
<div class="form-group">
<label for="subscribe_form_nid">身分證字號後六碼</label>
<input type="text" class="form-control" id="subscribe_form_nid" maxlength="6" placeholder="身分證字號後六碼" autocomplete="off" required />
</div>
<div class="form-group">
<label for="subscribe_form_email">E-mail</label>
<input type="email" class="form-control" id="subscribe_form_email" placeholder="name@example.com" required disabled />
<button type="button" class="btn btn-link" onclick="location.reload()">重新輸入 E-mail</button>
</div>
<button class="btn btn-outline-primary btn-block" type="submit" id="subscribe">訂閱</button>
</form>
</div>
<script src="https://www.google.com/recaptcha/api.js?render=<?= RECAPTCHA_SITE_KEY ?>"></script>
<script>
const RECAPTCHA_SITE_KEY = '<?= RECAPTCHA_SITE_KEY ?>'
</script>
<script src="/js/main.js"></script>
<script>
$('#subscribe_form').on("submit", function(e) {
e.preventDefault();
let el = e.target;
subscribe_func(el);
});
$('#subscription_status_form').on("submit", function(e) {
e.preventDefault();
let el = e.target;
subscription_status_func(el);
});
$('#unsubscribe_form').on("submit", function(e) {
e.preventDefault();
let el = e.target;
unsubscribe_func(el);
});
</script>
<?php require 'src/footer.php'; ?>