-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathindex2.php
executable file
·359 lines (303 loc) · 9.49 KB
/
index2.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
<!DOCTYPE HTML>
<?php
include('db/db.php');
include('frontend.php');
//Database connection selection
$db=new db();
$db->db_connect();
$db->db_select();
$frontend=new frontend();
//loation
$array=$frontend->getlocation();
$size=sizeof($array);
$t_size=$size;
$i=0;
$t=0;
//slider
$array1=$frontend->slider();
$size1=sizeof($array1);
$s=0;
$j=1;
//carousel
$array2=$frontend->recent();
$size2=sizeof($array2);
$d=0;
$k=1;
?>
<html>
<head>
<title>Searh Movie Theatres Online</title>
<link rel="shortcut icon" type="image/png" href="favicon.ico"/>
<link href="css/style1.css" rel="stylesheet"/>
<link href="select2.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="engine1/style.css" />
<link rel="stylesheet" type="text/css" href="Elastislide/css/elastislide1.css" />
<link rel="stylesheet" type="text/css" href="Elastislide/css/custom.css" />
<link rel="stylesheet" href="modal.css">
<script src="jquery-1.8.0.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="js/modernizr.custom.17475.js"></script>
<script src="select2.js"></script>
<script>
$(document).ready(function()
{
$("#location").select2();
$("#location1").select2();
$("#movies").select2();
$("#theatres").select2();
$('#movies').prop('disabled', 'disabled');
$('#theatres').prop('disabled', 'disabled');
var location=$("#location").val();
var location1=$("#location1").val();
$('#location').change(function()
{
var id=$(this).val();
$('.modal-bodys').html(" ");
var dataString = 'id='+ id;
$('#movies').val('');
$.ajax
({
type: "POST",
url: "ajax_city.php",
data: dataString,
cache: false,
success: function(html)
{
$("#movies").html(html);
if($("#movies").val())
{
$('#movies').removeAttr('disabled');
}
else
{
$('#movies').prop('disabled', 'disabled');
return false;
}
}
});
});
$('#location1').change(function()
{
var id=$(this).val();
var dataString = 'id='+ id;
$.ajax
({
type: "POST",
url: "ajax_theatre.php",
data: dataString,
cache: false,
success: function(html)
{
$("#theatres").html(html);
if($("#theatres").val())
{
$('#theatres').removeAttr('disabled');
}
else
{
$('#theatres').prop('disabled', 'disabled');
return false;
}
}
});
});
});
</script>
</head>
<body>
<center>
<img src="images/logo1.jpg" width=286px height=100px id="logo"><img src="images/contact.png" style="margin-left:100px;">
</center>
<center style="margin-top:10px;">
<table>
<tr>
<td style="background:transparent !important">
<div style="padding:15px;margin-left:5px;width:300px;border:solid 1px #eee">
<button id="movies_cinemachoodu">Movies</button> <button id="theatres_cinemachoodu">Theatres</button><br/>
<hr size=1 color="#eee"/>
<br/>
<span style="color:red;font-size:20px">Search By</span> <span id="selection" style="font-size:20px"></span><br/><br/>
<div id="mm">
<select style="width:300px;" name="location" id="location">
<option value="">Select Location...</option>
<?php
while($size>0)
{
?>
<option value="<?php echo $array[$i]['id'];?>"><?php echo $array[$i]['name'];?></option>
<?php
$size--;
$i++;
}
?>
</select><br/><br/>
<select style="width:300px;" name="movies" id="movies">
<option value="">Select Movies...</option>
</select><br/><br/>
<a href="#myModals" class="popup" id="submit" data-toggle="modal">Search Theatres</a>
<br/><br/>
</div>
<form action="movies-search.php" method="post" id="tt">
<select style="width:300px;" name="location1" id="location1">
<option value="">Select Location...</option>
<?php
while($t_size>0)
{
?>
<option value="<?php echo $array[$t]['id'];?>"><?php echo $array[$t]['name'];?></option>
<?php
$t_size--;
$t++;
}
?>
</select><br/><br/>
<select style="width:300px;" name="theatres" id="theatres">
<option value="">Select Theatres...</option>
</select><br/><br/>
<button id="submit_theatre">Search Movies</button><br/><br/>
</form>
</div>
</td>
<td>
<table>
<tr>
<td id="menu"><a href="theatres.php" >Theatres</a></td>
<td id="menu"><a href="movies.php">Movies</a></td>
<td id="menu"><a href="trailers.php">Trailers</a></td>
<td id="menu"><a href="#">Mobile App</a></td>
<td id="menu"><a href="#">Help</a></td>
</tr>
<tr>
<td colspan=5>
<!--<img src="images/aaa.png" height=245px width=610px>-->
<div id="wowslider-container1">
<div class="ws_images">
<ul>
<?php
while($size1>0)
{
?>
<li><img src="slider/<?php echo $array1[$s]['image']; ?>" alt="213" title="213" id="wows1_0" width=612px height=248px/></li>
<?php
$size1--;
$s++;
}
?>
</ul></div>
</div>
</td>
</tr>
</table>
</td>
<td style="background:transparent !important">
<div id="fb">
<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FCinemachoodu%2F349493561842438&width&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=true&appId=673893932704718" scrolling="no" frameborder="0" style="border:none; overflow:hidden;width:326px; height:290px;" allowTransparency="true"></iframe>
</div>
</td>
</tr>
</table>
</center>
<ul id="carousel" class="elastislide-list">
<?php
while($size2>0)
{
$id=$array2[$d]['id'];
$query=mysql_query("SELECT youtube FROM trailers WHERE movie_id='$id'");
$result=mysql_fetch_array($query);
?>
<li><a href="#myModal" class="popup" id="<?php echo $result['youtube']; ?>" data-toggle="modal"><img src="uploads/<?php echo $array2[$d]['image']; ?>" alt="image01" width=135px height=180px/></a></li>
<?php
$size2--;
$d++;
}
?>
</ul>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Movie Trailer</h4>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="myModals" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Movie Information</h4>
</div>
<div class="modal-bodys">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="close" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(function()
{
$('.popup').click(function()
{
var id=$(this).attr("id");
var url="//www.youtube.com/embed/"+id;
var iframe='<iframe width="560" height="315" src='+url+' frameborder="0" allowfullscreen></iframe>';
$('.modal-body').html(iframe);
});
$('#movies_cinemachoodu').click(function()
{
$('#tt').hide();
$('#mm').show();
$('#selection').html('<b>Movies</b>');
});
$('#theatres_cinemachoodu').click(function()
{
$('#mm').hide();
$('#tt').show();
$('#selection').html('<b>Theatres</b>');
});
$('#submit').click(function()
{
var location=$('#location').val();
var movies=$('#movies').val();
if(location=='')
{
alert("Please Select Location...");
return false;
}
if(movies=='')
{
alert("Select Movie...");
return false;
}
if(location=='' && movies=='')
{
alert("Select Location & Movies...");
return false;
}
$.post("load.php",
{
location:location,
movies:movies
},
function(data,status)
{
$('.modal-bodys').html(data);
});
});
});
</script>
<script type="text/javascript" src="engine1/wowslider.js"></script>
<script type="text/javascript" src="engine1/script.js"></script>
<script type="text/javascript" src="js/jquery.elastislide.js"></script>
<script type="text/javascript">
$( '#carousel' ).elastislide();
</script>
</body>
</html>