-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.php
More file actions
99 lines (77 loc) · 3.99 KB
/
gallery.php
File metadata and controls
99 lines (77 loc) · 3.99 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php include 'header.php';?>
<section style="overflow: hidden;">
<div class="container">
<div class="wdlf">
<div class="" style="width: 100%; overflow: hidden;">
<style>
div.gallery {border: 2px solid #dedede;transition: .3s;border-radius: 5px;}
div.gallery:hover {border: 2px solid #e6f7e5;}
div.gallery img {width: 100%;height: 200px;}
div.desc {
margin: 5px;
height: 70px;overflow: hidden;
}
* {
box-sizing: border-box;
}
.responsive {
padding: 5px;
float: left;
width: 24.99999%;
}
@media only screen and (max-width: 700px) {
div.desc{height: auto;}
.responsive {
width: 49.99999%;
margin: 6px 0;
}
}
@media only screen and (max-width: 500px) {
div.desc{
height: auto;
}
.responsive {
width: 100%;
}
div.gallery img {
width: 100%;
height: auto;
}
}
.clearfix:after {
content: "";
display: table;
clear: both;
}
</style>
<div style="overflow: hidden; text-align: left;margin: 5px; margin-bottom: 10px;
box-shadow: 0px 0px 20px -20px rgba(0, 0, 0, 0.3), 0 0 3px 2px rgba(0, 0, 0, 0.06);"><h2 style="padding: 6px;margin:2px;background:#e6f7e5;">GALLERY</h2>
<?php
$query = "SELECT * FROM hmglrey WHERE cid=1 ";
$read = $db->select($query);
if($read){?>
<?php
$i=1;
while($row = $read->fetch_assoc()){
?>
<div class="responsive" >
<div class="gallery">
<a href="view.php?gid=<?php echo $row['id']; ?>">
<img src="zmadminschool/<?php echo $row['img']; ?>" alt="Northern Lights" width="600" height="400">
</a>
<div class="desc"><?php echo $row['title']; ?></div>
</div>
</div>
<?php } ?>
<?php } else { ?>
<div class="desc">no photo</div>
<?php } ?>
</div>
</div>
</div>
<?php include 'sidebar.php';?>
</div>
</section>
<?php include 'footer.php';?>
</body>
</html>