-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforums.html
More file actions
422 lines (363 loc) Β· 22.4 KB
/
forums.html
File metadata and controls
422 lines (363 loc) Β· 22.4 KB
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<title>Hellcore | Support & Forums</title>
<style>
/* --- LOGO ANIMATION --- */
.logo {
display: block;
margin: 0 auto;
max-width: 200px;
padding: 20px 0;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
cursor: pointer;
filter: drop-shadow(0 0 0px transparent);
}
.logo:hover {
transform: scale(1.1) rotate(2deg);
filter: drop-shadow(0 0 20px rgba(255, 78, 0, 0.6));
}
nav { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; padding-top: 10px; }
/* --- NAV TABS --- */
nav a {
text-decoration: none; color: #fff; padding: 10px 18px; border-radius: 5px;
transition: 0.3s; font-weight: 600; position: relative; overflow: hidden;
display: inline-block; background: transparent; z-index: 1;
}
nav a::after {
content: ""; position: absolute; top: -50%; left: -110%; width: 50%; height: 200%;
background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
transform: rotate(30deg); transition: 0.6s;
}
nav a:hover::after { left: 110%; }
nav a::before {
content: ""; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
background: #ff4e00; box-shadow: 0 0 8px #ff4e00; transition: 0.3s ease; transform: translateX(-50%);
z-index: 2;
}
nav a:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
nav a:hover::before { width: 70%; }
nav a.active { background: rgba(255, 78, 0, 0.25); color: #ff4e00; border: 1px solid rgba(255, 78, 0, 0.4); }
/* --- MODALS --- */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
.modal-content { background: #111; margin: 2% auto; padding: 40px; width: 90%; max-width: 550px; border-radius: 20px; border: 2px solid #ff4e00; box-shadow: 0 0 30px rgba(255, 78, 0, 0.2); }
/* --- INPUTS --- */
input, select, textarea {
width: 100%; padding: 12px 5px; margin: 10px 0 25px; background: transparent !important;
border: none !important; border-bottom: 2px solid rgba(255, 255, 255, 0.2) !important;
color: white !important; border-radius: 0 !important; outline: none !important;
box-sizing: border-box; transition: 0.3s ease; font-size: 1rem;
}
input:focus, select:focus, textarea:focus { border-bottom: 2px solid #ff4e00 !important; filter: drop-shadow(0 2px 5px rgba(255, 78, 0, 0.3)); }
select option { background: #111; color: white; }
/* --- BUTTONS --- */
.submit-btn {
background: #ff4e00; color: white; border: none; padding: 12px 20px; border-radius: 8px;
font-weight: bold; cursor: pointer; transition: 0.3s; margin-top: 10px; position: relative; overflow: hidden;
text-align: center;
}
.submit-btn::after {
content: ""; position: absolute; top: -50%; left: -110%; width: 50%; height: 200%;
background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 100%);
transform: rotate(30deg); transition: 0.5s;
}
.submit-btn:hover::after { left: 110%; }
.submit-btn:hover { background: #ff7700; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 78, 0, 0.4); }
/* --- BUTTERY SMOOTH FAQ STYLES --- */
.faq-item {
border-bottom: 1px solid rgba(255, 78, 0, 0.1);
cursor: pointer;
padding: 5px 15px;
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
flex-direction: column;
border-radius: 8px;
margin-bottom: 5px;
}
.faq-item:hover { background: rgba(255, 255, 255, 0.03); }
.faq-item.active {
background: rgba(255, 78, 0, 0.05);
box-shadow: inset 0 0 15px rgba(255, 78, 0, 0.1);
border-bottom: 1px solid rgba(255, 78, 0, 0.4);
}
.faq-question {
display: flex;
justify-content: space-between;
align-items: center;
color: #ff4e00;
font-weight: bold;
font-size: 1rem;
padding: 15px 0;
}
.faq-question::after {
content: 'βΌ';
font-size: 0.7rem;
transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
opacity: 0.5;
color: #888;
}
.faq-item.active .faq-question::after {
transform: rotate(180deg);
opacity: 1;
color: #ff4e00;
}
/* The Secret to Smooth Height: CSS Grid Rows */
.faq-answer-container {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.active .faq-answer-container {
grid-template-rows: 1fr;
}
.faq-answer-content {
overflow: hidden;
color: #ddd;
font-size: 0.95rem;
line-height: 1.6;
}
.faq-inner-text {
padding-bottom: 20px;
}
/* --- UI COMPONENTS --- */
.support-grid { display: grid; grid-template-columns: 1fr 350px; gap: 25px; max-width: 1200px; margin: 0 auto; padding: 20px; }
.support-card { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 15px; padding: 25px; margin-bottom: 25px; position: relative; overflow: hidden; }
.ticket-item { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.6); padding: 15px 20px; border-radius: 10px; margin-top: 10px; border-left: 4px solid #ff4e00; transition: 0.3s; }
.btn-red { background: #ff0000 !important; }
.btn-secondary { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #eee; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }
.discord-widget { background: linear-gradient(135deg, #5865F2, #4752C4); border-radius: 15px; padding: 25px; text-align: center; color: white; }
#chatBox { height: 200px; overflow-y: auto; background: #080808; border-radius: 10px; padding: 15px; margin-top: 15px; border: 1px solid #222; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 8px 12px; border-radius: 8px; max-width: 80%; font-size: 0.85rem; line-height: 1.4; }
.msg-player { background: #ff4e00; color: white; align-self: flex-end; }
.msg-staff { background: #222; color: #00ff00; align-self: flex-start; border: 1px solid #00ff00; }
.chat-input-area { display: flex; gap: 10px; margin-top: 15px; }
</style>
</head>
<body>
<div class="overlay">
<div id="ticketModal" class="modal">
<div class="modal-content">
<h2 style="color: white; margin-top: 0; font-weight: 300; letter-spacing: 1px;">π© Open Support Ticket</h2>
<form id="supportForm" autocomplete="off">
<input type="text" id="mc_username" placeholder="Minecraft Username" required>
<input type="email" id="user_email" placeholder="Email Address" required>
<select id="ticket_category">
<option disabled selected>Select Category</option>
<option>Billing & Store Issue</option>
<option>Ban/Mute Appeal</option>
<option>Bug Report</option>
<option>Direct Contact (Admin)</option>
</select>
<textarea id="ticket_message" rows="3" placeholder="Describe your problem..." required></textarea>
<button type="button" class="submit-btn" id="submitBtn" onclick="submitTicket()" style="width: 100%;">Send Ticket to Staff</button>
<p onclick="closeTicket()" style="text-align: center; color: #888; cursor: pointer; margin-top: 20px; font-size: 0.9rem;">Cancel</p>
</form>
</div>
</div>
<div id="viewModal" class="modal">
<div class="modal-content" style="border-color: #00ff00;">
<h2 id="viewTitle" style="color: white; margin-top: 0;">Ticket Details</h2>
<div id="viewBody" style="color: #bbb; line-height: 1.6; background: #222; padding: 20px; border-radius: 10px; font-size: 0.9rem;"></div>
<div id="chatBox"></div>
<div id="chatInputGroup">
<div class="chat-input-area" id="chatInputArea">
<input type="text" id="playerChatInput" placeholder="Reply to staff..." style="margin: 0; padding: 5px;" onkeypress="if(event.key==='Enter') sendChatMessage()">
<button class="submit-btn" onclick="sendChatMessage()" style="margin: 0;">Send</button>
</div>
<p id="resolvedNotice" style="display:none; color: #00ff00; text-align: center; font-weight: bold; margin-top: 15px;">β
This ticket has been marked as RESOLVED. Chat is disabled.</p>
</div>
<button class="submit-btn" onclick="closeView()" style="width: 100%; margin-top: 20px; background: #333;">Close View</button>
</div>
</div>
<header><a href="home.html"><img src="logo.webp" class="logo"></a></header>
<nav>
<a href="home.html">Home</a>
<a href="players.html">Players</a>
<a href="minigames.html">Minigames</a>
<a href="secret-admin.html" class="active">Forums</a>
<a href="store.html">Store</a>
<a href="rules.html">Rules</a>
</nav>
<div class="support-grid">
<main>
<div class="support-card">
<h2 style="color: white; margin-top: 0;">π« Your Active Tickets</h2>
<div id="activeTickets"></div>
<button class="submit-btn" style="margin-top: 20px; width: 100%;" onclick="openTicket()">+ New Direct Contact Ticket</button>
</div>
<div class="support-card">
<h2 style="color: white; margin-top: 0;">β Frequently Asked Questions</h2>
<div class="faq-item" onclick="toggleFAQ(this)">
<div class="faq-question">Where is the server located?</div>
<div class="faq-answer-container">
<div class="faq-answer-content"><div class="faq-inner-text">Our high-performance nodes are located in <b>India</b> to ensure the best ping for our local community.</div></div>
</div>
</div>
<div class="faq-item" onclick="toggleFAQ(this)">
<div class="faq-question">Is this server premium only?</div>
<div class="faq-answer-container">
<div class="faq-answer-content"><div class="faq-inner-text">We are <b>Semi-Premium</b>. This means both Official and Cracked (TLauncher, SKLauncher, etc.) players can join!</div></div>
</div>
</div>
<div class="faq-item" onclick="toggleFAQ(this)">
<div class="faq-question">What is the staff response time?</div>
<div class="faq-answer-container">
<div class="faq-answer-content"><div class="faq-inner-text">We typically respond to all web tickets within <b>2 Hours</b>.</div></div>
</div>
</div>
<div class="faq-item" onclick="toggleFAQ(this)">
<div class="faq-question">Which clients are allowed?</div>
<div class="faq-answer-container">
<div class="faq-answer-content"><div class="faq-inner-text">All vanilla and optimization clients (Lunar, Badlion, Feather) are allowed. <b>Hacked/Cheat clients are strictly prohibited.</b></div></div>
</div>
</div>
<div class="faq-item" onclick="toggleFAQ(this)">
<div class="faq-question">Does this server have anticheat?</div>
<div class="faq-answer-container">
<div class="faq-answer-content"><div class="faq-inner-text">Yes, we use a custom advanced anticheat system to keep the gameplay fair for everyone.</div></div>
</div>
</div>
<div class="faq-item" onclick="toggleFAQ(this)">
<div class="faq-question">Is the server 24/7 online?</div>
<div class="faq-answer-container">
<div class="faq-answer-content"><div class="faq-inner-text"><b>Yes!</b> Our infrastructure is designed for 99.9% uptime, ensuring the world is available whenever you want to play.</div></div>
</div>
</div>
</div>
</main>
<aside>
<div class="discord-widget">
<h3>Community Support</h3>
<p style="font-size: 0.9rem; opacity: 0.9; margin-bottom: 20px;">Need instant help? Join our community.</p>
<a href="https://discord.gg/br5xSXjt" target="_blank" class="submit-btn" style="display: block; background: white; color: #5865F2; text-decoration: none; margin-bottom: 12px;">Join Discord</a>
<a href="community.html" style="text-decoration: none;">
<button class="submit-btn btn-secondary" style="width:100%; display:block;">Talk to Community</button>
</a>
</div>
</aside>
</div>
</div>
<script>
/* --- FAQ TOGGLE (AUTO-CLOSE OTHERS) --- */
function toggleFAQ(element) {
const isActive = element.classList.contains('active');
const allFaqs = document.querySelectorAll('.faq-item');
allFaqs.forEach(faq => faq.classList.remove('active'));
if (!isActive) {
element.classList.add('active');
}
}
const DISCORD_WEBHOOK_URL = "https://discord.com/api/webhooks/1479816690371137716/Wat42B2Sw4lPx67aUmfVRxFcnXPRbf-UshqocNJPFuZlFkgCrtDQgwmlPsSKTgT_2jrb";
let currentTicketId = null;
window.onload = function() { loadTickets(); setInterval(autoRefreshPlayerView, 1000); };
function openTicket() { document.getElementById('supportForm').reset(); document.getElementById('ticketModal').style.display = 'block'; }
function closeTicket() { document.getElementById('ticketModal').style.display = 'none'; }
function closeView() { document.getElementById('viewModal').style.display = 'none'; currentTicketId = null; }
function validateEmail(email) {
return String(email).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
}
async function submitTicket() {
const user = document.getElementById('mc_username').value;
const email = document.getElementById('user_email').value;
const cat = document.getElementById('ticket_category').value;
const msg = document.getElementById('ticket_message').value;
const btn = document.getElementById('submitBtn');
if(!user || !email || !msg) return alert("Please fill in all fields.");
if(!validateEmail(email)) return alert("Email is invalid");
const ticketID = Math.floor(Math.random() * 9000) + 1000;
const newTicket = { id: ticketID, username: user, email: email, category: cat, message: msg, status: "ACTIVE", chat: [] };
const savedTickets = JSON.parse(localStorage.getItem('userTickets')) || [];
savedTickets.push(newTicket);
localStorage.setItem('userTickets', JSON.stringify(savedTickets));
btn.innerText = "Processing..."; btn.disabled = true;
try {
await fetch(DISCORD_WEBHOOK_URL, {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ embeds: [{ title: "π₯ NEW TICKET", color: 16731648, fields: [{ name: "π€ Player", value: user, inline: true }, { name: "π Ticket ID", value: "#" + ticketID, inline: true }, { name: "π Category", value: cat }, { name: "π¬ Message", value: "```" + msg + "```" }] }] })
});
alert("Ticket Submitted!");
loadTickets(); closeTicket();
} catch (err) {
loadTickets(); closeTicket();
} finally {
btn.innerText = "Send Ticket to Staff";
btn.disabled = false;
}
}
function loadTickets() {
const container = document.getElementById('activeTickets');
container.innerHTML = "";
const savedTickets = JSON.parse(localStorage.getItem('userTickets')) || [];
savedTickets.forEach(t => {
const isResolved = t.status === "RESOLVED";
const html = `<div class="ticket-item" id="ticket-${t.id}" style="border-left-color: ${isResolved ? '#00ff00' : '#ff4e00'}">
<div><span id="stat-text-${t.id}" style="color: ${isResolved ? '#00ff00' : '#ffaa00'}; font-size: 0.75rem; font-weight: bold;">β ${t.status}</span><h4 style="margin: 5px 0; color: white;">#${t.id} - ${t.category}</h4></div>
<div style="display: flex; gap: 8px;"><button class="submit-btn" style="padding: 6px 12px; font-size: 0.8rem; margin:0;" onclick="showDetails(${t.id})">View/Chat</button><button class="submit-btn btn-red" style="padding: 6px 12px; font-size: 0.8rem; margin:0;" onclick="deleteTicket(${t.id})">Close</button></div>
</div>`;
container.insertAdjacentHTML('afterbegin', html);
});
}
function autoRefreshPlayerView() {
const savedTickets = JSON.parse(localStorage.getItem('userTickets')) || [];
if (currentTicketId) {
const t = savedTickets.find(ticket => ticket.id == currentTicketId);
if (t) {
const isResolved = t.status === "RESOLVED";
const chatBox = document.getElementById('chatBox');
const newChatHtml = (t.chat || []).map(m => `<div class="msg ${m.role === 'Staff' ? 'msg-staff' : 'msg-player'}">${m.text}</div>`).join('');
if (chatBox.innerHTML !== newChatHtml) { chatBox.innerHTML = newChatHtml; chatBox.scrollTop = chatBox.scrollHeight; }
document.getElementById('chatInputArea').style.display = isResolved ? 'none' : 'flex';
document.getElementById('resolvedNotice').style.display = isResolved ? 'block' : 'none';
}
}
}
function showDetails(id) {
currentTicketId = id;
const savedTickets = JSON.parse(localStorage.getItem('userTickets')) || [];
const t = savedTickets.find(ticket => ticket.id == id);
if(t) {
document.getElementById('viewTitle').innerText = "Ticket #" + t.id;
document.getElementById('viewBody').innerHTML = `<p><strong>User:</strong> ${t.username}</p><p><strong>Category:</strong> ${t.category}</p><p><strong>Message:</strong><br>${t.message}</p>`;
renderChat(t.chat || []);
document.getElementById('viewModal').style.display = 'block';
}
}
function renderChat(chatArray) {
const box = document.getElementById('chatBox');
box.innerHTML = "";
chatArray.forEach(m => {
const div = document.createElement('div');
div.className = `msg ${m.role === 'Staff' ? 'msg-staff' : 'msg-player'}`;
div.innerText = m.text;
box.appendChild(div);
});
box.scrollTop = box.scrollHeight;
}
async function sendChatMessage() {
const input = document.getElementById('playerChatInput');
const text = input.value.trim();
if(!text) return;
let savedTickets = JSON.parse(localStorage.getItem('userTickets')) || [];
const index = savedTickets.findIndex(t => t.id == currentTicketId);
if(index !== -1) {
savedTickets[index].chat.push({ role: "Player", text: text });
localStorage.setItem('userTickets', JSON.stringify(savedTickets));
input.value = ""; renderChat(savedTickets[index].chat);
fetch(DISCORD_WEBHOOK_URL, { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ content: `π¬ **Ticket #${currentTicketId}** Player: ${text}` }) });
}
}
async function deleteTicket(id) {
if(!confirm("Are you sure you want to close this ticket?")) return;
let savedTickets = JSON.parse(localStorage.getItem('userTickets')) || [];
savedTickets = savedTickets.filter(t => t.id != id);
localStorage.setItem('userTickets', JSON.stringify(savedTickets));
loadTickets();
}
window.onclick = function(e) { if(e.target.className === 'modal') { closeTicket(); closeView(); } }
</script>
</body>
</html>