Don't show images if user is not logged in.
This commit is contained in:
parent
665c374efd
commit
61bd506af0
1 changed files with 38 additions and 19 deletions
37
fotostore.pl
37
fotostore.pl
|
@ -212,6 +212,24 @@ __DATA__
|
|||
</body>
|
||||
</html>
|
||||
|
||||
@@ no_logged.html.ep
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" >
|
||||
<title>Rough, Slow, Stupid, Contrary Photohosting</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rough, Slow, Stupid, Contrary Photohosting</h1>
|
||||
<form method="post" action="<%= url_for('login') %>" >
|
||||
<div>
|
||||
<input type="text" name="username" >
|
||||
<input type="password" name="password">
|
||||
<input type="submit" value="Login">
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ index.html.ep
|
||||
<html>
|
||||
<head>
|
||||
|
@ -230,15 +248,6 @@ __DATA__
|
|||
<input type="submit" value="Upload" >
|
||||
</div>
|
||||
</form>
|
||||
<% } else { %>
|
||||
<form method="post" action="<%= url_for('login') %>" >
|
||||
<div>
|
||||
<input type="text" name="username" >
|
||||
<input type="password" name="password">
|
||||
<input type="submit" value="Login">
|
||||
</div>
|
||||
</form>
|
||||
<% } %>
|
||||
<div>
|
||||
<% foreach my $image (@$images) { %>
|
||||
<div>
|
||||
|
@ -255,5 +264,15 @@ __DATA__
|
|||
<div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<form method="post" action="<%= url_for('login') %>" >
|
||||
<div>
|
||||
<input type="text" name="username" >
|
||||
<input type="password" name="password">
|
||||
<input type="submit" value="Login">
|
||||
</div>
|
||||
</form>
|
||||
<% } %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue