-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevents.php
169 lines (162 loc) · 7.93 KB
/
events.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
<?php
session_start();
if(!isset($_SESSION["username"]))
{
$_SESSION["Message"]="Login is Required...";
header("Location: register-sign-in.php");
}
?>
<!DOCTYPE html>
<?php require("php/config.php"); ?>
<html lang="en-US">
<head>
<?php require("pages/head.php");?>
</head>
<body class="page-sub-page page-events-listing">
<!-- Wrapper -->
<div class="wrapper">
<!-- Header -->
<?php require("pages/header/events-header.php"); ?>
<!-- end Header -->
<!-- Breadcrumb -->
<div class="container">
<ol class="breadcrumb">
<li><a href="index.php">Home</a></li>
<li class="active">Events</li>
</ol>
</div>
<!-- end Breadcrumb -->
<!-- Page Content -->
<div id="page-content">
<div class="container">
<div class="row">
<?php $sql="SELECT * FROM `events`";
$result=$connection->query($sql);
if ($result->num_rows > 0){
?>
<!--MAIN Content-->
<div class="col-md-8">
<div id="page-main">
<form action="event-detail.php" method="post">
<section class="events images" id="events">
<header><h1>Events</h1></header>
<div class="section-content">
<?php while($row = $result->fetch_assoc())
{?>
<article class="event">
<div class="event-thumbnail">
<figure class="event-image">
<div class="image-wrapper"><img src="<?php echo $row["image_path"];?>"></div>
</figure>
<?php $dateFormat = 'Y-m-d';
$stringDate = $row["date"];
$date = DateTime::createFromFormat($dateFormat, $stringDate);
$day = intval($date->format('d')); // returns an integer
$month= $date->format('m');?>
<figure class="date">
<div class="month"><?php echo date("F", mktime(null, null, null, $month, 1)); ?></div>
<div class="day"><?php echo $day;?></div>
</figure>
</div>
<aside>
<header>
<a href="#"><?php echo $row["title"];?></a>
</header>
<div class="additional-info"><span class="fa fa-map-marker"></span><?php echo " ".$row["location"]; ?></div>
<div class="description">
<p><?php echo $row["description"];?>
</p>
</div>
<button type="submit" name="submit" value="<?php echo $row["button_id"]; ?>" class="btn btn-framed btn-color-grey btn-small">View Details</button>
</aside>
</article><!-- /.event -->
<?php }} ?>
</div><!-- /.section-content -->
</section><!-- /.events-images -->
</form>
<!-- <div class="center">
<ul class="pagination">
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
</ul><!-- /.pagination -->
<!-- </div><!-- /.center -->
</div><!-- /#page-main -->
</div><!-- /.col-md-8 -->
<!--SIDEBAR Content-->
<div class="col-md-4">
<div id="page-sidebar" class="sidebar">
<aside class="news-small" id="news-small">
<header>
<h2>Related News</h2>
</header>
<?php require("pages/news.php");?>
<a href="" class="read-more">All News</a>
</aside><!-- /.news-small -->
<aside id="newsletter">
<header>
<h2>Newsletter</h2>
<div class="section-content">
<div class="newsletter">
<div class="input-group">
<input type="text" class="form-control" placeholder="Your e-mail">
<span class="input-group-btn">
<button type="submit" class="btn"><i class="fa fa-angle-right"></i></button>
</span>
</div><!-- /input-group -->
</div><!-- /.newsletter -->
<p class="opacity-50">Ut tincidunt, quam in tincidunt vestibulum, turpis ipsum porttitor nisi, et fermentum augue
lit eu neque. In at tempor dolor, sit amet dictum lacus. Praesent porta orci eget laoreet ultrices.
</p>
</div><!-- /.section-content -->
</header>
</aside><!-- /.newsletter -->
<!-- <aside id="our-professors">
<header>
<h2>Our Professors</h2>
</header>
<div class="section-content">
<div class="professors">
<article class="professor-thumbnail">
<figure class="professor-image"><a href="member-detail.html"><img src="assets/img/professor.jpg" alt=""></a></figure>
<aside>
<header>
<a href="member-detail.html">Prof. Mathew Davis</a>
<div class="divider"></div>
<figure class="professor-description">Applied Science and Engineering</figure>
</header>
<a href="member-detail.html" class="show-profile">Show Profile</a>
</aside>
</article><!-- /.professor-thumbnail -->
<!-- <article class="professor-thumbnail">
<figure class="professor-image"><a href="member-detail.html"><img src="assets/img/professor-02.jpg" alt=""></a></figure>
<aside>
<header>
<a href="member-detail.html">Prof. Jane Stairway</a>
<div class="divider"></div>
<figure class="professor-description">Applied Science and Engineering</figure>
</header>
<a href="member-detail.html" class="show-profile">Show Profile</a>
</aside>
</article><!-- /.professor-thumbnail -->
<!-- <a href="" class="read-more">All Professors</a>
</div><!-- /.professors -->
<!-- </div><!-- /.section-content -->
<!--</aside><!-- /.our-professors -->
</div><!-- /#sidebar -->
</div><!-- /.col-md-4 -->
</div><!-- /.row -->
</div><!-- /.container -->
</div>
<!-- end Page Content -->
<!-- Footer -->
<?php require("pages/footer.php");?>
<!-- end Footer -->
</div>
<!-- end Wrapper -->
<?php require("pages/script.php"); ?>
</body>
</html>
<?php $connection->close();
$connection_events->close();
?>