-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
141 lines (128 loc) · 3.9 KB
/
index.html
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>License Key</title>
<link rel="shortcut icon" href="pos/main/images/pos.jpg">
<meta name=viewport content="width=device-width, initial-scale=1">
<script src="jquery.min.js"></script>
<script src="jquery.inputmask.bundle.js"></script>
<style>
html,body{
font-family:arial;
background-color:indigo;
color:white;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 97%;
background-color: indigo;
color: white;
text-align: right;
}
.button {
display: block;
border: none;
background-color: #f2f2f2;
padding: 14px 28px;
font-size: 15px;
cursor: pointer;
float: right;
border-radius:8px;
outline:none;
}
.button:hover
{
background-color:#e6e6e6;
}
.button2 {
display: block;
border: none;
background-color: #f2f2f2;
padding: 14px 28px;
font-size: 15px;
cursor: pointer;
float: right;
border-radius:8px;
margin-right:10px;
outline:none;
}
.button2:hover
{
background-color:#e6e6e6;
}
input[type=text] {
width: 30%;
padding: 5px;
box-sizing: border-box;
text-align: left;
font-size:15px;
border-radius:25px;
border:1px solid black;
outline:none;
}
</style>
</head>
<body>
<div class="error-container">
<h1></h1></div>
<center><h1>Software Authentication</h1></center>
<h2>Product Key</h2>
<p>It looks similar to this: XXXX-XXXX-XXXX-XXXX</p>
<input type="text" id="number" data-inputmask="'mask': 'AAAA-9999-AAAA-9999'" placeholder=" Dashes will be added automatically" name="serial" maxlength = "20" onchange="checkKey(this.value)" required>
<br><br>
<span id="error"></span>
<br><br>
<p><b>Note:</b> Your product key might have come with an installation DVD, setup or the back of the packet.<br>
Incase if you have lost the product/license/serial key you might have to purchase the <br>
key from the Software Developer.</p>
<p><b>Trail:</b> To use the trail version of 30 day's of this software press skip.</p>
<script>
$(":input").inputmask();
</script>
<script src="key.js"></script>
<script>
const CORRECT_KEY = key; //enter your key here
// To check the key when entered
function checkKey(key) {
if (key !== CORRECT_KEY) {
return console.log('Incorrect License Key');
}
localStorage.setItem('key', key);
setTimeout(function(){ window.location.assign("checked.html"); }, 0);
}
// To check the key when page load
if (localStorage.getItem('key') !== null && localStorage.getItem('key') === CORRECT_KEY) {
console.log('License Key is Valid');
setTimeout(function(){ window.location.assign("checked.html"); }, 0);
} else if (localStorage.getItem('key') !== null) {
console.log('Previously entered license key is incorrect, please enter it again.');
} else {
console.log('To continue, please enter your license key');
}
</script>
<script>
function errorMessage() {
var error = document.getElementById("error")
if (isNaN(document.getElementById("number").value))
{
// Changing content and color of content
error.textContent = "This key doesn't work. Try a different key."
error.style.color = "white"
} else {
error.textContent = ""
}
}
</script>
<div class="footer">
<button type="submit" onclick="errorMessage()" class="button">Next</button>
<a href="keycheck.html" style="text-decoration:none;" class="button2"><font color="black">Skip</font></a>
</div>
<script>
if (localStorage.getItem("visited") && localStorage.getItem('trialExpire')) {
setTimeout(function(){ window.location.assign("checked.html"); }, 0);
}
localStorage.setItem("visited", "true");</script>