-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
55 lines (39 loc) · 1.54 KB
/
index.php
File metadata and controls
55 lines (39 loc) · 1.54 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href='simplelightbox-master/dist/simplelightbox.min.css' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript" src="simplelightbox-master/dist/simple-lightbox.js"></script>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My Gallery</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Droid+Sans:400,700" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.8.1/baguetteBox.min.css">
<link rel="stylesheet" href="gallery-grid.css">
</head>
<body>
<h2 style="padding-left:4%; color:black;">A sample of JS Paul's work</h2>
<div class="tz-gallery">
<div class="row">
<?php
$directory = 'gallery/';
if (!is_dir($directory)) {
exit('Invalid diretory path');
}
$files = array();
foreach (scandir($directory) as $file) {
if ($file !== '.' && $file !== '..' && $file !== '.DS_Store') {
$files[] = $file;
echo '<div class="col-sm-6 col-md-4"> <a class="lightbox" href="gallery/'. $file . '">
<img src="gallery/'. $file .'">
</a>
</div>';
}
}
//var_dump($files);
?>
</div>
</div>
</body>
</html>