-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.php
167 lines (149 loc) · 8.29 KB
/
event.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
<?php /*
ob_start();
session_start();
require_once 'actions/db_connect.php';
if (isset($_SESSION['User'])){
$result = mysqli_query($connect, "SELECT * FROM `userdata` WHERE Status=". $_SESSION['User']. "");
$userRow=mysqli_fetch_array($res, MYSQLI_ASSOC);
}
if (isset($_SESSION['Admin'])){
$result = mysqli_query($connect, "SELECT * FROM `userdata` WHERE Status=". $_SESSION['Admin']. "");
$userRow=mysqli_fetch_array($res, MYSQLI_ASSOC);
}
if(!isset($_SESSION['Admin']) && !isset($_SESSION['User'])){
header("Location: login.php");
}
$log = "Login";
if(isset($_SESSION['Admin']) || isset($_SESSION['User'])){
$log = "Logout";
}
*/
?>
<!DOCTYPE html5>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Happy Feet Travel Blog</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://getbootstrap.com/docs/3.3/examples/carousel/carousel.css" rel="stylesheet">
<link rel="stylesheet" href="css/homepage.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<!---BEGINNING OF BODY SECTION --->
<body>
<div class="container">
<header id="header">
<div class="header">
<img class="center-block" src="IMG/happyfeetlogo.png">
</div>
</header><!-- /header -->
<nav class="navbar navcolour navbar-justify">
<ul class="nav nav-pills nav-justified" id="navstyling">
<li class="nav-item"><a href="home.php" title="Home">Home</a></li>
<li class="nav-item"><a href="#about" title="About">About</a></li>
<li class="nav-item"><a href="#sights" title="TopSights">Top Sights</a></li>
<li class="nav-item"><a href="restaurant.php" title="Restaurants">Restaurants</a></li>
<li class="nav-item"><a href="event.php" title="Events">Events</a></li>
<li class="nav-item"><a href="#contact" title="Contact">Contact</a></li>
<li class="nav-item"><a href="logout.php" title="logout">Logout</a></li>
</ul>
</nav>
<main>
<!---Start of Jumbotron Section --->
<div class="jumbotron">
<h1 class="card-title"><strong><center>St. Petersburg, Russia</center></strong></h1>
<!---Start of Carousel for Pictures--->
<div id="carousel-stpetersburg" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-stpetersburg" data-slide-to="0" class="active"></li>
<li data-target="#carousel-stpetersburg" data-slide-to="1"></li>
<li data-target="#carousel-stpetersburg" data-slide-to="2"></li>
</ol>
<!-- Wrapper for Picture Carousel -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="IMG/river-3729956_1280.jpg" alt="St.PetersburgRiver">
</div>
<div class="item">
<img src="IMG/metro-3714290_1280.jpg" alt="St.PetersburgMetro">
</div>
<div class="item">
<img src="IMG/church-3710237_1280.jpg" alt="St.PetersburgChurch">
</div>
</div>
<!--Controls for Carousel-->
<a class="left carousel-control" href="#carousel-stpetersburg" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-stpetersburg" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!--End of Controls for Carousel-->
<h3 class="card-title"><center>A City Everyone Must Visit Once in Their Life!<center></h3>
</div>
<!---END OF JUMBOTRON SECTION --->
<!---START OF THE CONTENT SECTION --->
<div>
<div class='row'>
<div class='col-lg-12 content1' id="sights">
<a name="sights"><h2><span id="s1">Top</span> Events</h2></a>
</div>
</div>
<div class='row'>
<?php
require_once 'actions/db_connect.php';
$sql = "SELECT `Content_ID`,`Image`, `Locationtype`, `Locationname`, `Street`, `City`,`Postcode`, `Telephone`, `Webaddress`, `Metrostop`, `OpenTimes`, `Value`, `Eventplacename`,`Style`, `Entrycost`, `Eventtime`, `Eventdate`, `contentdata`.`Created`
FROM `contentdata`
INNER JOIN `addressdata` ON `contentdata`.`fk_Address_ID` = `addressdata`.`Address_ID`
WHERE `contentdata`.`Locationtype` = 'Event'";
$result = $connect->query($sql);
if($result->num_rows > 0) {
while($event = $result->fetch_assoc()) {
echo '<div class="col-lg-6 col-md-6 col-sd-12" id="'.$event['Content_ID'].'">
<div class="travelcard"><img class="travelcard-img-top" src="' .$event['Image']. '" alt="TravelCard image cap">
<div class="travelcard-body"><h3 class="travelcard-title">' .$event['Locationname']. '</h3>
<p class="travelcard-text"><span>Location:</span> "' .$event['Eventplacename']. '"</p>
<p class="travelcard-text"><span>Address:</span> "'.$event['Street'].'", "' .$event['City']. '", "' .$event['Postcode']. '"</p>
<p class="travelcard-text"><span>Tel:</span> "' .$event['Telephone']. '"</p>
<p class="travelcard-text"><span>Date:</span> "' .$event['Eventdate']. '"</p>
<p class="travelcard-text"><span>Showings:</span> "' .$event['Eventtime']. '"</p>
<p class="travelcard-text"><span>Price:</span> "' .$event['Entrycost']. '"</p>
<p class="font-italic text-secondary">Created: "' .$event['Created']. '"</p>
</div>
</div>
</div>';
}
};
?>
</div>
<div class="row">
<div class='col-lg-12' id='toparrow'>
<a href='home.php'><span class='glyphicon glyphicon-arrow-up'></span> Top</a>
</div>
</div>
</div>
<!---END OF THE CONTENT SECTION --->
</main>
<!---FOOTER SECTION BEGINNING --->
<footer id="footer">
<div>
<img class="center-block" src="img/happyfeetlogo.png" alt="HappyFeetTravelBlog" width="300">
</div>
<div class="copyright text-center">
<p>Jamie Slaats - CodeFactory 2019©</p>
</div>
</footer>
<!--- END OF FOOTER SECTION --->
</div>
<script src="JS/script.js" type="text/javascript" charset="utf-8"></script>
<script src="JS/scriptpage2.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
<?php //ob_end_flush(); ?>