-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
26 lines (24 loc) · 844 Bytes
/
index.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
let url = 'http://localhost:63342/WebProject/index.php'
simplePhpPostRequest(
url,
{},
res => {
res.json()
.then(res => {
let success = res['success']
if (success){
let isAdmin = res['isAdmin']
if(isAdmin === '0'){
window.location.replace("http://localhost:63342/WebProject/showUsersInfo/showUserInfo.html")
}
else {
window.location.replace("http://localhost:63342/WebProject/adminDashboard/adminDashboard.html")
}
}
else {
window.location.replace("http://localhost:63342/WebProject/signupLogin/signup/signup.html")
}
})
},
reason => {
})