mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
donate button, and redirect
This commit is contained in:
parent
34cd2f25d6
commit
3d26aee605
4 changed files with 47 additions and 4 deletions
|
@ -36,6 +36,12 @@ const recivedFiles = 'public/recivedfiles'
|
||||||
const uloadFiles = 'public/f'
|
const uloadFiles = 'public/f'
|
||||||
const dataFile = 'public/data.json'
|
const dataFile = 'public/data.json'
|
||||||
const msgFile = 'stats/msgs'
|
const msgFile = 'stats/msgs'
|
||||||
|
let donateURL = ''
|
||||||
|
try {
|
||||||
|
donateURL = utils.ReadFile('./data/donateURL')
|
||||||
|
} catch (e) {
|
||||||
|
logger.Log('Couldnt read donate URL file!', logger.GetColor('red'))
|
||||||
|
}
|
||||||
|
|
||||||
app.set('view engine', 'ejs')
|
app.set('view engine', 'ejs')
|
||||||
app.use(express.static('public'))
|
app.use(express.static('public'))
|
||||||
|
@ -140,8 +146,16 @@ app.get('/install', function (req, res) {
|
||||||
logger.LogReq(req)
|
logger.LogReq(req)
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get('/install', function (req, res) {
|
app.get('/donate', function (req, res) {
|
||||||
res.redirect(url + '/moodle-test-userscript/stable.user.js')
|
res.redirect(donateURL)
|
||||||
|
res.end()
|
||||||
|
logger.LogReq(req)
|
||||||
|
})
|
||||||
|
|
||||||
|
app.get('/thanks', function (req, res) {
|
||||||
|
res.render('qmining/thanks', {
|
||||||
|
siteurl: url
|
||||||
|
})
|
||||||
res.end()
|
res.end()
|
||||||
logger.LogReq(req)
|
logger.LogReq(req)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 0cfd9cfda377ff8917df50e68f105ec43f5e9311
|
Subproject commit 5dac788b18b7240a4194a2a37ecbee857292800d
|
|
@ -40,7 +40,8 @@
|
||||||
<a href="<%= siteurl %>/data.json">Összes kérdés (JSON)</a> |
|
<a href="<%= siteurl %>/data.json">Összes kérdés (JSON)</a> |
|
||||||
<a href="<%= siteurl %>/servergit">Szerver repó</a> |
|
<a href="<%= siteurl %>/servergit">Szerver repó</a> |
|
||||||
<a href="<%= siteurl %>/scriptgit">Userscript repó</a> |
|
<a href="<%= siteurl %>/scriptgit">Userscript repó</a> |
|
||||||
<a href="<%= siteurl %>/classesgit">Classes repó</a>
|
<a href="<%= siteurl %>/classesgit">Classes repó</a> |
|
||||||
|
<a href="<%= siteurl %>/donate">Donate</a>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
28
views/qmining/thanks.ejs
Normal file
28
views/qmining/thanks.ejs
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<html>
|
||||||
|
<body bgcolor="#212127">
|
||||||
|
<head>
|
||||||
|
<title>Question mining</title>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=0.8" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font: normal 14px Verdana;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #9999ff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<center>
|
||||||
|
<h1>
|
||||||
|
Thanks for the gold kind question miner! =^.^=
|
||||||
|
</br>
|
||||||
|
<a href="<%= siteurl %>">Vissza a főoldalra</a>
|
||||||
|
</h1>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue