-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstaff.html
112 lines (102 loc) · 4.96 KB
/
staff.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Staff Jelentkezés - SunLightRP</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="shortcut icon" href="res/images/header-slrp.png" type="image/x-icon">
<link rel="stylesheet" href="res/css/addon-styles.css">
</head>
<body>
<img src="res/images/header-slrp.png" alt="" class="rounded mx-auto d-block m-5" width="100px">
<h1 class="text-center text-white display-4 m-5"><b class="b-title" style="font-weight: 500">SunLightRP</b> Staff
Jelentkezés</h1>
<form onsubmit="sendContact(event)" class="container" style="max-width: 60vh; ">
<div class="mb-3">
<label for="emailInput" class="form-label">E-mail címed</label>
<input type="email" class="form-control ninpot" id="emailInput" placeholder="[email protected]" required>
</div>
<div class="mb-3">
<label for="messageInput" class="form-label">Discord neved</label>
<input type="text" class="form-control ninpot" id="dcInput" placeholder="Discordneved#1233" required>
</div>
<div class="mb-3">
<label for="messageInput" class="form-label">Hány éves vagy?</label>
<input type="text" class="form-control ninpot" id="korInput" placeholder="43" required>
</div>
<div class="mb-3">
<label for="messageInput" class="form-label">Voltál már admin szerveren? (Ha igen, hol és mennyit)</label>
<input type="text" class="form-control ninpot" id="voltInput"
placeholder="Igen, a(z) XYZ szerveren, másfél hónapot voltam admin 4 rangban." required>
</div>
<div class="mb-3">
<label for="messageInput" class="form-label">Naponta mennyi időt tudnál foglalkozni a szerverrel?</label>
<input type="text" class="form-control ninpot" id="foglInput"
placeholder="Igyekszem majd minél többet foglalkozni vele, naponta nagyjából 2-3 órát tudnék fent lenni."
required>
</div>
<button type="submit" class="btn btn-primary rounded mx-auto d-block m-5">Jelentkezés</button>
<button type="submit" class="btn btn-secondary rounded mx-auto d-block m-5" onclick="fooldal()">Vissza a
főoldalra</button>
</form>
<p class="text-center text-white text-opacity-25 mt-1">SunLightRP 2023 © | sunlightrp.hu</a></p>
</body>
<script>
function fooldal() {
window.open("index.html", "_self")
}
</script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-zYPOMqeu1DAVkHiLqWBUTcbYfZ8osu1Nd6Z89ify25QV9guujx43ITvfi12/QExE"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-Y4oOpwW3duJdCWv5ly8SCFYWqFDsfob/3GkgExXKV4idmbt98QcxXYs9UoXAB7BZ"
crossorigin="anonymous"></script>
<script>
async function sendContact(ev) {
ev.preventDefault();
/*
const senderEmail = document.getElementById('emailInput').value;
const senderDiscord = document.getElementById('dcInput').value;
const senderKor = document.getElementById('korInput').value;
const senderVolte = document.getElementById('voltInput').value;
const senderFogl = document.getElementById('foglInput').value;
*/
const body = {
senderEmail: document.getElementById('emailInput').value,
senderDiscord: document.getElementById('dcInput').value,
senderKor: document.getElementById('korInput').value,
senderVolte: document.getElementById('voltInput').value,
senderFogl: document.getElementById('foglInput').value,
};
const apiUrl = 'https://play.sunlightrp.hu:3000/api/jelentkezes/staff';
const response = await fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
})
.then(resp => resp.json())
.then(result => {
console.log(result)
if (result == true) return window.location.replace('vettuk.html?from=staff', "_self");
window.location.replace('sikertelen-jelentkezes.html', "_self");
})
.catch(err => {
console.error(err);
window.location.replace('sikertelen-jelentkezes.html', "_self");
});
/*
if (response.ok) {
window.location.replace('vettuk.html?from=staff', "_self")
} else {
window.location.replace('sikertelen-jelentkezes.html', "_self")
}
*/
}
</script>
</html>