-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-new-event.php
299 lines (285 loc) · 16.9 KB
/
create-new-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
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<?php
include "header.php";
if (file_exists('config/user_authentication.php')) {
include('config/user_authentication.php');
}
if (file_exists('config/general_user_authentication.php')) {
include('config/general_user_authentication.php');
}
if (file_exists('config/event_page_authentication.php')) {
include('config/event_page_authentication.php');
}
//To check the event count with current plan starts
$plan_type_event_count = $user_plan_type['plan_type_event_count'];
$event_count_user = getCountUserEvent($_SESSION['user_id']);
if ($event_count_user >= $plan_type_event_count) {
$_SESSION['status_msg'] = $BIZBOOK['EVENTS_LIMIT_EXCEED_MESSAGE'];
header('Location: db-events');
exit();
}
//To check the event count with current plan ends
?>
<!-- START -->
<!--PRICING DETAILS-->
<section class="<?php if ($footer_row['admin_language'] == 2) {
echo "lg-arb";
} ?> login-reg">
<div class="container">
<div class="row">
<div class="login-main add-list">
<div class="log-bor"> </div>
<span class="steps"><?php echo $BIZBOOK['ADD_NEW_EVENT']; ?></span>
<div class="log">
<div class="login add-list-off">
<?php include "page_level_message.php"; ?>
<h4><?php echo $BIZBOOK['CREATE_EVENT']; ?></h4>
<form action="event_insert.php" class="event_form" id="event_form" name="event_form"
method="post" enctype="multipart/form-data">
<ul>
<li>
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<input type="text" name="event_name" required="required"
class="form-control" id="event_name"
placeholder="<?php echo $BIZBOOK['EVENT_NAME']; ?>*">
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<input type="text" name="event_address" required="required"
class="form-control" id="event_address"
placeholder="<?php echo $BIZBOOK['ADDRESS']; ?>*">
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<select name="category_id"
id="category_id" class="chosen-select form-control">
<option value=""><?php echo $BIZBOOK['SELECT_CATEGORY']; ?></option>
<?php
foreach (getAllEventCategories() as $categories_row) {
?>
<option <?php if ($_SESSION['category_id'] == $categories_row['category_id']) {
echo "selected";
} ?>
value="<?php echo $categories_row['category_id']; ?>"><?php echo $categories_row['category_name']; ?></option>
<?php
}
?>
</select>
</div>
</div>
</div>
<!--FILED END-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<select onChange="geteventCities(this.value);" name="country_id"
required="required" id="country_id"
class="chosen-select form-control">
<option value=""><?php echo $BIZBOOK['SELECT_YOUR_COUNTRY']; ?></option>
<?php
//Countries Query
$admin_countries = $footer_row['admin_countries'];
$catArray = explode(',', $admin_countries);
foreach($catArray as $cat_Array) {
foreach (getMultipleCountry($cat_Array) as $countries_row) {
?>
<option value="<?php echo $countries_row['country_id']; ?>"><?php echo $countries_row['country_name']; ?></option>
<?php
}
}
?>
</select>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<select data-placeholder="<?php echo $BIZBOOK['SELECT_YOUR_CITY']; ?>"
name="city_id[]" id="city_id" multiple required="required"
class="chosen-select form-control">
<option value=""><?php echo $BIZBOOK['SELECT_YOUR_CITY']; ?></option>
</select>
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input type="text" name="event_start_date" required="required"
class="form-control"
placeholder="<?php echo $BIZBOOK['DATE']; ?>*" id="newdate">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" name="event_time" required="required"
class="form-control"
placeholder="<?php echo $BIZBOOK['TIME']; ?>*">
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" required="required"
name="event_description" id="event_description"
placeholder="<?php echo $BIZBOOK['EVENT_DETAILS']; ?>"></textarea>
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<textarea class="form-control" name="event_map"
placeholder="<?php echo $BIZBOOK['GOOGLE_MAP_LOCATION']; ?>"></textarea>
<!-- INPUT TOOL TIP -->
<div class="inp-ttip">
<b><?php echo $BIZBOOK['EVENT_IFRAME_FROM_GOOGLE']; ?></b><?php echo $BIZBOOK['EVENT_COPY_PASTE_IFRAME_FROM_GOOGLE']; ?>
</div>
<!-- END INPUT TOOL TIP -->
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label><?php echo $BIZBOOK['CHOOSE_BANNER_IMAGE']; ?></label>
<div class="fil-img-uplo">
<span class="dumfil"><?php echo $BIZBOOK['UPLOAD_A_FILE']; ?></span>
<input type="file" name="event_image"
accept="image/*,.jpg,.jpeg,.png" class="form-control">
</div>
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input type="text" name="event_contact_name" required="required"
class="form-control"
placeholder="<?php echo $BIZBOOK['CONTACT_PERSON']; ?>*">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" name="event_mobile" required="required"
class="form-control"
placeholder="<?php echo $BIZBOOK['CONTACT_PHONE_NUMBER']; ?>*">
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input type="email" name="event_email" required="required"
class="form-control"
placeholder="<?php echo $BIZBOOK['CONTACT_EMAIL_ID']; ?>*">
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input type="text" name="event_website" class="form-control"
placeholder="<?php echo $BIZBOOK['EVENT_WEBSITE']; ?>">
</div>
</div>
</div>
<!--FILED END-->
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<div>
<div class="chbox">
<input type="checkbox" id="isenquiry" name="isenquiry" checked="">
<label
for="isenquiry"><?php echo $BIZBOOK['ENQUIRY_BOX_ENABLE']; ?></label>
</div>
</div>
</div>
</div>
<!--FILED END-->
</li>
</ul>
<!--FILED START-->
<div class="row">
<div class="col-md-12">
<button type="submit" name="event_submit"
class="btn btn-primary"><?php echo $BIZBOOK['SUBMIT']; ?></button>
</div>
<div class="col-md-12">
<a href="dashboard" class="skip"><?php echo $BIZBOOK['GO_TO_USER_DASHBOARD']; ?>
>></a>
</div>
</div>
<!--FILED END-->
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!--END PRICING DETAILS-->
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="js/jquery.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script type="text/javascript">var webpage_full_link = '<?php echo $webpage_full_link;?>';</script>
<script type="text/javascript">var login_url = '<?php echo $LOGIN_URL;?>';</script>
<script src="js/custom.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/custom_validation.js"></script>
<script src="js/select-opt.js"></script>
<script src="admin/ckeditor/ckeditor.js"></script>
<script>
CKEDITOR.replace('event_description');
</script>
<script>
function geteventCities(val) {
$.ajax({
type: "POST",
url: "city_process.php",
data: 'country_id=' + val,
success: function (data) {
$("#city_id").html(data);
$('#city_id').trigger("chosen:updated");
}
});
}
</script>
<?php if ($footer_row['admin_google_paid_geo_location'] == 1) { ?>
<script
src="https://maps.googleapis.com/maps/api/js?key=<?php echo $footer_row['admin_geo_map_api']; ?>&callback=initAutocomplete&libraries=places&v=weekly"
defer
></script>
<script src="js/google-geo-location-event-add.js">
</script>
<?php } ?>
</body>
</html>