forked from advancedhms/prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiles.php
More file actions
72 lines (51 loc) · 1.07 KB
/
files.php
File metadata and controls
72 lines (51 loc) · 1.07 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
64
65
66
67
68
69
70
71
72
<html>
<head>
<title>Image Gallery</title>
<script
src="https://code.jquery.com/jquery-2.2.4.js"
integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI="
crossorigin="anonymous"></script>
<script src="jquery.fancybox.min.js"></script>
<link href="jquery.fancybox.min.css" rel="stylesheet">
<style>
body{
margin:0;
padding:0;
background:#ccc;
}
.thumbnails{
width:30%;
float: left;
margin:10px;
background:#fff;
padding: 20px;
box-sizing: border-box;
}
.thumbnails img{
width :100%;
height:auto;
}
</style>
</head>
<body>
<!--<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="upFile" />
<input type="submit" name ="upload" value="Upload File">
</form>
-->
<h1>Image Gallery</h1>
<?php
$dir=glob('uploads/{*.jpg,*.png}',GLOB_BRACE);
foreach($dir as $value){
?>
<div class="thumbnails">
<a href="<?php echo $value;?>" data-fancybox="images" data-caption="<?php echo $value;?>">
<img src=" <?php echo $value;?>" alt="<?php echo $value;?>">
</a>
<h2>Title Of Image</h2>
</div>
<?php
}
?>
</body>
</html>