-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathevents-form.php
105 lines (82 loc) · 3.18 KB
/
events-form.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
<?php
// Need to check if utilities already included or else could get an error.
if (!function_exists('class_loader')) {
require($_SERVER["DOCUMENT_ROOT"] . '/inc/utilities.inc.php');
}
// If no user is logged in, redirect to the login page
if(!$user) {
header("Location: login.php?");
}
require($_SERVER["DOCUMENT_ROOT"] . '/inc/header.php');
?>
<!---jquery for datepicker--->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker();
} );
</script>
<!--- end ---->
<!-- *****************************************************************************************************************
EVENTS FORMS
***************************************************************************************************************** -->
<div class="container mtb">
<div class="rborder"
<div class="row">
<div class="col-xs-0 col-lg-2"></div><!-- spacer to center form -->
<div class="col-lg-8">
<div class="row">
<h2>Create and Post Events</h2>
<div class="hline"></div>
<p><?php echo $result; ?></p>
<br/><br/>
</div>
<form role="form" method="post" action="<?php echo $_SERVER["URI"] . '/inc/events-form-process.php'; ?>">
<div class="row">
<div class="form-group col-sm-6">
<div class="row">
<label for="inputEventTitle">Title </label>
</div>
<div class="row">
<input type="text" class="form-control" name="inputEventTitle" id="eventTitle" />
<?php if($eventTitleIsInvalid) printTitleError(); ?>
</div>
</div>
<div class="form-group col-sm-6">
<div class="row" id="testDiv">
<label for="inputLocation">Location </label>
</div>
<div class="row" id="eventTitleDiv">
<input type="text" class="form-control" name="inputEventLocation" id="eventLocation" />
<?php if($eventLocationIsInvalid) printLocationError(); ?>
</div>
</div>
</div>
<div class="row">
<div class="form-group col-sm-6" >
<div class="row">
<label for="from">Date:</label>
<input type="text" class="form-control" name="inputdate" id="datepicker" placeholder="Event Date">
<?php if($eventDateIsInvalid) printDateError(); ?>
</div>
</div>
</div>
<div class="row">
<label for="inputEvents">Description</label>
<textarea class="form-control" rows="5" name="inputEventDescription" id="description"></textarea>
<?php if($eventDescriptionIsInvalid) printEventDescriptionError(); ?>
</div>
<!-- END EVENTS INPUT -->
<br/><br/>
<div class="col-xs-12 text-center">
<button name="submit" type="submit" class="btn btn-primary">Submit</button>
</div>
</form> <br />
</div><!-- /col-lg-8 -->
</div><!-- /row -->
</div><!-- /rborder -->
</div><!-- /container -->