This commit is contained in:
2025-03-11 19:07:16 -04:00
parent 84290f9c46
commit 74808f3fb2
8 changed files with 46 additions and 122 deletions

View File

@@ -761,6 +761,7 @@ app.post('/buy',requireLogin,(req,res) => {
app.post('/charge', requireLogin, async (req, res) => {
const payforwhat=req.body.payforwhat;
if (!check_payforwhat(payforwhat,req)) return res.json({ error: 'Invalid PayForWhat' });

View File

@@ -35,24 +35,37 @@
cursor: pointer;
}
h1 {
font-size: 1.2rem;
}
body {
display: grid;
grid-template-columns: 240px auto;
grid-template-rows: 40px auto;
font-family: Arial, sans-serif;
}
.nav {
.nav-header {
font-size: 1.5rem;
padding: 10px 15px;
grid-column: 1 / 3;
grid-row: 1;
background-color: #C0C0C0;
}
.nav-items {
padding: 10px 15px;
grid-column: 1;
grid-row: 1 / 3;
background-color: #FFC0C0;
grid-row: 2 / 3;
background-color: #C0C0C0;
}
.message {
grid-column: 2;
grid-row: 1;
background-color: #C0FFC0;
background-color: #C0C0C0;
align-content: center;
justify-items: center;
}
@@ -60,5 +73,5 @@ body {
.content {
grid-column: 2;
grid-row: 2;
background-color: #C0C0FF;
background-color: #E0E0E0;
}

View File

@@ -7,7 +7,7 @@
<body>
<%- include('partials/nav') %>
<div class="content">
Change Password
<h1>Change Password</h1>
<form id="editor" method="POST" action="/changepassword">
Old Password:<input type="password" name="password0"><br>
New Password:<input type="password" name="password1"><br>

View File

@@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>You don't have any tickets</title>
</head>
<body>
<h1>No tickets for you!!</h1>
</body>
</html>

View File

@@ -1,27 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Your Tickets</title>
</head>
<body>
<h1>Welcome, <%= username %>!</h1>
<table border="1">
<tr>
<th>Ticket</th>
<th>Owner</th>
<th>Offered To</th>
<th>QRCode</th>
</tr>
<% for (const t in tlist) { %>
<tr>
<td> <%= t %> </td>
<td> <%= tlist[t].owner %> </td>
<td> <%= tlist[t].offered %> </td>
<td> <%= QRCode.toDataURL("https://abc.com", function(err,url) { if (err) { console.error(err); return; } console.log(url); }); %> </td>
</tr>
<% } %>
<tr>
</tr>
</table>
</body>
</html>

View File

@@ -1,6 +1,8 @@
<!-- views/partials/nav.ejs -->
<div class="nav">
Falls on Fire<br>
<div class="nav-header">
Falls on Fire
</div>
<div class="nav-items">
<a href="/buy">Buy Tickets</a><br>
<%if (typeof username!='undefined' && username) {%>
<a href="/mytickets">View My Tickets</a><br>

View File

@@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Your Tickets</title>
</head>
<body>
<h1>Welcome, <%= username %>!</h1>
<table border="1">
<tr>
<th>Ticket</th>
<th>Owner</th>
<th>Offered To</th>
<th>QRCode</th>
</tr>
<% for (const t in tlist) { %>
<tr>
<td> <%= t %> </td>
<td> <%= tlist[t].owner %> </td>
<td> <%= tlist[t].offered %> </td>
<td> <%= simpledata %> </td>
<td> <%= QRCode.toDataURL("https://abc.com", function(err,url) { if (err) { console.error(err); return; } console.log(url); }); %> </td>
</tr>
<% } %>
<tr>
</tr>
</table>
</body>
</html>

View File

@@ -1,28 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Your Tickets</title>
</head>
<body>
<h1>Welcome, <%= username %>!</h1>
<table border="1">
<tr>
<th>Ticket</th>
<th>Owner</th>
<th>Offered To</th>
<th>QRCode</th>
</tr>
<% for (const t in tlist) { %>
<tr>
<td> <%= t %> </td>
<td> <%= tlist[t].owner %> </td>
<td> <%= tlist[t].offered %> </td>
<td> <%= simpledata %> </td>
<td> <%= QRCode.toDataURL("https://abc.com", function(err,url) { if (err) { console.error(err); return; } console.log(url); }); %> </td>
</tr>
<% } %>
<tr>
</tr>
</table>
</body>
</html>