2024-12-28 00:07:12 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<title>Settings</title>
|
|
|
|
|
<link rel="stylesheet" href="styles.css">
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<%- include('partials/nav') %>
|
|
|
|
|
<div class="content">
|
2025-02-25 00:02:58 -05:00
|
|
|
<input type="checkbox" class="setting" name="enable-email" <%= settings["enable-email"] ? "checked" : "" %> >Enable Email<br>
|
|
|
|
|
<input type="checkbox" class="setting" name="enable-ticket-use" <%= settings["enable-ticket-use"] ? "checked" : "" %> >Enable Ticket Use<br>
|
|
|
|
|
<input type="checkbox" class="setting" name="enable-credit-cards" <%= settings["enable-credit-cards"] ? "checked" : "" %> >Enable Credit Cards<br>
|
2025-03-03 23:53:35 -05:00
|
|
|
<input type="checkbox" class="setting" name="enable-transfer" <%= settings["enable-transfer"] ? "checked" : "" %> >Enable Transfer<br>
|
2024-12-28 00:07:12 -05:00
|
|
|
<form action='/purge' method='post'>
|
|
|
|
|
<button type="submit" >Purge Revoked Tickets</button>
|
|
|
|
|
</form>
|
|
|
|
|
<form action='/wipedb' method='post'>
|
|
|
|
|
<button type="submit" >Wipe the Database</button>
|
|
|
|
|
</form>
|
2024-12-29 18:31:06 -05:00
|
|
|
<form action='/serialize' method='post'>
|
|
|
|
|
<button type="submit" >Serialize</button>
|
|
|
|
|
</form>
|
|
|
|
|
<form action='/deserialize' method='post'>
|
|
|
|
|
<button type="submit" >Deserialize</button>
|
|
|
|
|
</form>
|
2025-03-09 22:13:57 -04:00
|
|
|
<form action='/killmagiclink' method='post'>
|
|
|
|
|
Deactivate Magic Links for:
|
|
|
|
|
<input type="email" name="email">
|
|
|
|
|
<button type="submit">Deactivate</button>
|
|
|
|
|
</form>
|
2025-03-13 23:01:20 -04:00
|
|
|
<form action="/addopen" method="post">
|
|
|
|
|
Open Camping Tickets: <%=opencount%> / <%=settings['open-limit']%>
|
|
|
|
|
<input type="number" name="addopen">
|
|
|
|
|
<button type="submit">Add</button>
|
|
|
|
|
</form
|
2025-03-03 21:36:38 -05:00
|
|
|
<form action="/importfb" method="post" enctype="multipart/form-data">
|
2025-03-09 22:13:57 -04:00
|
|
|
Import Tickets (Frostburn Format):
|
2025-03-03 21:36:38 -05:00
|
|
|
<input type="file" name="file">
|
|
|
|
|
<input type="submit" value="Upload">
|
|
|
|
|
</form>
|
2024-12-28 00:07:12 -05:00
|
|
|
</div>
|
|
|
|
|
</body>
|
2024-12-29 17:20:34 -05:00
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const MessageArea=document.getElementById("message");
|
|
|
|
|
const checkboxes = document.getElementsByClassName("setting");
|
|
|
|
|
for (let i=0; i<checkboxes.length; i++) checkboxes[i].addEventListener('change',(event) => {
|
|
|
|
|
console.log(event);
|
|
|
|
|
fetch('/update-setting',{ method:"POST", headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name:event.target.name, checked:event.target.checked }) })
|
|
|
|
|
.then(response => {
|
|
|
|
|
if (!response.ok) throw new Error("Network Error: Server did not respond.");
|
|
|
|
|
MessageArea.textContent="Updated "+event.target.name;
|
|
|
|
|
return response.json();
|
|
|
|
|
})
|
|
|
|
|
.catch(error => console.error('Error updating checkbox state:', error));
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|
2024-12-28 00:07:12 -05:00
|
|
|
</html>
|
|
|
|
|
|