4
1
Fork 0

änderungen

This commit is contained in:
Alpha 2018-02-20 17:56:28 +01:00
parent 744e421c70
commit eaafc714cb
5 changed files with 10 additions and 7 deletions

View file

@ -51,10 +51,11 @@ app.get('/assets/*', function(req, res){
res.sendFile(__dirname + req.originalUrl) res.sendFile(__dirname + req.originalUrl)
}) })
app.post('/',function(req,res){ app.post('/',function(req,res){
if( if(
req.body.name === 'Simon' && req.body.pass === 'password' || req.body.name === 'Simon' && req.body.pass === 'password' ||
req.body.name === 'USER2' && req.body.pass === 'rfcgvhbßä06' req.body.name === 'Suxxi' && req.body.pass === 'GSGSpandau'
){ ){
req.session.name = req.body.name req.session.name = req.body.name
req.session.pass = req.body.pass req.session.pass = req.body.pass

View file

@ -1,13 +1,13 @@
<link rel="stylesheet" href="/css/main_style.css"> <link rel="stylesheet" href="/assets/css/main_style.css">
<div align="center"> <div align="center">
<img src="/assets/top.png" align="top"> <img src="/assets/top.png" align="top">
<img src="assets/bleft.png" align="left"> <img src="/assets/bleft.png" align="left">
<img src="assets/bright.png" align="right"> <img src="/assets/bright.png" align="right">
<table Border = 1 class="col"> <table Border = 1 class="col">
<tr> <tr>
@ -15,14 +15,16 @@
<th>Level</th> <th>Level</th>
<th>Gold</th> <th>Gold</th>
<th>Class</th> <th>Class</th>
<th>Aktion</th>
<th>Exp</th> <th>Exp</th>
</tr> </tr>
{{#instances}} {{#instances}}
<tr> <tr>
<td>{{name}}</td> <td>{{name}}</td>
<td>{{level}}<img src="assets/Arrow.png" align="right"></td> <td>{{level}}<img src="/assets/Arrow.png" align="right"></td>
<td>{{gold}}<img src="assets/Gold.png" align="right"></td> <td>{{gold}}<img src="/assets/Gold.png" align="right"></td>
<td>{{class}}</td> <td>{{class}}</td>
<td>{{currentAction}}</td>
<td><progress value={{exp_percentage}} max="1"></progress></td> <td><progress value={{exp_percentage}} max="1"></progress></td>
</tr> </tr>
{{/instances}} {{/instances}}

View file

@ -1,7 +1,7 @@
<html> <html>
<head> <head>
<title>Session Management in NodeJS using Express4.2</title> <title>Session Management in NodeJS using Express4.2</title>
<script src="assets/jquery-3.3.1.min.js"></script> <script src="/assets/js/jquery-3.3.1.min.js"></script>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
var name,pass; var name,pass;