forked from cs353-project/Local_Events_App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_event.php
188 lines (171 loc) · 12.7 KB
/
create_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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet">
<body style="background-color:#EEE2E2">
<?php include_once("navbar.php"); ?>
<?php
include("api/header.php");
insert_head("Create Event");
?>
<div style=" height:0px; left:20px; top:112px; border:1px solid #AE8181; background-color: #AE8181"><div>
<div style="padding:10px">
<h2>Create Event</h2>
<form class="mx-1 mx-md-4" method="post" action="form_process/create_event_process.php">
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="text" name="title" class="form-control" required/>
<label class="form-label">Event Name</label>
</div>
</div>
<?php
if (isset($_SESSION["time-error"]) && $_SESSION["time-error"] == true)
{
echo '<script>alert("Enter valid times!")</script>';
unset($_SESSION["time-error"]);
}
?>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="checkbox" id="online_check" name="online_check[]" value="online_check">
<label for="online_check">Online Event</label><br>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="text" name="address_city" class="form-control"/>
<label class="form-label">City</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="text" name="address_street" class="form-control"/>
<label class="form-label">Street</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="text" name="address_building" class="form-control"/>
<label class="form-label">Building</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-envelope fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="text" name="online_address" class="form-control"/>
<label class="form-label">Online link</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="datetime-local" name="start_time" class="form-control" required/>
<label class="form-label">Start Date(should be sooner than end date)</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="datetime-local" name="end_time" class="form-control" required/>
<label class="form-label">End Date(max is 3 years later for eu time)</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-envelope fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="text" name="description" class="form-control" required/>
<label class="form-label">Description</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-user fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-1 w-50">
<input type="datetime-local" name="registration_endtime" class="form-control" required/>
<label class="form-label">Registiration End Date(sooner than start date later than current date) </label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<label class="form-label">Restrictions: Check the tickbox for the following restrictions you want and fill in the amount</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="checkbox" id="capacity_check" name="capacity_check[]" value="capacity_check">
<label for="capacity_check">Capacity</label><br>
<input type="checkbox" id="age_check" name="age_check[]" value="age_check">
<label for="age_check">Age</label><br>
<input type="checkbox" id="gender_check" name="gender_check[]" value="gender_check">
<label for="gender_check">Gender</label><br>
<input type="checkbox" id="pass_requirement" name="pass_requirement[]" value="pass_requirement">
<label for="pass_check">Pass Requirement</label><br>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="number" id="capacity" name="capacity" min="0" >
<label class="form-label">Capacity Amount</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="number" id="age" name="age" min="3" max="21">
<label class="form-label">Age Restriction Over(between 3 and 21)</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<label for="gender">Gender</label>
<select id="gender" name="gender">
<option value="male">Male</option>
<option value="female">Female</option>
</select>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="number" step="0.01" id="price" name="price" min="0,1" >
<label class="form-label">Ticket Price</label>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-lock fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<label for="type">Event_type</label>
<select id="type" name="type">
<option value="competition">Competition</option>
<option value="festival">Festival</option>
<option value="music">Music</option>
<option value="sports">Sports</option>
<option value="workshop">Workshop</option>
<option value="art">Art</option>
<option value="staged">Staged</option>
<option value="informational">Informational</option>
</select>
</div>
</div>
<div class="d-flex flex-row align-items-center mb-4">
<i class="fas fa-envelope fa-lg me-3 fa-fw"></i>
<div class="form-outline mb-0 w-50">
<input type="text" name="image" class="form-control" required/>
<label class="form-label">Image Link</label>
</div>
</div>
<div class="d-flex justify-content-center mx-4 mb-3 mb-lg-4">
<input type="submit" name="create-event" value="Create Event" class="btn btn-primary btn-lg" href="home_page.php">
</div>
</form>
</div>
</body>
</html>