forked from hilderbrandtjohn/shelfindulgence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-meeting.php
271 lines (242 loc) · 19.6 KB
/
create-meeting.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
<?php
session_start();
$clubname = $_GET['clubname'];
$username=$_SESSION['username'];
require_once "./functions/database_functions.php";
$conn = db_connect();
$result = getMeetingByClubname($conn, $clubname);
if(isset($_POST['submit'])){
$bookname= trim($_POST['bookname']);
$bookname = mysqli_real_escape_string($conn, $bookname);
$meetingdate = trim($_POST['meetingdate']);
$meetingdate = mysqli_real_escape_string($conn, $meetingdate);
$meetingtime = trim($_POST['meetingtime']);
$meetingtime = mysqli_real_escape_string($conn, $meetingtime);
$meetinglink = trim($_POST['meetinglink']);
$meetinglink = mysqli_real_escape_string($conn, $meetinglink);
$meetinglocation = trim($_POST['meetinglocation']);
$meetinglocation = mysqli_real_escape_string($conn, $meetinglocation);
$clubname = $_GET['clubname'];
$query = "INSERT INTO meeting(bookname, meetingdate, meetingtime, meetinglink, meetinglocation, clubname) VALUES ('" . $bookname . "', '" . $meetingdate . "', '" . $meetingtime . "', '" . $meetinglink . "', '" . $meetinglocation . "', '" . $clubname . "')";
$result = mysqli_query($conn, $query);
if(!$result){
echo "Can't add new data " . mysqli_error($conn);
exit;
} else {
header("Location: meetings.php?clubname=$clubname");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<title>Create new meeting</title>
<meta name="description" content="Shelfindulgence makes organizing a book club simple. Create clubs, schedule meetings, and choose books, all for free." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="cleartype" content="on" />
<meta name="theme-color" content="#ffffff">
<!-- Font tags-->
<!-- End Font tags -->
<!-- Style Tags-->
<link rel="stylesheet" href="static/css/vendors~main.css">
<link rel="stylesheet" href="static/css/main.css">
<link rel="stylesheet" href="static/css/CreateMeetingPage.css">
<!-- End Style Tags -->
</head>
<body class="intent-mouse">
<div id="root">
<div>
<div></div>
<div class="wrapper-container undefined">
<header class="header-container">
<nav class="navbar">
<div class="navbar-header">
<div class="navbar-brand logo"><a href="home.php" aria-label="Link to Shelf Indulgence's Homepage"><img width="233" height="30" src="static/media/logo.png" class="img-responsive" alt="" /></a></div>
</div>
<div class="navbar-collapse">
<div class="nav-wrapper">
<div class="header-group-button"><button id="bt-open-menu" type="button" aria-label="Open menu" class="btn btn-open-menu lines-button x "><span class="lines"></span></button></div><a href="signin.php" class="btn-signin-rw ">Sign in</a>
<div aria-hidden="false" tabindex="-1" class="nav-container ">
<ul class="nav bz-navbar-nav navbar-user"></ul>
<ul class="nav bz-navbar-nav navbar-right">
<li class="m-item" ><a href="" class="m-link">Resources</a>
<ul class="sub-menu sub-menu-user sub-menu-block">
<li class="m-sub-item"><a href="https://www.goodreads.com/" target="_blank" class="m-link">Good Reads</a></li>
<li class="m-sub-item"><a href="https://www.librarything.com/" target="_blank" class="m-link">Library Thing</a></li>
<li class="m-sub-item"><a href="https://b-ok.africa/" target="_blank" class="m-link">Z-Library</a></li>
<li class="m-sub-item"><a href="https://www.libgen.is/" target="_blank" class="m-link">Library Genesis</a></li>
</ul>
</li>
<li class="m-item"><a href="" class="m-link">clubs</a>
<ul class="sub-menu sub-menu-user sub-menu-block">
<li class="m-sub-item"><a href="joinclub.php" class="m-link">Join a club</a></li>
<li class="m-sub-item"><a href="myclubs.php" class="m-link">My clubs</a></li>
<li class="m-sub-item"><a href="create-club.php" class="m-link">Create club</a></li>
</ul>
</li>
<li class="m-item"><a href="shop.php" class="m-link">Shop</a></li>
<li class="m-item"><a href="about.css" class="m-link">About</a></li>
<li class="m-item"><a href="profile.php" class="mtr-button btn-white">
<?php if (isset($_SESSION['username'])) : ?>
<h3><?php echo $_SESSION['username']; ?></h3>
<?php endif ?>
</a></li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<main class="main-container" id="content">
<div class="profile-container create-meeting-container">
<div class="container-fluid">
<div class="row">
<div class="center">
<div class="left-container">
<div class="profile-content club-content">
<div class="avatar-content">
<div class="club-info">
<div style="text-transform: capitalize;font-weight: bold;font-style: oblique;font-size: 24px;font-family: bradler hand itc;">
<?php echo $clubname; ?>
</div>
<div style="text-transform: capitalize;font-style: oblique;font-size: 20px;font-family: bradler hand itc;">
<br>
Welcome <?php echo $username; ?>
</div>
</div>
<div class="clearfix"></div>
</div>
<div class="list-user-menu">
<ul class="list">
<li class="item"><a class="" href="admin-dashboard?clubname=<?php echo $clubname; ?>">ADMIN DASHBOARD</a></li>
<li class="item"><a class="" href="about-our-club.php?clubname=<?php echo $clubname; ?>">ABOUT OUR CLUB</a></li>
<li class="item"><a class="" href="currently-reading.php?clubname=<?php echo $clubname; ?>">CURRENTLY READING</a></li>
<li class="item"><a class="active" href="meetings.php?clubname=<?php echo $clubname; ?>">MEETINGS</a></li>
<li class="item"><a class="" href="members.php?clubname=<?php echo $clubname; ?>">MEMBERS</a></li>
<li class="item"><a class="" href="messages.php?clubname=<?php echo $clubname; ?>">MESSAGES</a></li>
</ul>
</div>
<p><span class="edit-profile-link"><a class="" href="delete_club.php?clubname=<?php echo $clubname; ?>">Delete this club</a></span></p>
</div>
</div>
<div class="right-container">
<div class="block-container">
<div>
<table class="table" style="margin-top: 20px">
<tr>
<th>Book Title</th>
<th>Meeting date</th>
<th>Meeting time</th>
<th>Meeting Virtual link</th>
<th>Meeting location</th>
<th> </th>
</tr>
<?php while($row = mysqli_fetch_assoc($result)){ ?>
<tr>
<td><?php echo $row['bookname']; ?></td>
<td><?php echo $row['meetingdate']; ?></td>
<td><?php echo $row['meetingtime']; ?></td>
<td><?php echo $row['meetinglink']; ?></td>
<td><?php echo $row['meetinglocation']; ?></td>
<td><a href="meeting_delete.php?id=<?php echo $row['id']; ?>">Delete</a></td>
</tr>
<?php } ?>
</table>
</div>
<div class="block-content create-meeting-content">
<h1 class="block-title">Create a new meeting</h1>
<div class="create-meeting-form">
<div class="main-form">
<form novalidate="" method="POST" action="create-meeting.php?clubname=<?php echo $clubname; ?>">
<div class="form-search-book-content">
<div class="form-group undefined"><input type="text" maxLength="255" id="bookName" aria-label="ENTER BOOK TITLES " name="bookname" value="" placeholder="ENTER BOOK TITLES" class="form-control" /><span role="alert" class="notification-message error"></span></div>
</div>
<div class="col-sm-7">
<div class="form-group">
<div class="rdt form-custom "><input type="date" class="form-control" value="" placeholder="MEETING DATE" name="meetingdate" id="meetingDate" />
</div>
</div>
</div>
<div class="col-sm-5">
<div class="form-group checkbox-time-readonly">
<div class="rdt form-custom "><input type="time" class="form-control" value="" placeholder="MEETING TIME" name="meetingtime" id="meetingTime" />
</div>
</div>
</div>
<div class="col-sm-12">
<div class="form-group hidden"><span role="alert" class="notification-message error show"></span></div>
</div>
<div class="col-sm-12">
<div class="form-group undefined"><input type="text" maxLength="225" id="virtualMeetingLink" aria-label="VIRTUAL MEETING LINK" name="meetinglink" value="" icon="link" placeholder="VIRTUAL MEETING LINK" class="form-control" /><span role="alert" class="notification-message error"></span></div>
</div>
<div class="col-sm-12">
<div class="form-group undefined"><input type="text" maxLength="75" id="meetingLocation" aria-label="MEETING LOCATION" name="meetinglocation" value="" icon="location" placeholder="MEETING LOCATION" class="form-control" /><span role="alert" class="notification-message error"></span></div>
</div>
</div>
<div class="form-group button-group clearfix"><a href="meetings.php?clubname=<?php echo $clubname; ?>" class="btn btn-default-corner btn-cancel">Cancel</a>
<div class="wrap-create-action">
<div class="tooltip-create-meeting place-top ">
</div><button type="submit" name="submit" class="btn btn-default-corner btn-create-meeting btn-create" >Create meeting</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</main>
<footer class="footer-container">
<div class="footer-top"><a href="/" class="logo-footer" aria-label="Link to Shelfindulgence's Homepage"><img width="203" height="26" class="img-responsive" src="static/media/logo.png" alt="" /></a></div>
<div class="footer-middle">
<div class="footer-nav">
<div class="footer-nav-item">
<h3 class="nav-title">Company</h3>
<p class="nav-item"><a class="nav-link" href="/about">About Shelfindulgence</a></p>
<p class="nav-item"><a class="nav-link" href="/privacy-policy">Privacy Policy</a></p>
</div>
<div class="footer-nav-item">
<h3 class="nav-title">Community</h3>
<p class="nav-item"><a class="nav-link" href="">Join a Book Club</a></p>
</div>
<div class="footer-nav-item">
<h3 class="nav-title">Support</h3>
<p class="nav-item"><a class="nav-link" href="/faq/#contact-us">Contact Us</a></p>
<p class="nav-item"><a class="nav-link" href="/faq">FAQ</a></p>
</div>
<div class="mask"></div>
</div>
<div class="subscribe-block">
<h3 class="nav-title">Keep in touch</h3>
<p class="nav-item">Join the Shelf Indulgence newsletter for monthly reading recommendations, book club tips, giveaways, and more.</p>
<div class="blog-subscribe subscribe-top-books">
<div class="center">
<h2 class="subscribe-title">Enter your email to receive Shelfindulgence' newsletter with reading recommendations and the most popular book club books each month.</h2>
<form class="form-subscribe" novalidate=""><input type="email" class="input-form" value="" aria-label="Email address" placeholder="Email address" /><button type="submit" class="input-submit">SUBSCRIBE</button></form>
</div>
</div>
</div>
</div>
<div class="footer-bottom">
<div class="copyright">
<p>©
<!-- -->2021
<!-- --> John Hilderbrandt All rights reserved
</p>
</div>
<div class="social-list">
<p class="social-items">Connect</p>
<div class="social-items"><a target="_blank" rel="noopener noreferrer" aria-label="Link to Shelfindulgence's Instagram" href="https://www.instagram.com/bookclub.z/"><span class="ficon ficon-instagram"></span></a></div>
<div class="social-items"><a target="_blank" rel="noopener noreferrer" aria-label="Link to Shelfindulgence's LinkedIn" href="https://www.linkedin.com/company/Shelfindulgence"><span class="ficon ficon-linkedin-circle"></span></a></div>
</div>
</div>
</footer>
</div>
<div class="Toastify"></div>
</div>
</div>
</body>
</html>