-
Notifications
You must be signed in to change notification settings - Fork 32
/
load1.php
executable file
·85 lines (74 loc) · 2.22 KB
/
load1.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
<?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;
if($_POST)
{
$location_id=$_POST['location'];
$query2=mysql_query("SELECT location from location WHERE id='$location_id'");
$s=mysql_fetch_array($query2);
$query="SELECT m.* FROM theatres t LEFT JOIN movies m on m.id=t.movies_id WHERE t.location_id=$location_id";
$result=mysql_query($query);
?>
<div style="width:950px;border:solid 1px #bdbdbd;background:#eee;min-height:200px">
<h2 style="float:left;color:red;margin-left:10px">Movies in <span style="color:black"><?php echo $s['location'];?>:</span></h2>
<center>
<div style="width:950px">
<ul style="float:left">
<?php
while($row=mysql_fetch_array($result))
{
?>
<li><a href="#myModals" class="popup" id="<?php echo $row['id']; ?>" data-toggle="modal"><img src="uploads/<?php echo $row['image']; ?>" alt="<?php echo $row['name']; ?>" title="<?php echo $row['name']; ?>" width=125px height=155px/></a> </li>
<?php
}
}
?>
</ul>
</div>
</div>
</center>
<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 location=<?php echo $location_id;?>;
var movies=$(this).attr("id");
$('.modal-bodys').html("<br/><img src='ajax-loader.gif' alt='Loading...' /><br/>");
$.post("load.php",
{
location:location,
movies:movies
},
function(data,status)
{
$('.modal-bodys').html(data);
});
});
});
</script>