-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevents.php
More file actions
141 lines (125 loc) · 5.65 KB
/
events.php
File metadata and controls
141 lines (125 loc) · 5.65 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
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
<?php include('functions.php'); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>HACK UMASS VI</title>
<link rel="stylesheet" href="restaurants.css">
<link rel="stylesheet" type="text/css" href="style-detail.css">
<link rel="stylesheet" type="text/css" href="modal.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class = "wrapper" style="padding-bottom: 50px">
<?php if (isset($_SESSION['user'])) { ?>
<div class="header">
<a href="home.php"><img src="let's%20see.png" class="logo"></a>
<p class="login">
Welcome <strong><?php echo $_SESSION['user']['first']; ?> <?php echo $_SESSION['user']['last']; ?></strong> |
<button name="logout">Logout</button>
</p>
</div>
<?php
}
else{
?>
<div class="header">
<a href="home.php"><img src="let's%20see.png" class="logo"></a>
<button type="submit" class="button view_data">Login</button>
</div>
<?php
}
?>
<div class="sections">
<ul>
<a href="restaurants.php"><li class="sidemenu">Restaurants</li></a>
<a href="attractions.php"><li class="sidemenu">Attractions</li></a>
<li class="sidemenu" style="background-color: #453F78; color: white">Events</li>
<a href=""><li class="sidemenu">Convenience Stores</li></a>
<a href=""><li class="sidemenu">Hotels</li></a>
<br>
<a href=""><li class="sidemenu">Schools</li></a>
<a href=""><li class="sidemenu">Hospitals</li></a>
<a href=""><li class="sidemenu">Personal Care</li></a>
<a href=""><li class="sidemenu">Leisure</li></a>
</ul>
</div>
<div class="floaters">
<?php
$query="SELECT * FROM events";
$sql=mysqli_query($db,$query);
while($res=mysqli_fetch_assoc($sql)){
?>
<div class="innerfloaters">
<h2 align = "center">
<?php $name = $res['Name']; ?>
<?php echo "<td><a href=\"events-info.php?ID=" . $res['ID'] . "\">$name</a></td>"; ?>
</h2>
<br>
<img src="<?php echo $res["img_link"]; ?>" class="icon">
<div style="float:left; margin-left:20px;">
Event timings: <?php echo $res["Hours"]; ?>
<br>
<br>
Location: <?php echo $res["Location"]; ?>
</div>
</div>
<?php
}
?>
</div>
<div class="push"></div>
</div>
<!--ajax for modal -->
<script>
$(document).ready(function(){
$('.view_data').click(function(){
$.ajax({
method:"post",
success:function(data){
$('#dataModal').modal("show");
}
});
});
});
</script>
<!-- Modal for login -->
<div id="dataModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" align="center">Login:</h4>
</div>
<div class="modal-body" id="success-fail">
<form method="post">
<p> <?php echo display_error(); ?></p>
<div class="input-group">
<label>Username</label>
<input type="text" name="susername">
</div>
<div class="input-group">
<label>Password</label>
<input type="password" name="spassword">
</div>
<div class="input-group">
<button type="submit" class="btn" name="login_btn">Login</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="foot">
Created With Love By:
Anushree Jana;
Shreya Sawant;
Akash Munjial<br>
<a href="about.php"><div style="float: left;margin-left: 600px;"><strong>About</strong></div></a>
<a href=""><div style="float: left; margin-left: 50px;"><strong>Contact</strong></div></a>
<a href="Readme.txt"><div style="float: left; margin-left: 200 px">   <strong>Legal</strong></div></a>
</div>
</body>
</html>