-
Notifications
You must be signed in to change notification settings - Fork 1
/
eb_app.php
executable file
·461 lines (377 loc) · 25.5 KB
/
eb_app.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
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
<?php require_once("includes/session.php");?>
<?php require_once("includes/db_connection.php");?>
<?php require_once("includes/functions.php");?>
<?php
if (isset($_POST['submit'])) {
$name = mysqli_real_escape_string($conn, htmlspecialchars($_POST['name']));
$dob = mysqli_real_escape_string($conn, htmlspecialchars($_POST['dob']));
$job = mysqli_real_escape_string($conn, htmlspecialchars($_POST['job']));
$school = mysqli_real_escape_string($conn, htmlspecialchars($_POST['school']));
$phno = mysqli_real_escape_string($conn, htmlspecialchars($_POST['phno']));
$email = mysqli_real_escape_string($conn, htmlspecialchars($_POST['email']));
$nodel = mysqli_real_escape_string($conn, htmlspecialchars($_POST['nodel']));
$del_details = mysqli_real_escape_string($conn, htmlspecialchars($_POST['del_details']));
$noeb = mysqli_real_escape_string($conn, htmlspecialchars($_POST['noeb']));
$eb_details = mysqli_real_escape_string($conn, htmlspecialchars($_POST['eb_details']));
$sec_details = mysqli_real_escape_string($conn, htmlspecialchars($_POST['sec_details']));
$council_ch1 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['council_ch1']));
$agenda1 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['agenda1']));
$agenda1_details = mysqli_real_escape_string($conn, htmlspecialchars($_POST['agenda1_details']));
$council_ch2 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['council_ch2']));
$agenda2 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['agenda2']));
$agenda2_details = mysqli_real_escape_string($conn, htmlspecialchars($_POST['agenda2_details']));
$council_ch3 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['council_ch3']));
$posit = mysqli_real_escape_string($conn, htmlspecialchars($_POST['posit']));
$eb_caps1 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['eb_caps1']));
$alt_post = mysqli_real_escape_string($conn, htmlspecialchars($_POST['alt_post']));
$eb_caps2 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['eb_caps2']));
$eb_caps3 = mysqli_real_escape_string($conn, htmlspecialchars($_POST['eb_caps3']));
$hotel = mysqli_real_escape_string($conn, htmlspecialchars($_POST['hotel']));
$q_back = mysqli_real_escape_string($conn, htmlspecialchars($_POST['q_back']));
$pro_pic = 1;
$target_dir = "img/eb_pics/";
$target_file = $target_dir . basename($_FILES["pro_pic"]["name"]);
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
move_uploaded_file($_FILES["pro_pic"]["tmp_name"],"img/eb_pics/$phno.jpg");
$query = "INSERT INTO eb_apps (name, dob, job, school, phno, email, nodel, del_details, noeb, eb_details, sec_details, council_ch1, agenda1, agenda1_details,council_ch2, agenda2, agenda2_details, council_ch3, posit, eb_caps1, alt_post, eb_caps2, eb_caps3, hotel, q_back, pro_pic)";
$query .= " VALUES ('{$name}', '{$dob}', '{$job}', '{$school}', '{$phno}', '{$email}', {$nodel}, '{$del_details}', {$noeb}, '{$eb_details}', '{$sec_details}', '{$council_ch1}', '{$agenda1}', '{$agenda1_details}','{$council_ch2}', '{$agenda2}', '{$agenda2_details}', '{$council_ch3}', '{$posit}', '{$eb_caps1}', '{$alt_post}', '{$eb_caps2}', '{$eb_caps3}', '{$hotel}', '{$q_back}', {$pro_pic})";
$result = mysqli_query($conn, $query);
if ($result) {
redirect_to("eb_confirm.php");
$stsc = "";
} else {
$stsc = "Something went wrong! Please try again and see that you are using Google Chrome for this application. In case of any technical failure or for any technical assistance, please call 9962416408.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>VITCMUN 2017 | EB Application</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="VIT chennai MUN applications" />
<meta name="keywords" content="VIT chennai, MUN, VIT chennai MUN" />
<meta name="author" content="Prashant Bhardwaj" />
<link rel="shortcut icon" href="img/favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<script src="inc/js/jquery-1.11.0.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="inc/bootstrap/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="inc/bootstrap/css/bootstrap-theme.min.css">
<!-- Bootstrap reset -->
<link rel="stylesheet" href="inc/bootstrap/css/bootstrap-reset.css">
<!-- flexslider load -->
<link rel="stylesheet" href="inc/flexslider/flexslider.css" type="text/css">
<!-- easy pie chart -->
<link rel="stylesheet" type="text/css" href="inc/easy-pie-chart/demo/style.css">
<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" href="inc/magnific/dist/magnific-popup.css">
<!-- YTP -->
<link href="inc/YTPlayer/css/YTPlayer.css" media="all" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="inc/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/colors.css">
</head>
<body style="display:none;">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-50161037-1', 'wpidiots.com');
ga('send', 'pageview');
</script>
<style type="text/css">
body {
margin-top: -10px;
}
</style>
<div class="page-loader"></div>
<div class="l-wrapper">
<!-- HEADER -->
<div class="menu-wrap">
<!-- NAVIGATION -->
<div class="l-navigation-wrap menu-padd" id="l-navigation">
<div class="m-navbar container">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="l-logo">
<a href="index.html">
<img height="35%" width="35%" src="img/small_logo.png"> <span style="color:white;"><b>VITCMUN 2017</b></span>
</a>
</div><!-- l-logo -->
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav navbar-right">
<li >
<a href="index.html">Home</a>
</li>
<li><a href="index.html#intro">VITCMUN</a></li>
<li><a href="index.html#council">Committees</a></li>
<li><a href="team.html">Team</a></li>
<li><a href="index.html#contact">Contact Us </a></li>
</ul>
</div>
</div><!-- /.container-fluid -->
</nav>
</div><!-- m-navbar -->
</div><!-- l-navigation -->
</div><!-- content -->
<div class="l-content-wrap" id="standard-content">
<section>
<div class="l-page-section l-section" id="page-section">
<div class="container">
<div class="row">
<div class="col-lg-12"><br>
<h2 class="text-center">Executive Board Application</h2>
<h5 style="color:red;"><?php echo $stsc; ?></h5>
<center><h6 style="color:red;"><strong>Please do not use FireFox to fill this application.</strong></h6></center>
<div>
<form role="form" action="eb_app.php" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label>Name</label>
<input type="text" style="color: white;" name="name" required class="form-control">
</div>
<div class="form-group">
<label>Date of birth</label>
<input type="date" style="color: white;" name="dob" required class="form-control">
</div>
<div class="form-group">
<label>Current occupation</label>
<input type="text" style="color: white;" name="job" required class="form-control">
</div>
<div class="form-group">
<label>Educational Institution studying in/graduated from</label>
<input type="text" style="color: white;" name="school" required class="form-control">
</div>
<div class="form-group">
<label>Phone number</label>
<input type="number" style="color: white;" name="phno" required class="form-control">
</div>
<div class="form-group">
<label>Email address</label>
<input type="email" style="color: white;" name="email" required class="form-control">
</div>
<div class="form-group">
<label>Number of Model UN conferences attended as a delegate</label>
<input type="number" style="color: white;" name="nodel" required class="form-control">
</div>
<div class="form-group">
<label>List the Model UN conferences attended as a delegate according to the format given below</label>
<textarea style="color: white;" placeholder="No. - Name - Institution - Council - Country/Character Allotted - Award won (if any)" class="form-control" rows="3" name="del_details" required></textarea>
</div>
<div class="form-group">
<label>Number of Model UN conferences attended as an Executive Board member.</label>
<input type="number" style="color: white;" name="noeb" required class="form-control">
</div>
<div class="form-group">
<label>
List the Model UN conferences attended as an Executive Board member according to the
format given below.</label>
<textarea style="color: white;" placeholder="No. – Name – Institution – Council – Position" class="form-control" rows="3" name="eb_details" required></textarea>
</div>
<div class="form-group">
<label>List below any Model UN conferences organised as a member of the Secretariat.</label>
<textarea style="color: white;" placeholder="No. – Name – Institution – Position" class="form-control" rows="3" name="sec_details" required></textarea>
</div>
<div class="form-group">
<label>State your first preference of council:</label>
<select style="color: white;" name="council_ch1" required class="form-control">
<option value="United Nations Security Council">United Nations Security Council</option>
<option value="United Nations General Assembly – Disarmament and International Security Council">United Nations General Assembly – Disarmament and International Security Council</option>
<option value="United Nations Human Rights Council">United Nations Human Rights Council</option>
<option value="International Atomic Energy Agency">International Atomic Energy Agency</option>
<option value="Organisation for Security and Cooperation in Europe">Organisation for Security & Cooperation in Europe</option>
<option value="The Trilateral Commission">The Trilateral Commission</option>
</select>
</div>
<div class="form-group">
<label>Kindly suggest two agendas you would like to see discussed in this council.</label>
<textarea style="color: white;" class="form-control" rows="3" name="agenda1" required></textarea>
</div>
<div class="form-group">
<label>Briefly explain any one of these agendas and your reasons as to why you think it must be
discussed.</label>
<textarea style="color: white;" class="form-control" rows="3" name="agenda1_details" required></textarea>
</div>
<div class="form-group">
<label>State your second prefernce of council:</label>
<select style="color: white;" name="council_ch2" required class="form-control">
<option value="United Nations Security Council">United Nations Security Council</option>
<option value="United Nations General Assembly – Disarmament and International Security Council">United Nations General Assembly – Disarmament and International Security Council</option>
<option value="United Nations Human Rights Council">United Nations Human Rights Council</option>
<option value="International Atomic Energy Agency">International Atomic Energy Agency</option>
<option value="Organisation for Security and Cooperation in Europe">Organisation for Security & Cooperation in Europe</option>
<option value="The Trilateral Commission">The Trilateral Commission</option>
</select>
</div>
<div class="form-group">
<label>Kindly suggest two agendas you would like to see discussed in this council.</label>
<textarea style="color: white;" class="form-control" rows="3" name="agenda2" required></textarea>
<div class="form-group">
<label>Briefly explain any one of these agendas and your reasons as to why you think it must be
discussed.</label>
<textarea style="color: white;" class="form-control" rows="3" name="agenda2_details" required></textarea>
</div>
<div class="form-group">
<label>State your third prefernce of council:</label>
<select style="color: white;" name="council_ch3" required class="form-control">
<option value="United Nations Security Council">United Nations Security Council</option>
<option value="United Nations General Assembly – Disarmament and International Security Council">United Nations General Assembly – Disarmament and International Security Council</option>
<option value="United Nations Human Rights Council">United Nations Human Rights Council</option>
<option value="International Atomic Energy Agency">International Atomic Energy Agency</option>
<option value="Organisation for Security and Cooperation in Europe">Organisation for Security & Cooperation in Europe</option>
<option value="The Trilateral Commission">The Trilateral Commission</option>
</select>
</div>
<div class="form-group">
<label>Which post would you like to apply for?</label>
<select style="color: white;" name="posit" required class="form-control">
<option value="Chairperson/President or equivalent">Chairperson/President or equivalent</option>
<option value="Vice-chairperson/Vice-president or equivalent">Vice-chairperson/Vice- president or equivalent</option>
</select>
</div>
<div class="form-group">
<label>Briefly explain why you think you merit the post you applied for and what you will do in your
capacity ensure a high standard of debate and moderation.</label>
<textarea style="color: white;" class="form-control" rows="3" name="eb_caps1" required></textarea>
</div>
<div class="form-group">
<label>If not given Chairperson/President or an equivalent post, would you be open to taking up
Vice-chairperson/Vice- president or an equivalent post?</label>
<select style="color: white;" name="alt_post" required class="form-control">
<option value="Yes">Yes</option>
<option value="No">No</option>
<option value="Maybe">Maybe</option>
</select>
</div>
<div class="form-group">
<label>Briefly outline your judging criteria (Kindly list any particular parameters you look at when
there are tied scores).</label>
<textarea style="color: white;" class="form-control" rows="3" name="eb_caps2" required></textarea>
</div>
<div class="form-group">
<label>Would you be willing to share your grading sheets with the Secretariat at the end of each
day?</label>
<select style="color: white;" class="form-control" name="eb_caps3" required>
<option value="Yes">Yes</option>
<option value="No">No</option>
<option value="Maybe">Maybe</option>
</select>
</div>
<div class="form-group">
<label>Would you be requiring accommodation?</label>
<select style="color: white;" class="form-control" name="hotel" required>
<option value="Yes">Yes</option>
<option value="No">No</option>
<option value="Maybe">Maybe</option>
</select>
</div>
<div class="form-group">
<label>Do you have any other queries for us at this time?</label>
<textarea style="color: white;" class="form-control" rows="3" name="q_back" required></textarea>
</div>
<div class="form-group">
<label>Upload your picture.</label>
<input type="file" id="myFile" style="color: white;" class="form-control" name="pro_pic" required>
</div><br>
<input type="submit" id="btt" class="btn btn-success col-lg-12" value="Submit" name="submit">
</form>
</div>
</div><!-- col-lg-12 -->
</div><!-- row -->
<div class="separator"></div><!-- separator -->
</div><!-- container -->
</div><!-- l-page-section -->
</section>
</div><!-- l-paralax-section -->
</section>
<section>
<div class="l-contactus-section l-section">
<div class="container">
<div id="contact" class="row">
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
<h6>Contact Us</h6>
<ul>
<li class="opacity">
<span style="display:block;">The Debate Society VIT UNIVERSITY , Chennai Campus, Vandalur-Kelambakkam Road, Chennai, Tamil Nadu 600127</span>
</li>
<li class="opacity"><img src="img/phone.png" alt="phone image" />+91 9176472987, +91 9962416408</li>
<li class="opacity"><img src="img/mail.png" alt="mail image"/> [email protected]</li>
<li class="opacity"><img src="img/magnifier.png" alt="magnifier image"/> facebook.com/vitcmun</li>
</ul>
</div><!-- col-lg-5 -->
<div class="col-lg-7 col-md-7 col-sm-7 col-xs-12 form-wrapper opacity">
<center><br>
<img style="height:100%; width:40%;" src="img/VITCMUN2017.png">
</center>
</div><!-- col-lg-7 -->
</div><!-- row -->
</div><!-- container -->
<div class="l-copyright text-center">
<div class="container">
<div class="m-social-icons">
<a href="https://www.facebook.com/groups/1495550694059659/?ref=br_tf"><i class="fa fa-facebook"></i></a>
<a href="#"><i class="fa fa-twitter"></i></a>
<a href="#"><i class="fa fa-instagram"></i></a>
</div><!--m-social-icons-->
</div><!-- container -->
</div><!-- l-copyright -->
</div><!-- l-contactus-section -->
</section>
</div><!-- l-content-wrap -->
</div><!-- l-wrapper -->
<!-- LOAD SCRIPTS -->
<!-- Latest compiled and minified JavaScript -->
<script src="inc/bootstrap/js/bootstrap.min.js"></script>
<!-- flexslider -->
<script src="inc/flexslider/jquery.flexslider.js"></script>
<!-- skrollr -->
<script type="text/javascript" src="inc/skrollr/dist/skrollr.min.js"></script>
<!-- easy pie chart -->
<script src="inc/easy-pie-chart/dist/jquery.easypiechart.min.js"></script>
<!-- isotope -->
<script src="inc/isotope/jquery.isotope.min.js" ></script>
<script src="inc/isotope/jquery.isotope.sloppy-masonry.js" ></script>
<!-- nice scroll -->
<script src="inc/nice-scroll/jquery.nicescroll.min.js" ></script>
<!-- Magnific Popup core JS file -->
<script src="inc/magnific/dist/jquery.magnific-popup.js"></script>
<!-- Waypoints -->
<script src="inc/waypoints/waypoints.min.js"></script>
<!-- YTP -->
<script type="text/javascript" src="inc/YTPlayer/inc/jquery.mb.YTPlayer.js"></script>
<!-- TWITTER SCRIPT -->
<script type="text/javascript" charset="utf-8" src="inc/tweet/twitter/jquery.tweet.js"></script>
<!-- contact form checker -->
<script src="inc/form-validator/dist/jquery.validate.js"></script>
<!-- script calling -->
<script src="inc/js/common.js"></script>
<script type="text/javascript">
$('#myFile').bind('change', function() {
//this.files[0].size gets the size of your file.
var sz = (this.files[0].size);
if (sz>300000) {
alert('File size too large, please upload an image of size less than or equal to 300 Kilobytes.');
document.getElementById("btt").disabled = true;
} else {
document.getElementById("btt").disabled = false;
}
});
</script>
</body>
</html>
<?php
if (isset ($conn)){
mysqli_close($conn);
}
?>