-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinxjs.js
73 lines (62 loc) · 2.72 KB
/
inxjs.js
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
let sup = `<center><h2>Welcome to MicroIntel</h2><h4>Where Innovation Meets Intelligence!</h4></center>
<div style="border:None;position: absolute; top:260px; left: 45%; transform: translate(-50%, -50%);">
<div id="sign" style="text-align: center;">
<h2>New User?<br>Sign Up</h2>
<form onsubmit="signup()">
<input type="text" id="uname" placeholder="enter full name" required><br>
<input type="text" id="uid" placeholder="enter to create user id" required><br>
<input type="password" id="upass" placeholder="enter password" required><br>
<input type="text" id="umail" placeholder="enter email holder" required><br>
<br><br>
<input type="submit">
</form>
</div>
</div>
`;
let logi = `<center><h2>Welcome to MicroIntel</h2><h4>Where Innovation Meets Intelligence!</h4></center>
<div style="position: absolute; top:200px; left: 50%; transform: translate(-50%, -50%); text-align: center;">
<center><h3>Sign In to <b>MicroIntel</b></h3></center>
<form onsubmit="login()">
<input type="text" id="luid" placeholder="enter user id" required>
<input type="password" id="lupass" placeholder="enter password" required>
<br><br>
<input type="submit">
</form>
</div>
`;
function signup() {
if(window.innerWidth>=820){
document.getElementById("sign").style.width='100%';
}
let Fname = document.getElementById('uname').value;
let Uid = document.getElementById('uid').value;
let Upass = document.getElementById('upass').value;
let Umail = document.getElementById('umail').value;
let miuserinfo = Fname + '/' + Uid + '|' + Upass + '$' + Umail;
let indfsub = miuserinfo.indexOf("/");
let indssub = miuserinfo.indexOf("|");
let indtsub = miuserinfo.indexOf("$");
localStorage.setItem("miut1", miuserinfo);
alert("User Account Created Scuessfully\n Just Sign in to MicroIntel");
}
function login() {
let LUid = document.getElementById('luid').value;
let LUpass = document.getElementById('lupass').value;
let Lmiuserinfo = LUid + '/' + LUpass;
localStorage.setItem("Lmiut1", Lmiuserinfo);
document.getElementById("input").innerHTML = logi;
window.location.href="https://microintel.github.io/microintel/micropro.html";
}
function get() {
let getMS = localStorage.getItem("miut1");
let getML = localStorage.getItem("Lmiut1");
//document.write(getMS);
if ((String(getMS)==String('null'))){
document.getElementById("input").innerHTML = sup;
} else if((String(getML)==String('null'))){
document.getElementById("input").innerHTML = logi;
}
else{
window.location.href="https://microintel.github.io/microintel/micropro.html";
}
}