-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.html
565 lines (507 loc) · 21.8 KB
/
create.html
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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<!DOCTYPE html>
<!--
Copyright (c) 2012-2016 Adobe Systems Incorporated. All rights reserved.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
<!-- This is a wide open CSP declaration. To lock this down for production, see below. -->
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *" />
<!-- Good default declaration:
* gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
* https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
* Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
* Enable inline JS: add 'unsafe-inline' to default-src
* Enable eval(): add 'unsafe-eval' to default-src
* Create your own at http://cspisawesome.com
-->
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-inline' https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *" /> -->
<!-- Path to Materialize Library CSS-->
<link rel="stylesheet" href="css/semantic.min.css">
<link rel="stylesheet" href="css/calendar.min.css">
<!-- Path to Login custom's CSS-->
<link rel="stylesheet" href="css/">
<title>create</title>
<style>
.hh {background-color:#37474f;}
</style>
</head>
<body style="background-color:#cfd8dc;">
<div class="ui left vertical sidebar labeled icon menu">
<a class="item">
<i class="home icon"></i>
Home
</a>
<a class="item">
<i class="user icon"></i>
Account
</a>
<a class="item">
<i class="search icon"></i>
Search
</a>
<a class="item">
<i class="write icon"></i>
Create
</a>
<a class="item">
<i class="users icon"></i>
Friends
</a>
<a class="item">
<i class="compass icon"></i>
Nearby
</a>
<a class="item">
<i class="calendar checked icon"></i>
Schedule
</a>
<a class="item">
<i class="configure icon"></i>
Settings
</a>
<a class="item">
<i class="sign out icon"></i>
Log out
</a>
</div>
<div class="ui three item secondary top fixed menu hh" style="background-color:#37474f; height:60px;color:white;">
<a class="item" id="h" style="position:relative;right:25px;">
<i class="align justify icon"></i>
</a>
<a class=" item" style="font-size:25px; color:white;">
Create
</a>
<div class="right menu">
<a class="ui item">
<i class="alarm icon"></i>
</a>
</div>
</div><br><br><br><br>
<div class="pusher">
<div class="ui container">
<div style="width:100%;height:auto;margin:auto;">
<form class="ui form">
<h4 class="ui dividing header">Event Information</h4>
<div class="field">
<label for="file" class="ui icon button">
<i class="photo icon"></i>Upload Event image</label>
<input type="file" id="file" class="image" style="display:none;"/>
</div>
<div class="field">
<label>Name</label>
<div class="two fields">
<div class="field">
<input type="text" id="ename" placeholder="Select a unique event name">
</div>
</div>
</div>
<div class="field">
<label>Description</label>
<div class="fields">
<div class="twelve wide field">
<textarea type="text" id="about"></textarea>
</div>
</div>
</div>
<div class="field">
<label>Type</label>
<div class="ui selection dropdown" tabindex="0">
<input type="hidden" name="gender" id="type">
<i class="dropdown icon"></i>
<div class="default text">Type</div>
<div class="menu" tabindex="-1">
<div class="item" data-value="Attraction">Attraction</div>
<div class="item" data-value="Charity">Charity</div>
<div class="item" data-value="Comedy">Comedy</div>
<div class="item" data-value="Competition">Competition</div>
<div class="item" data-value="Concert">Concert</div>
<div class="item" data-value="Conference">Conference</div>
<div class="item" data-value="Convention">Convention</div>
<div class="item" data-value="Dinner or Gala">Dinner or Gala</div>
<div class="item" data-value="Fashion Show">Fashion Show</div>
<div class="item" data-value="Festival">Festival</div>
<div class="item" data-value="Food">Food</div>
<div class="item" data-value="Fundraiser">Fundraiser</div>
<div class="item" data-value="Launching">Launching</div>
<div class="item" data-value="Meet up">Meet up</div>
<div class="item" data-value="Party or club">Party or club</div>
<div class="item" data-value="Theatre">Theatre</div>
<div class="item" data-value="Rally">Rally</div>
<div class="item" data-value="Seminar or Talks">Seminar or Talks</div>
<div class="item" data-value="Screening">Screening</div>
<div class="item" data-value="Sports">Sports</div>
<div class="item" data-value="Tour">Tour</div>
<div class="item" data-value="Wedding">Wedding</div>
</div>
</div>
</div>
<div class="field">
<label>Location</label>
<div class="fields">
<div class="twelve wide field">
<input type="text" id="location" placeholder="No. 433 Otubo drive, kubwa">
</div>
</div>
</div>
<div class="field">
<label>Country</label>
<div class="ui selection dropdown" tabindex="0">
<input type="hidden" name="gender" id="country">
<i class="dropdown icon"></i>
<div class="default text">Country</div>
<div class="menu" tabindex="-1">
<div class="item" data-value="Nigeria">Nigeria</div>
</div>
</div>
</div>
<div class="field">
<label>State</label>
<div class="ui selection dropdown" tabindex="0">
<input type="hidden" name="gender" id="state">
<i class="dropdown icon"></i>
<div class="default text">State</div>
<div class="menu" tabindex="-1">
<div class="item" data-value="Abia">Abia</div>
<div class="item" data-value="Abuja">Abuja</div>
<div class="item" data-value="Adamawa">Adamawa</div>
<div class="item" data-value="Akwa Ibom">Akwa Ibom</div>
<div class="item" data-value="Anambra">Anambra</div>
<div class="item" data-value="Bauch">Bauchi</div>
<div class="item" data-value="Bayelsa">Bayelsa</div>
<div class="item" data-value="Benue">Benue</div>
<div class="item" data-value="Borno">Borno</div>
<div class="item" data-value="Cross River">Cross River</div>
<div class="item" data-value="Delta">Delta</div>
<div class="item" data-value="Ebonyi">Ebonyi</div>
<div class="item" data-value="Edo">Edo</div>
<div class="item" data-value="Ekiti">Ekiti</div>
<div class="item" data-value="Enugu">Enugu</div>
<div class="item" data-value="Gombe">Gombe</div>
<div class="item" data-value="Imo">Imo</div>
<div class="item" data-value="Jigawa">Jigawa</div>
<div class="item" data-value="Kaduna">Kaduna</div>
<div class="item" data-value="Kano">Kano</div>
<div class="item" data-value="Kastina">Kastina</div>
<div class="item" data-value="Kebbi">Kebbi</div>
<div class="item" data-value="Kogi">Kogi</div>
<div class="item" data-value="Kwara">Kwara</div>
<div class="item" data-value="Lagos">Lagos</div>
<div class="item" data-value="Nassawara">Nassawara</div>
<div class="item" data-value="Niger">Niger</div>
<div class="item" data-value="Ogun">Ogun</div>
<div class="item" data-value="Ondo">Ondo</div>
<div class="item" data-value="Osun">Osun</div>
<div class="item" data-value="Oyo">Oyo</div>
<div class="item" data-value="Plateau">Plateau</div>
<div class="item" data-value="Rivers">Rivers</div>
<div class="item" data-value="Sokoto">Sokoto</div>
<div class="item" data-value="Yobe">Yobe</div>
<div class="item" data-value="Zamfara">Zamfara</div>
</div>
</div>
</div>
<div class="field">
<label>Date</label>
<div class=" two fields">
<div class="eight wide field">
<div class="ui calender" id="rangestart">
<div class="ui input left icon" >
<i class="calendar icon"></i>
<input type="text" id="dateFrom" placeholder="Start">
</div>
</div>
</div>
<div class="eight wide field">
<div class="ui calender" id="rangeend">
<div class="ui input left icon" >
<i class="calendar icon"></i>
<input type="text" id="dateTo" placeholder="End">
</div>
</div>
</div>
</div>
</div>
<div class="field">
<label>Time</label>
<div class=" two fields">
<div class="eight wide field">
<div class="ui calender" id="timestart">
<div class="ui input left icon" >
<i class="time icon"></i>
<input type="text" id="timeFrom" placeholder="Start">
</div>
</div>
</div>
<div class="eight wide field">
<div class="ui calender" id="timeend">
<div class="ui input left icon" >
<i class="time icon"></i>
<input type="text" id="timeTo" placeholder="End">
</div>
</div>
</div>
</div>
</div>
<div class="field">
<label>Email</label>
<div class=" two fields">
<div class="four wide field">
<input type="text" name="shipping[address]" placeholder="Email Address">
</div>
</div>
</div>
<div class="field">
<label>Phone number</label>
<div class=" two fields">
<div class="four wide field">
<input type="email" id="email" placeholder="(+234) 7055555555">
</div>
</div>
</div>
<div class="field">
<label>Website</label>
<div class=" two fields">
<div class="four wide field">
<input type="text" id="web" placeholder="Web address">
</div>
</div>
</div>
<div class="field">
<label>Tags</label>
<div class=" two fields">
<div class="four wide field">
<input type="text" id="tags" placeholder="Outdoor, Pool, fun, All night">
</div>
</div>
</div>
<div class="ui segment">
<div class="field">
<div class="ui toggle checkbox">
<input type="checkbox" name="gift" tabindex="0" class="hidden" id="checked">
<label>Do you want to sell tickets on this paltform?</label>
</div>
</div>
</div>
<div class="ui button" tabindex="0" id="continue">Continue</div>
</form><br><br>
<form class="ui form" id="form-two">
<div class="ui message">
<div class="header">
Charging Policy
</div>
<p>Please note that when costing your event on this platform, your buyers pay 1.5% transactional fees + 100 naira on amounts greater than 2500. These charges on any amount would not exceed 2000 naira</p>
</div>
<h4 class="ui dividing header">Ticket Information</h4>
<div class="field">
<label>Type</label>
<div class="ui selection dropdown" tabindex="0">
<input type="hidden" name="gender">
<i class="dropdown icon"></i>
<div class="default text">Type</div>
<div class="menu" tabindex="-1">
<div class="item" data-value="1">Kids</div>
<div class="item" data-value="0">Regular</div>
<div class="item" data-value="0">VIP</div>
<div class="item" data-value="0">VIP+</div>
<div class="item" data-value="0">Table of four</div>
<div class="item" data-value="0">Table of six</div>
</div>
</div>
</div>
<div class="field">
<label>Quantity</label>
<div class=" fields">
<div class="twelve wide field">
<input type="number" name="shipping[address]" placeholder="Ticket quantity">
</div>
</div>
</div>
<div class="field">
<label>Cost</label>
<div class=" fields">
<div class="twelve wide field">
<input type="number" name="shipping[address]" placeholder="Ticket Cost">
</div>
</div>
</div>
<div class="ui button" tabindex="0" id="Submit" onclick="payWithPaystack()">Submit</div>
</form><br><br>
</div>
</div>
</div>
<!-- Path to jQuery Library-->
<script src="js/jquery-3.2.1.min.js"></script>
<!-- Path to semantic Library (javaScript)-->
<script src="js/semantic.min.js"></script>
<script src="js/calendar.min.js"></script>
<!-- Path to Tinymce Editor Library -->
<script src="tinymce/tinymce.min.js"></script>
<script src="https://js.paystack.co/v1/inline.js"></script>
<script>
$(window).on("load",function(){
// if( typeof window.localStorage.getItem("login") !== 'undefined' && window.localStorage.getItem("login") != 1) {
// window.location.href="login.html";
// }else {
/*$.ajax({
type: 'get',
url: 'http://gothere.000webhostapp.com/check_status.php',
dataType: 'html',
success: function (response) {
if (response == "ok") {
}else {
window.location.href="login.html";
}
}
}); */
});
$(document).ready(function(){
tinymce.init({selector:'textarea'});//show the html editor
$("#h").click(function(){
$('.ui.vertical.sidebar').sidebar('toggle');
});
$("#timestart").calendar({
type:'time'
});$("#timeend").calendar({
type:'time'
});
$("#rangestart").calendar({
type:'date',
// endCalendar:$('#')
});
$("#rangeend").calendar({
type:'date',
endCalendar:$('#rangestart')
});
$('.selection.dropdown').dropdown();
$('#form-two').hide();
$('.ui.checkbox').checkbox();
$("#continue").click(function(){
var chk = $("#checked:checked").length > 0;
if(chk > 0){
$('#continue').hide();
$('#form-two').show();
}else {
tinyMCE.triggerSave();// save the data to the assigned ID of the textarea field
var image = $(".image").val();
var ename = $("#ename").val();
var about =$("#about").val();
var location = $("#location").val();
var country = $("#country").val();
var state = $("#state").val();
var dateFrom = $("#dateFrom").val();
var dateTo = $("#dateTo").val();
var timeFrom = $("#timeFrom").val();
var timeTo = $("#timeTo").val();
var email = $("#email").val();
var num = $("#num").val();
var web = $("#web").val();
var type = $("#type").val();
var tag = $("#tag").val();
//formData.append('fee', $('#fee').val());
alert(type);
var formData = new FormData();
formData.append('image', document.getElementsByClassName("image").files[0]);
formData.append('ename', $('#ename').val());
formData.append('about', $('#about').val());
formData.append('location', $('#location').val());
formData.append('state', $('#state').val());
formData.append('country', $('#country').val());
formData.append('dateFrom', $('#dateFrom').val());
formData.append('dateTo', $('#dateTo').val());
formData.append('timeFrom', $('#timeFrom').val());
formData.append('timeTo', $('#timeTo').val());
formData.append('num', $('#num').val());
formData.append('type', $('#type').val());
formData.append('tag', $('#tag').val());
if (ename != "" && about != "" && location != "" && state != "" && country != "" && dateFrom != "" && timeFrom != "" && timeTo != "" && type != "" && tag != "") {
$.ajax({
type: 'post',
//url: 'http://gothere.000webhostapp.com/create.php',
url: 'check-name.php',
data: {
ename: ename,
},
success:function(response) {
if (response == "success") {
$.ajax({
type: 'post',
//url: 'http://gothere.000webhostapp.com/create.php',
url: 'create.php',
data: formData,
cache: false,
contentType: false,
processData: false,
success:function(response) {
if (response == "success") {
var $toastContent = $('<span>Event created!</span>').add($('<button onclick="ticket()" class="btn-flat toast-action">Create ticket</button>'));
Materialize.toast($toastContent, 10000);
//Materialize.toast('Event successfully created!', 4000);
}else { Materialize.toast('Event not created!', 4000);}
}
});
}else {Materialize.toast('Select a new name!', 4000);}
}
});
}else {Materialize.toast('Fill all required fields!', 4000);}
}
});
});
function logout() {
$.ajax({
type: 'get',
url: 'http://gothere.000webhostapp.com/logout.php',
//url: 'logout.php',
success: function (response) {
if (response == "success") {
window.location.href="login.html";
}else{
alert("You were not logged out");
}
}
});
}
function payWithPaystack(){
var handler = PaystackPop.setup({
key: 'pk_test_7467642a935f642b8bb6c060112aada9ea933e2b',
email: '[email protected]',
amount: 10000,
ref: ''+Math.floor((Math.random() * 1000000000) + 1), // generates a pseudo-unique reference. Please replace with a reference you generated. Or remove the line entirely so our API will generate one for you
metadata: {
custom_fields: [
{
display_name: "Mobile Number",
variable_name: "mobile_number",
value: "+2348012345678"
}
]
},
callback: function(response){
alert('success. transaction ref is ' + response.reference);
},
onClose: function(){
alert('window closed');
}
});
handler.openIframe();
}
</script>
</body>
</html>