This commit is contained in:
Micik2 2018-11-28 01:38:57 +01:00
parent 81e382f4a1
commit 99ab046a75
11 changed files with 1041 additions and 50 deletions

View File

@ -45,13 +45,25 @@ testing_face = 0
def main():
return render_template('index.html', info="Witaj!")
@app.route("/indexENG")
def indexENG():
return render_template('indexENG.html', info="Hello!")
@app.route('/showSignUp')
def showSignUp():
return render_template('signup.html')
@app.route('/showSignUpENG')
def showSignUpENG():
return render_template('signupENG.html')
@app.route('/showSignIn')
def showSignIn():
return render_template('signin.html')
@app.route('/showSignInENG')
def showSignInENG():
return render_template('signinENG.html')
@app.route('/signUp',methods=['POST','GET'])
def signUp():
@ -93,6 +105,46 @@ def signUp():
cursor.close()
conn.close()
@app.route('/signUpENG',methods=['POST','GET'])
def signUpENG():
try:
_login = request.form['inputLogin']
_password = request.form['inputPassword']
# validate the received values
if _login and _password:
# All Good, let's call MySQL
conn = mysql.connect()
cursor = conn.cursor()
#_hashed_password = generate_password_hash(_password)
#cursor.callproc('rejestracja4',(_name,_email,_hashed_password))
#cursor.callproc('rejestracja4',(_name,_email,_password))
#cursor.callproc('dodajUzytkownika', (_email, _password, _type, _organization, _name, _surname))
args = (_login, _password)
cursor.execute("INSERT into Users(login, password) values(%s, %s)", args)
data = cursor.fetchall()
if len(data) is 0:
conn.commit()
#return redirect("index.html")
#return redirect("/")
return render_template("indexENG.html", info="Successfully registered!")
#return json.dumps({'message':'User created successfully !'})
else:
return render_template("errorENG.html", error="The user already exists!")
#return json.dumps({'error':str(data[0])})
else:
return json.dumps({'html':'<span>Enter the required fields</span>'})
#except Exception as e:
# return json.dumps({'error':str(e)})
finally:
cursor.close()
conn.close()
@app.route('/validateLogin',methods=['POST'])
def validateLogin():
try:
@ -112,7 +164,8 @@ def validateLogin():
#if str(data[0][3]) == _password:
if str(data[0][1]) == _password:
session['user'] = data[0][0]
return redirect('/userHome')
#return redirect('/userHome', user=session['user'])
return render_template('userHome.html', user=session['user'])
else:
return render_template('error.html',error = 'Zly email lub haslo!')
else:
@ -123,52 +176,63 @@ def validateLogin():
finally:
cursor.close()
con.close()
@app.route('/validateLoginENG',methods=['POST'])
def validateLoginENG():
try:
_username = request.form['inputLogin']
_password = request.form['inputPassword']
con = mysql.connect()
cursor = con.cursor()
#cursor.callproc('logowanie',(_username,))
args = (_username, _password)
query = "SELECT * from Users where login = %s and password = %s"
cursor.execute(query, args)
data = cursor.fetchall()
if len(data) > 0:
#if check_password_hash(str(data[0][3]),_password):
#if str(data[0][3]) == _password:
if str(data[0][1]) == _password:
session['user'] = data[0][0]
#return redirect('/userHomeENG', user=session['user'])
return render_template('userHomeENG.html', user=session['user'])
else:
return render_template('errorENG.html',error = 'Wrong email or password!')
else:
return render_template('errorENG.html',error = 'Wrong email or password!')
except Exception as e:
return render_template('errorENG.html', error = str(e))
finally:
cursor.close()
con.close()
@app.route('/userHome')
def userHome():
if session.get('user'):
return render_template('userHome.html')
return render_template('userHome.html', user=session['user'])
else:
return render_template('error.html',error = 'Nieautoryzowany dostep!')
@app.route('/userHomeENG')
def userHomeENG():
if session.get('user'):
return render_template('userHomeENG.html', user=session['user'])
else:
return render_template('errorENG.html',error = 'Unauthorized access!')
@app.route('/logout')
def logout():
session.pop('user',None)
return redirect('/')
@app.route('/newSheet', methods=['POST','GET'])
def newSheet():
try:
_sheet_name = request.form['inputSheetName']
_number_items = request.form['inputItems']
_number_operators = request.form['inputOperators']
_number_chars = request.form['inputChars']
_number_trials = request.form['inputTrials']
if _sheet_name and _number_items and _number_operators and _number_chars and _number_trials:
conn = mysql.connect()
cursor = conn.cursor()
cursor.callproc('nowyArkusz',(_sheet_name, _number_items,_number_operators,_number_chars, _number_trials))
data = cursor.fetchall()
if len(data) is 0:
conn.commit()
return redirect('/sheet')
#return json.dumps({'message':'Arkusz stworzono poprawnie!'})
else:
return json.dumps({'error':str(data[0])})
else:
return json.dumps({'html':'<span>Enter the required fields</span>'})
except Exception as e:
return json.dumps({'error':str(e)})
finally:
cursor.close()
conn.close()
#return render_template('newSheet.html')
@app.route('/sheet', methods=['POST'])
def sheet():
return render_template('sheet.html')
@app.route('/logoutENG')
def logoutENG():
session.pop('user',None)
return redirect('/indexENG')
@app.route('/signUpWithFace')
def signUpWithFace():
@ -277,6 +341,113 @@ def signUpWithFace():
'''
#return render_template('error.html', error="Nie wykryto twarzy!")
@app.route('/signUpWithFaceENG')
def signUpWithFaceENG():
cascPath = "haarcascade_frontalface_default.xml"
faceCascade = cv2.CascadeClassifier(cascPath)
log.basicConfig(filename='webcam.log',level=log.INFO)
video_capture = cv2.VideoCapture(0)
anterior = 0
faces = None
#testing_face = 0
#faces_list = []
i = 0
while True:
if not video_capture.isOpened():
print('Unable to load camera.')
sleep(5)
pass
# Capture frame-by-frame
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30)
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
if anterior != len(faces):
anterior = len(faces)
log.info("faces: "+str(len(faces))+" at "+str(dt.datetime.now()))
# Display the resulting frame
cv2.imshow('Video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# Display the resulting frame
cv2.imshow('Video', frame)
#break
#face_list.append()
#print (type(faces))
#print (len(faces))
#print (type(faces[0]))
#print (type(faces[0][0]))
#if testing_face == faces:
# break
#if type(faces) == "numpy.ndarray" or type(faces) == "ndarray":
#if not isinstance(faces, types.TupleType):
if type(faces) is not tuple:
i += 1
face = 0
for f in faces[0]:
face += f
faces_list.append(face)
if i == 5:
break
# faces_list.append(faces)
# i += 1
# if i == 5:
# break
'''
face = 0
i += 1
for id in faces[0]:
face += id
if i == 5:
break
if 825 == face:
video_capture.release()
cv2.destroyAllWindows()
return render_template('index.html')
print (face)
'''
#return render_template("index.html")
#print (faces)
# When everything is done, release the capture
video_capture.release()
cv2.destroyAllWindows()
print (faces_list)
return render_template('indexENG.html', info="A face has been saved")
'''
face = 0
for id in faces[0]:
face += id
print (id)
#if face
print (face)
'''
#return render_template('error.html', error="Nie wykryto twarzy!")
@app.route('/signInWithFace')
def signInWithFace():
cascPath = "haarcascade_frontalface_default.xml"
@ -347,7 +518,79 @@ def signInWithFace():
video_capture.release()
cv2.destroyAllWindows()
#print (faces_list)
return render_template('userHome.html', info="Zapisano twarz")
return render_template('userHome.html', info="Zapisano twarz", user=session.get('user'))
@app.route('/signInWithFaceENG')
def signInWithFaceENG():
cascPath = "haarcascade_frontalface_default.xml"
faceCascade = cv2.CascadeClassifier(cascPath)
log.basicConfig(filename='webcam.log',level=log.INFO)
video_capture = cv2.VideoCapture(0)
anterior = 0
faces = None
testing_face = 825
#faces_list = []
i = 0
while True:
if not video_capture.isOpened():
print('Unable to load camera.')
sleep(5)
pass
# Capture frame-by-frame
ret, frame = video_capture.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(
gray,
scaleFactor=1.1,
minNeighbors=5,
minSize=(30, 30)
)
# Draw a rectangle around the faces
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
if anterior != len(faces):
anterior = len(faces)
log.info("faces: "+str(len(faces))+" at "+str(dt.datetime.now()))
# Display the resulting frame
cv2.imshow('Video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# Display the resulting frame
cv2.imshow('Video', frame)
#print (faces_list)
if type(faces) is not tuple:
face = 0
i += 1
for f in faces[0]:
face += f
if face in faces_list:
break
# print (faces)
# if faces in faces_list:
# break
elif i == 20:
return render_template("errorENG.html", error="Lack of access!")
# When everything is done, release the capture
video_capture.release()
cv2.destroyAllWindows()
#print (faces_list)
return render_template('userHomeENG.html', info="A face has been saved", user=session.get('user'))
if __name__ == "__main__":
#app.run(port=5002)

View File

@ -0,0 +1,73 @@
ul {list-style-type: none;}
body {font-family: Verdana, sans-serif;}
/* Month header */
.month {
/*padding: 70px 25px;*/
width: 100%;
background: #1abc9c;
text-align: center;
}
/* Month list */
.month ul {
margin: 0;
padding: 0;
}
.month ul li {
color: white;
font-size: 20px;
text-transform: uppercase;
letter-spacing: 3px;
}
/* Previous button inside month header */
.month .prev {
float: left;
padding-top: 10px;
}
/* Next button */
.month .next {
float: right;
padding-top: 10px;
}
/* Weekdays (Mon-Sun) */
.weekdays {
margin: 0;
padding: 10px 0;
background-color:#ddd;
}
.weekdays li {
display: inline-block;
width: 13.6%;
color: #666;
text-align: center;
}
/* Days (1-30) */
.days {
padding: 10px 0;
background: cyan;
margin: 0;
}
.days li {
list-style-type: none;
display: inline-block;
width: 13.6%;
text-align: center;
margin-bottom: 5px;
font-size:12px;
color: #777;
}
/* Highlight the "current" day */
.days li .active {
padding: 5px;
background: #1abc9c;
color: white !important
}

View File

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Unauthorized Access:: Python Flask App</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="signup.css">
<!-- <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"> -->
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="javascript:history.back()">Back</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/">Home</a>
</li>
<li role="presentation"><a href="/showSignInENG">Sign in</a>
</li>
<li role="presentation"><a href="/showSignUpENG">Register</a>
</li>
</ul>
</nav>
<h3 class="text-muted"><center>Python Flask</center></h3>
</div>
<div class="jumbotron">
<h1>{{error}}</h1>
</div>
<footer class="footer">
<p>&copy; UAM 2018</p>
</footer>
</div>
</body>
</html>

View File

@ -22,6 +22,10 @@
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="indexENG">ENG</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="#">Strona główna</a>
</li>

View File

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Python Flask App</title>
<!-- <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"> -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="signup.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="/">PL</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="#">Home</a>
</li>
<li role="presentation"><a href="showSignInENG">Sign in</a>
</li>
<li role="presentation"><a href="showSignUpENG">Register</a>
</li>
</ul>
</nav>
<h3 class="text-muted">Python Flask</h3>
</div>
<div class="jumbotron">
<h1>Test Application</h1>
<p class="lead"></p>
<p><a class="btn btn-lg btn-success" href="showSignUpENG" role="button">Registration</a>
</p>
<h2>{{ info }}</h2>
</div>
<footer class="footer">
<p>&copy; UAM 2018</p>
</footer>
</div>
</body>
</html>

View File

@ -23,6 +23,8 @@
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="javascript:history.back()">Wstecz</a>
</li>
<li role="presentation" class="active"><a href="showSignInENG">ENG</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" ><a href="/">Strona główna</a></li>
@ -36,9 +38,9 @@
<div class="jumbotron">
<h1>Aplikacja Testowa</h1>
<form class="form-signin" action="/validateLogin" method="post">
<label for="inputLogin" class="sr-only">Login</label>
<input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="Wpisz login" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<label for="inputLogin" class="sr-only">Nazwa użytkownika</label>
<input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="Wpisz nazwę" required autofocus>
<label for="inputPassword" class="sr-only">Hasło</label>
<input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="Wpisz hasło" required>
<input type="submit" value="Zaloguj się normalnie"></input>
<!-- <button id="btnSignIn" class="btn btn-lg btn-primary btn-block" type="submit">Potwierdź logowanie</button> -->

View File

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Python Flask App</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="signup.css">
<!-- <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"> -->
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">
<link href="../static/css/signup.css" rel="stylesheet">
<script src="../static/js/jquery-1.12.3.js"></script>
</head>
<body>
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="javascript:history.back()">Back</a>
</li>
<li role="presentation" class="active"><a href="showSignIn">PL</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" ><a href="/indexENG">Home</a></li>
<li role="presentation" class="active"><a href="#">SignIn</a></li>
<li role="presentation" ><a href="/showSignUpENG">Register</a></li>
</ul>
</nav>
<h3 class="text-muted"><center>Python Flask</center></h3>
</div>
<div class="jumbotron">
<h1>Test Application</h1>
<form class="form-signin" action="/validateLoginENG" method="post">
<label for="inputLogin" class="sr-only">Login</label>
<input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="Enter login" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="Enter the password" required>
<input type="submit" value="Log in normally"></input>
<!-- <button id="btnSignIn" class="btn btn-lg btn-primary btn-block" type="submit">Potwierdź logowanie</button> -->
</form>
<form class="form-signin" action="/signInWithFaceENG" method="get">
<input type="submit" value="Log in with your face"></input>
</form>
</div>
<footer class="footer">
<p>&copy; UAM 2018</p>
</footer>
</div>
</body>
</html>

View File

@ -41,6 +41,8 @@
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="javascript:history.back()">Wstecz</a>
</li>
<li role="presentation" class="active"><a href="showSignUpENG">ENG</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<!--<li role="presentation" ><a href="main">Strona główna</a></li>-->

View File

@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Python Flask App</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="signup.css">
<!-- <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"> -->
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">
<link href="../static/signup.css" rel="stylesheet">
<script src="../static/js/jquery-1.12.3.min.js"></script>
<!-- <script type="text/javascript"> -->
<!-- $(function() { -->
<!-- $('#btnSignUp').click(function() { -->
<!-- $.ajax({ -->
<!-- url: '/signUp', -->
<!-- data: $('form').serialize(), -->
<!-- type: 'POST', -->
<!-- success: function(response) { -->
<!-- console.log(response); -->
<!-- }, -->
<!-- error: function(error) { -->
<!-- console.log(error); -->
<!-- } -->
<!-- }); -->
<!-- }); -->
<!-- }); -->
<!-- </script> -->
</head>
<body>
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-left">
<li role="presentation" class="active"><a href="javascript:history.back()">Back</a>
</li>
<li role="presentation" class="active"><a href="showSignUp">PL</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<!--<li role="presentation" ><a href="main">Strona główna</a></li>-->
<li role="presentation" ><a href="/indexENG">Home</a></li>
<li role="presentation"><a href="/showSignInENG">Sign in</a></li>
<li role="presentation" class="active"><a href="#">Register</a></li>
</ul>
</nav>
<h3 class="text-muted"><center>Python Flask</center></h3>
</div>
<div class="jumbotron">
<h1>Test Application</h1>
<form class="form-signin" action="/signUpENG" method="post">
<label for="inputLogin" class="sr-only">Login</label>
<input type="name" name="inputLogin" id="inputLogin" class="form-control" placeholder="Login" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="Password" required>
<input type="submit" value="Submit"></input>
<!-- <button id="btnSignUp" class="btn btn-lg btn-primary btn-block" type="button">Potwierdź rejestrację</button> -->
</form>
<form class="form-signin" action="/signUpWithFaceENG" method="get">
<input type="submit" value="Confirm the face data"></input>
<!-- <button id="btnSignUp" class="btn btn-lg btn-primary btn-block" type="button">Potwierdź rejestrację</button> -->
</form>
<!--<button id="btnSignUp" class="btn btn-lg btn-primary btn-block" type="button">Potwierdź rejestrację</button>-->
</div>
<footer class="footer">
<p>&copy; UAM 2018</p>
</footer>
</div>
</body>
</html>

View File

@ -12,7 +12,96 @@
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">
<link href="../static/css/signup.css" rel="stylesheet">
<link rel="stylesheet" href="../static/css/calendar.css">
<style>
table, td, th {
border: 1px solid;
text-align: left;
}
table {
border-collapse: collapse;
/*width: 100%;*/
}
th, td {
padding: 5px;
}
ul {list-style-type: none;}
body {font-family: Verdana, sans-serif;}
/* Month header */
.month {
/*padding: 70px 25px;*/
width: 100%;
background: #1abc9c;
text-align: center;
}
/* Month list */
.month ul {
margin: 0;
padding: 0;
}
.month ul li {
color: white;
font-size: 20px;
text-transform: uppercase;
letter-spacing: 3px;
}
/* Previous button inside month header */
.month .prev {
float: left;
padding-top: 10px;
}
/* Next button */
.month .next {
float: right;
padding-top: 10px;
}
/* Weekdays (Mon-Sun) */
.weekdays {
margin: 0;
padding: 10px 0;
background-color:#ddd;
}
.weekdays li {
display: inline-block;
width: 13.6%;
color: #666;
text-align: center;
}
/* Days (1-30) */
.days {
padding: 10px 0;
background: cyan;
margin: 0;
}
.days li {
list-style-type: none;
display: inline-block;
width: 13.6%;
text-align: center;
margin-bottom: 5px;
font-size:12px;
color: #777;
}
/* Highlight the "current" day */
.days li .active {
padding: 5px;
background: #1abc9c;
color: white !important
}
</style>
</head>
@ -28,6 +117,8 @@
<!--<li role="presentation" class="active"><form action="http://google.com"><input type="button" value="Wstecz" onClick="history.go(-1);return true;"></form></li>-->
<li role="presentation" class="active"><a href="javascript:history.back()">Wstecz</a>
</li>
<li role="presentation" class="active"><a href="userHomeENG">ENG</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/logout">Wyloguj</a>
@ -37,17 +128,106 @@
<h3 class="text-muted"><center>Python Flask</center></h3>
</div>
<div class="jumbotron">
<h1>Witaj w domu!</h1>
<div class="jumbotron" style="height: 550px;">
<h1>Witaj w domu {{user}}!</h1>
<div class="col-xs-8">
<div class="month">
<ul>
<li>Listopad<br><span style="font-size:18px">2018</span></li>
</ul>
</div>
<ul class="weekdays">
<li>Cz</li>
<li>Pi</li>
<li>So</li>
<li>Ni</li>
<li>Po</li>
<li>Wt</li>
<li>Śr</li>
</ul>
<ul class="days">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
<li>16</li>
<li>17</li>
<li>18</li>
<li>19</li>
<li>20</li>
<li>21</li>
<li>22</li>
<li>23</li>
<li>24</li>
<li>25</li>
<li>26</li>
<li>27</li>
<li><span class="active">28</span></li>
<li>29</li>
<li>30</li>
</ul>
</div>
<p class="lead"></p>
<!-- <p> -->
<!-- <a class="btn btn-lg btn-success" href="newSheet" role="button">Stwórz arkusz</a> -->
<!-- <a class="btn btn-lg btn-success" href="#" role="button">Wczytaj szablon</a> -->
<!-- <a class="btn btn-lg btn-success" href="#" role="button">Zleć badanie</a> -->
<!-- </p> -->
<p>
<a class="btn btn-lg btn-success" href="#" role="button">Moje zajęcia</a>
<a class="btn btn-lg btn-success" href="#" role="button">Test</a>
<a class="btn btn-lg btn-success" href="#" role="button">Wyniki</a>
</p>
<table>
<tr>
<th>Czas</th>
<th>Jaka aktywność</th>
</tr>
<tr>
<td>8:00</td>
<td>brak</td>
</tr>
<tr>
<td>9:00</td>
<td>brak</td>
</tr>
<tr>
<td>10:00</td>
<td>brak</td>
</tr>
<tr>
<td>11:00</td>
<td>brak</td>
</tr>
<tr>
<td>12:00</td>
<td>brak</td>
</tr>
<tr>
<td>13:00</td>
<td>brak</td>
</tr>
<tr>
<td>14:00</td>
<td>brak</td>
</tr>
<tr>
<td>15:00</td>
<td>brak</td>
</tr>
<tr>
<td>16:00</td>
<td>brak</td>
</tr>
</table>
</div>
<footer class="footer">
<p>&copy; UAM 2018</p>

View File

@ -0,0 +1,239 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Python Flask App</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="signup.css">
<!-- <link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"> -->
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">
<link href="../static/css/signup.css" rel="stylesheet">
<link rel="stylesheet" href="../static/css/calendar.css">
<style>
table, td, th {
border: 1px solid;
text-align: left;
}
table {
border-collapse: collapse;
/*width: 100%;*/
}
th, td {
padding: 5px;
}
ul {list-style-type: none;}
body {font-family: Verdana, sans-serif;}
/* Month header */
.month {
/*padding: 70px 25px;*/
width: 100%;
background: #1abc9c;
text-align: center;
}
/* Month list */
.month ul {
margin: 0;
padding: 0;
}
.month ul li {
color: white;
font-size: 20px;
text-transform: uppercase;
letter-spacing: 3px;
}
/* Previous button inside month header */
.month .prev {
float: left;
padding-top: 10px;
}
/* Next button */
.month .next {
float: right;
padding-top: 10px;
}
/* Weekdays (Mon-Sun) */
.weekdays {
margin: 0;
padding: 10px 0;
background-color:#ddd;
}
.weekdays li {
display: inline-block;
width: 13.6%;
color: #666;
text-align: center;
}
/* Days (1-30) */
.days {
padding: 10px 0;
background: cyan;
margin: 0;
}
.days li {
list-style-type: none;
display: inline-block;
width: 13.6%;
text-align: center;
margin-bottom: 5px;
font-size:12px;
color: #777;
}
/* Highlight the "current" day */
.days li .active {
padding: 5px;
background: #1abc9c;
color: white !important
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<nav>
<ul class="nav nav-pills pull-left">
<!--<form><input type="button" value="Back" onClick="history.go(-1);return true;"></form>-->
<!--<li role="presentation" class="active"><input type="button" value="Back" onClick="history.go(-1);return true;">
</li>-->
<!--<li role="presentation" class="active"><form action="http://google.com"><input type="button" value="Wstecz" onClick="history.go(-1);return true;"></form></li>-->
<li role="presentation" class="active"><a href="javascript:history.back()">Back</a>
</li>
<li role="presentation" class="active"><a href="userHome">PL</a>
</li>
</ul>
<ul class="nav nav-pills pull-right">
<li role="presentation" class="active"><a href="/logoutENG">Log out</a>
</li>
</ul>
</nav>
<h3 class="text-muted"><center>Python Flask</center></h3>
</div>
<div class="jumbotron" style="height: 550px;">
<h1>Welcome home {{user}}!</h1>
<div class="col-xs-8">
<div class="month">
<ul>
<li>November<br><span style="font-size:18px">2018</span></li>
</ul>
</div>
<ul class="weekdays">
<li>Th</li>
<li>Fr</li>
<li>Sa</li>
<li>Su</li>
<li>Mo</li>
<li>Tu</li>
<li>We</li>
</ul>
<ul class="days">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
<li>16</li>
<li>17</li>
<li>18</li>
<li>19</li>
<li>20</li>
<li>21</li>
<li>22</li>
<li>23</li>
<li>24</li>
<li>25</li>
<li>26</li>
<li>27</li>
<li><span class="active">28</span></li>
<li>29</li>
<li>30</li>
</ul>
</div>
<p class="lead"></p>
<p>
<a class="btn btn-lg btn-success" href="#" role="button">My lessons</a>
<a class="btn btn-lg btn-success" href="#" role="button">Test</a>
<a class="btn btn-lg btn-success" href="#" role="button">Results</a>
</p>
<table>
<tr>
<th>Time</th>
<th>What activity</th>
</tr>
<tr>
<td>8:00</td>
<td>nothing</td>
</tr>
<tr>
<td>9:00</td>
<td>nothing</td>
</tr>
<tr>
<td>10:00</td>
<td>nothing</td>
</tr>
<tr>
<td>11:00</td>
<td>nothing</td>
</tr>
<tr>
<td>12:00</td>
<td>nothing</td>
</tr>
<tr>
<td>13:00</td>
<td>nothing</td>
</tr>
<tr>
<td>14:00</td>
<td>nothing</td>
</tr>
<tr>
<td>15:00</td>
<td>nothing</td>
</tr>
<tr>
<td>16:00</td>
<td>nothing</td>
</tr>
</table>
</div>
<footer class="footer">
<p>&copy; UAM 2018</p>
</footer>
</div>
</body>
</html>