-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·98 lines (79 loc) · 2.69 KB
/
index.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
97
98
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>URL Redirection</title>
<link rel="stylesheet" href="res/bulma.min.css">
<link rel="stylesheet" href="res/style.css">
<script src="res/jquery-3.7.1.min.js"></script>
<script src="res/script.js"></script>
<link rel="icon" type="image/png" href="res/forwarding.png">
</head>
<body>
<!-- hero -->
<section class="hero is-info">
<div class="hero-body">
<h1 class="title">URL Redirection</h1>
<h2 class="subtitle">Allow everyone to redirect a URL to another one</h2>
</div>
</section>
<div id="messages" style="position:sticky; top:0px; z-index:10;"></div>
<section class="section">
<div class="box">
<h4 class="title is-4">Redirection code</h4>
<div class="field">
<label class="label">Code</label>
<div class="field has-addons">
<p class="control">
<a class="button is-static">
url.jessyfal04.dev/
</a>
</p>
<div class="control">
<input type="text" id="code" class="input" placeholder="test" oninput="codeChanged()">
</div>
</div>
</div>
<div class="field">
<div class="control">
<button class="button is-info" onclick="verifCode();" id="verify-button">Verify</button>
</div>
</div>
<hr>
<h4 class="title is-4 if-exists">Informations</h4>
<div class="field">
<p class="is-text if-exists">Number of visits : <b><span id="nbVisites">?</span></b></p>
<p class="is-text if-exists">Destination : <b><span id="redirectionUrl">?</span></b></p>
</div>
<h4 class="title is-4 if-no-exists">Create a redirection</h4>
<h4 class="title is-4 if-exists">Delete this redirection</h4>
<div class="field if-no-exists">
<label class="label">URL to redirect</label>
<div class="control">
<input type="text" id="url" class="input" placeholder="google.com">
</div>
</div>
<div class="field if-no-exists if-exists">
<label class="label">Passphrase for management</label>
<div class="control">
<input type="text" id="passphrase" class="input" placeholder="1234" type="passphrase">
</div>
</div>
<div class="field if-no-exists">
<div class="control">
<button class="button is-primary" onclick="createRedirection();">Create</button>
</div>
</div>
<div class="field if-exists">
<div class="control">
<button class="button is-danger" onclick="deleteRedirection();">Delete</button>
</div>
</div>
</div>
</section>
<footer class="footer">
<a href="https://www.flaticon.com/free-icons/redirect" title="redirect icons">Redirect icons created by Eucalyp - Flaticon</a>
</footer>
</body>
</html>