changes
This commit is contained in:
@@ -761,6 +761,7 @@ app.post('/buy',requireLogin,(req,res) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app.post('/charge', requireLogin, async (req, res) => {
|
app.post('/charge', requireLogin, async (req, res) => {
|
||||||
const payforwhat=req.body.payforwhat;
|
const payforwhat=req.body.payforwhat;
|
||||||
if (!check_payforwhat(payforwhat,req)) return res.json({ error: 'Invalid PayForWhat' });
|
if (!check_payforwhat(payforwhat,req)) return res.json({ error: 'Invalid PayForWhat' });
|
||||||
|
|||||||
@@ -35,24 +35,37 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 240px auto;
|
grid-template-columns: 240px auto;
|
||||||
grid-template-rows: 40px auto;
|
grid-template-rows: 40px auto;
|
||||||
font-family: Arial, sans-serif;
|
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-column: 1;
|
||||||
grid-row: 1 / 3;
|
grid-row: 2 / 3;
|
||||||
background-color: #FFC0C0;
|
background-color: #C0C0C0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message {
|
.message {
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
background-color: #C0FFC0;
|
background-color: #C0C0C0;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
}
|
}
|
||||||
@@ -60,5 +73,5 @@ body {
|
|||||||
.content {
|
.content {
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
background-color: #C0C0FF;
|
background-color: #E0E0E0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<%- include('partials/nav') %>
|
<%- include('partials/nav') %>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Change Password
|
<h1>Change Password</h1>
|
||||||
<form id="editor" method="POST" action="/changepassword">
|
<form id="editor" method="POST" action="/changepassword">
|
||||||
Old Password:<input type="password" name="password0"><br>
|
Old Password:<input type="password" name="password0"><br>
|
||||||
New Password:<input type="password" name="password1"><br>
|
New Password:<input type="password" name="password1"><br>
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
@@ -1,26 +1,28 @@
|
|||||||
<!-- views/partials/nav.ejs -->
|
<!-- views/partials/nav.ejs -->
|
||||||
<div class="nav">
|
<div class="nav-header">
|
||||||
Falls on Fire<br>
|
Falls on Fire
|
||||||
|
</div>
|
||||||
|
<div class="nav-items">
|
||||||
<a href="/buy">Buy Tickets</a><br>
|
<a href="/buy">Buy Tickets</a><br>
|
||||||
<%if (typeof username!='undefined' && username) {%>
|
<%if (typeof username!='undefined' && username) {%>
|
||||||
<a href="/mytickets">View My Tickets</a><br>
|
<a href="/mytickets">View My Tickets</a><br>
|
||||||
<%}%>
|
<%}%>
|
||||||
<%if (typeof superuser!='undefined' && superuser) {%>
|
<%if (typeof superuser!='undefined' && superuser) {%>
|
||||||
<a href="/camps">View Camps (Admin)</a><br>
|
<a href="/camps">View Camps (Admin)</a><br>
|
||||||
<a href="/settings">Settings (Admin)</a><br>
|
<a href="/settings">Settings (Admin)</a><br>
|
||||||
<%}%>
|
<%}%>
|
||||||
<%if (typeof username!='undefined' && username) {%>
|
<%if (typeof username!='undefined' && username) {%>
|
||||||
<a href="/changepassword">Change Password</a><br>
|
<a href="/changepassword">Change Password</a><br>
|
||||||
<a href="/logout">Log Out</a><br>
|
<a href="/logout">Log Out</a><br>
|
||||||
<%} else {%>
|
<%} else {%>
|
||||||
<a href="/create">Create Account</a><br>
|
<a href="/create">Create Account</a><br>
|
||||||
<a href="/login">Log In</a><br>
|
<a href="/login">Log In</a><br>
|
||||||
<%}%>
|
<%}%>
|
||||||
</div>
|
</div>
|
||||||
<div class="message" id="message">
|
<div class="message" id="message">
|
||||||
<% if (typeof commonData.message !== 'undefined') { %>
|
<% if (typeof commonData.message !== 'undefined') { %>
|
||||||
<p><%= commonData.message %></p>
|
<p><%= commonData.message %></p>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% if (commonData.error) { %>
|
<% if (commonData.error) { %>
|
||||||
<div id="errorModal">
|
<div id="errorModal">
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -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>
|
|
||||||
Reference in New Issue
Block a user