-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
63 lines (56 loc) · 1.46 KB
/
Copy pathindex.php
File metadata and controls
63 lines (56 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
require_once('api/db.php');
require_once('api/user.php');
$user = new User();
$resp = $user->is_auth();
?>
<!DOCTYPE html>
<html>
<head>
<script>
</script>
</head>
<body>
<div id="header">
<?php
//$resp = $user->is_auth();
if ($resp) {
?>
Hello, <? echo $resp[0]; ?>! | <a href="?user=logout">Logout</a>
<?
} else {
?>
<a href="registration.php">Registration</a> | <a href="login.php">Login</a>
<?
}
?>
</div>
<div id="content">
<? if ($resp) {
//$gallery = new Gallery();
?>
<div>
<input type="file" name="file" id="file-field" multiple="true" />
<p>File can be less than 2 mb</p>
<button onclick="sendImages();">Send</button>
<button onclick="clearAll();">Clear</button>
</div>
<div id="img-container">
<ul id="img-list"></ul>
</div>
<div id="gallery">
<?
foreach ($user->getGallery() as $image) {
echo "<a href='".$image["path"]."' target='_blank'><img width='150' src='".$image["path"]."'/></a>";
}
?>
</div>
<?
}
?>
</div>
<div id="footer">
</div>
<script src="js/main.js"></script>
</body>
</html>