-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathgallery.php
241 lines (162 loc) · 5.5 KB
/
gallery.php
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>gallery</title>
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/Footer-Dark.css">
<link rel='stylesheet' href='css/gallery.css'>
<link rel="stylesheet" href="assets/css/Filter.css">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/ionicons.min.css">
<link rel="stylesheet" href="assets/css/Footer-Clean.css">
<link rel="stylesheet" href="assets/css/Social-Icons.css">
<link rel="stylesheet" href="assets/css/styles.css">
<style>
.demo {
width:1300px;
margin-bottom:30px;
margin-top:30px;
}
ul {
list-style: none outside none;
padding-left: 0;
margin-bottom:0;
}
li {
display: block;
float: left;
margin-right: 6px;
cursor:pointer;
}
#yo {
display: block;
height:450px;
width:1300px;
}
/* Parent Container */
.content_img{
position: relative;
width: 200px;
float: left;
margin-right: 10px;
}
/* Child Text Container */
.content_img div{
position: absolute;
bottom: 0;
right: 0;
background: black;
color: white;
margin-bottom: 5px;
margin-right:-1095px;
font-family: sans-serif;
opacity: 0;
visibility: hidden;
-webkit-transition: visibility 0s, opacity 0.5s linear;
transition: visibility 0s, opacity 0.5s linear;
}
/* Hover on Parent Container */
.content_img:hover{
cursor: pointer;
}
.content_img:hover div{
width: 400px;
padding: 8px 15px;
visibility: visible;
opacity: 0.7;
}
</style>
</head>
<body style="background-color: rgb(255,255,255);">
<div style="background-image: url("assets/img/bg6.jpg");height: 350px;">
<nav class="navbar navbar-light navbar-expand-md navigation-clean-button" style="background-color: rgba(255,255,255,0);color: rgb(0,0,0);">
<div class="container"><a class="navbar-brand" href="index.php" style="color: rgb(0,0,0);">MMDU Event</a><button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div
class="collapse navbar-collapse" id="navcol-1">
<ul class="nav navbar-nav mr-auto">
<li class="nav-item" role="presentation"><a class="nav-link active" href="index.php" style="color: rgb(0,0,0);">Home</a></li>
<li class="nav-item" role="presentation"><a class="nav-link" href="aboutus.php" style="color: rgb(0,0,0);">About us</a></li>
</ul><span class="navbar-text actions"> <a class="login" href="login.php" style="color: rgb(0,0,0);margin: 0px;margin-right: 20px;">Log In</a><a class="btn btn-light action-button" role="button" href="signup.php">Sign Up</a></span></div>
</div>
</nav>
<div style="margin: 50px;">
<h1 style="font-size: 108px;"><strong>Gallery</strong></h1>
</div>
</div>
<div class="filter">
<form>
<input placeholder="e.g sports, drama, horror, technology"></input><br>
<select id="category" onchange="category1()" name="categoryselect">
<option value="">Select Category</option>
<option value="music">Music</option>
<option value="dance">Dance</option>
<option value="buisness">Buisness</option>
<option value="fine arts">Fine Arts</option>
<option value="theatre">Theatre</option>
<option value="health">Health</option>
<option value="hospitality">Hospitality</option>
<option value="fashion">Fashion</option>
<option value="sports">Sports</option>
<option value="law">Law</option>
<option value="technical">Technical</option>
<option value="literary">Literary</option>
</select>
<select id="year" onchange="year1()" name="yearselect">
<option value="">Select Year</option>
<?php
include('dbconnect.php');
$id = $_GET['id'];
$sql = "select date from gallery";
$result = mysqli_query($conn,$sql);
while($row = mysqli_fetch_array($result)) {
$date = strtotime($row['date']);
$year[] = date('Y', $date);
}
$result1 = array_unique($year);
for($i=0; $i<count($result1); $i++){
echo "<option value='".$result1[$i]."'>".$result1[$i]."</option>";
}
?>
</select>
</form>
<div id="yoyo"></div>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>
<script src='https://sachinchoolur.github.io/lightslider/dist/js/lightslider.js'></script>
<script id="rendered-js">
$('#lightSlider').lightSlider({
gallery: true,
item: 1,
loop: true,
slideMargin: 0,
thumbItem: 9 });
//# sourceURL=pen.js
</script>
<script>
function category1()
{
var category = document.getElementById("category").value;
$.ajax({
url:"gallerysorting.php?category="+category,
success:function(data){
$("#yoyo").html(data);
}
});
}
function year1()
{
var year = document.getElementById("year").value;
var category = document.getElementById("category").value;
$.ajax({
url:"gallerysorting.php?year="+year+"&category="+category,
success:function(data){
$("#yoyo").html(data);
}
});
}
</script>
</body>
</html>