This repository has been archived by the owner on Nov 13, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.php
267 lines (216 loc) · 6.91 KB
/
forms.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
<?php
include 'header.html';
include_once 'config/functions_admin.php';
//Forms as listed below
function register() {
?>
<div class="container">
<!-- Text -->
<div class="sixteen columns">
<p>Register to become a member of the website by filling out the form below. Please note that by filling the form out below, you are expressing interest in becoming a member of the 3D Print Club. An e-mail will be sent later to verify your interest.</p>
<p>This registration form is for University of Missouri students only.</p>
</div>
<!-- Contact Form -->
<div class="twelve columns">
<div class="headline no-margin"><h4>Registration Form</h4></div>
<div class="form-spacer"></div>
<!-- Success Message -->
<div class="success-message">
<div class="notification success closeable">
<p><span>Success!</span> You have registered on our website! An activation link has been sent to your e-mail, please click on the link to activate your account.</p>
</div>
</div>
<!-- Form -->
<div id="contact-form">
<form method="post" action="forms.php?f=register">
<div class="field">
<label>First name:</label>
<input type="text" name="first" class="text" />
</div>
<div class="field">
<label>Last name:</label>
<input type="text" name="last" class="text" />
</div>
<div class="field">
<label>PawPrint:</label>
<input type="text" name="pawprint" class="text" />
</div>
<div class="field">
<label>Email:</label>
<input type="text" name="email" class="text" />
</div>
<div class="field">
<label>Current Major:</label>
<input type="text" name="major" class="text" />
</div>
<div class="field">
<label>Password: (*Min: 5, Max: 20)</label>
<input type="password" name="pass" class="text" />
</div>
<div class="field">
<label>Year in School:</label>
<select type="text" id="yearschool" class="dropdown" >
<option value="Freshman">Freshman</option>
<option value="Sophmore">Sophomore</option>
<option value="Junior">Junior</option>
<option value="Senior">Senior</option>
<option value="SeniorPlus">Senior +</option>
</select>
</div><br />
<!--<div class="field">
<button type="submit">Register!</button>
</div>-->
<div class="field">
<input type="button" id="createmem" value="Register!"/>
<div class="loading"></div>
</div>
</form>
</div>
</div>
</div>
</div>
<?}
function nonmizzouregister() {
?>
<div class="container">
<!-- Text -->
<div class="sixteen columns">
<p>Register to become a member of the website by filling out the form below. Please note that by filling the form out below, you are expressing interest in becoming a member of the 3D Print Club. An e-mail will be sent later to verify your interest.</p>
<p>This registration form is for the General Public</p>
</div>
<!-- Contact Form -->
<div class="twelve columns">
<div class="headline no-margin"><h4>Registration Form</h4></div>
<div class="form-spacer"></div>
<!-- Success Message -->
<div class="success-message">
<div class="notification success closeable">
<p><span>Success!</span> You have registered on our website! An activation link has been sent to your e-mail, please click on the link to activate your account.</p>
</div>
</div>
<!-- Form -->
<div id="contact-form">
<form method="post" action="">
<div class="field">
<label>First name:</label>
<input type="text" name="first" class="text" />
</div>
<div class="field">
<label>Last name:</label>
<input type="text" name="last" class="text" />
</div>
<div class="field">
<label>Username:</label>
<input type="text" name="username" class="text" />
</div>
<div class="field">
<label>Email:</label>
<input type="text" name="email" class="text" />
</div>
<div class="field">
<label>Password: (*Min: 5, Max: 20)</label>
<input type="password" name="pass" class="text" />
</div>
<!--<div class="field">
<button type="submit">Register!</button>
</div>-->
<div class="field">
<input type="button" id="createnonmem" value="Register!"/>
<div class="loading"></div>
</div>
</form>
</div>
</div>
</div>
</div>
<?}
function rsvp() {
$eventID = $_GET['id'];
$eventinfo = getEventInfo($eventID);
if($eventinfo['description']=="") { ?>
<div class="container">
<!-- Text -->
<div class="sixteen columns">
<p>Error: Event doesn't exist!</p>
</div>
</div>
</div>
</div>
<?
include_once 'footer.php';
die();
}
?>
<div class="container">
<!-- Text -->
<div class="sixteen columns">
<p><? echo $eventinfo['description']; ?>
<br /><br /><blockquote>This will not register you as a member of the club or subscribe you to a mailing list. If you would like to become a member in addition to RSVPing, please <a href="http://3dmizzou.org/forms.php?f=register">register on our website</a></blockquote></p>
<div class="notification notice">
<p><span>The location of the first meeting:</span> <? echo $eventinfo['location']; ?></p></p>
</div>
</div>
<!-- Contact Form -->
<div class="twelve columns">
<div class="headline no-margin"><h4>RSVP Form</h4></div>
<div class="form-spacer"></div>
<!-- Success Message -->
<div class="success-message">
<div class="notification success closeable">
<p><span>Success!</span> Your message has been sent.</p>
</div>
</div>
<!-- Form -->
<div id="contact-form">
<form method="post" action="">
<input type="hidden" name="eventid" value="<? if(is_numeric($_GET['id'])) echo $_GET['id']; ?>" class="text" />
<div class="field">
<label>Name:</label>
<input type="text" name="rsvpname" class="text" />
</div>
<div class="field">
<label>PawPrint: <span>*</span></label>
<input type="text" name="rsvppawprint" class="text" />
</div>
<div class="field">
<label>Email: <span>*</span></label>
<input type="text" name="rsvpemail" class="text" />
</div>
<div class="field">
<input type="button" id="rsvp" value="RSVP!"/>
<div class="loading"></div>
</div>
</form>
</div>
</div>
</div>
</div>
<? }
if($_GET['f']=='register') {
if(!$user->data['is_registered']) {
register();
} else {
echo '<meta http-equiv="REFRESH" content="0;url=/">';
die();
}
} else if ($_GET['f']=='rsvp') {
if(!$user->data['is_registered']) {
if(is_numeric($_GET['id'])) {
rsvp();
} else {
echo '<meta http-equiv="REFRESH" content="0;url=/">';
die();
}
} else {
echo '<meta http-equiv="REFRESH" content="0;url=/profile.php?p=rsvp">';
die();
}
} else if ($_GET['f']=='nonmizzou') {
if(!$user->data['is_registered']) {
nonmizzouregister();
} else {
echo '<meta http-equiv="REFRESH" content="0;url=/">';
die();
}
}
include_once 'footer.php'; ?>