-
Notifications
You must be signed in to change notification settings - Fork 1
/
home.php
358 lines (324 loc) · 16.5 KB
/
home.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
<?php
include('includes/config.php');
if(isset($_POST['submit']))
{
// $file = $_FILES['image']['name'];
// $file_loc = $_FILES['image']['tmp_name'];
// $folder="images/";
// $new_file_name = strtolower($file);
// $final_file=str_replace(' ','-',$new_file_name);
$name=$_POST['name'];
$email=$_POST['email'];
$branch=$_POST['branch'];
$batch=$_POST['batch'];
$mobileno=$_POST['mobileno'];
$prefa=$_POST['pref1'];
$prefb=$_POST['pref2'];
$prefc=$_POST['pref3'];
$prefd=$_POST['pref4'];
$why=$_POST['why'];
$text=$_POST['text'];
if(strlen((string)$mobileno)!=10){
echo "<script type='text/javascript'>alert('Wrong Number, Retry');</script>";
echo "<script type='text/javascript'> document.location = 'index.php'; </script>";
}
else{
// echo("$name,$email,$branch,$batch,$mobileno,$prefa,$prefb,$prefc,$prefd,$why,$text");
// if(move_uploaded_file($file_loc,$folder.$final_file))
// {
// $image=$final_file;
// }
// $notitype='Create Account';
// // $reciver='Admin';
// $sender=$email;
$sql ="INSERT INTO `users`(`name`, `email`, `branch`, `batch`, `mobile`, `prefa`, `prefb`, `prefc`, `prefd`, `why`, `text`, `status`) VALUES (:name, :email, :branch, :batch, :mobileno, :prefa, :prefb, :prefc, :prefd, :why, :text, 0)";
$query= $dbh -> prepare($sql);
$query-> bindParam(':name', $name, PDO::PARAM_STR);
$query-> bindParam(':email', $email, PDO::PARAM_STR);
$query-> bindParam(':branch', $branch, PDO::PARAM_STR);
$query-> bindParam(':batch', $batch, PDO::PARAM_STR);
$query-> bindParam(':mobileno', $mobileno, PDO::PARAM_STR);
$query-> bindParam(':prefa', $prefa, PDO::PARAM_STR);
$query-> bindParam(':prefb', $prefb, PDO::PARAM_STR);
$query-> bindParam(':prefc', $prefc, PDO::PARAM_STR);
$query-> bindParam(':prefd', $prefd, PDO::PARAM_STR);
$query-> bindParam(':why', $why, PDO::PARAM_STR);
$query-> bindParam(':text', $text, PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$hello="Hello";
$subject = "ISTE Welcomes You";
$msg = "Thank you for being an applicant of Junior Execom recruitment of ISTE students' chapter TKMCE.
We hope you and your family are doing well amidst these challenging times.
You have applied for the positions of ($prefa,$prefb,$prefc,$prefd) as your 1st ,2nd ,3rd and 4th preferences respectively.We want to let you know that we are in the process of reviewing your application. We are quite touched with your passion and hunger to lead,learn and grow. You can ask all the doubts and other questions regarding this. We will be happy to help you.
<br>Please join the WhatsApp through the link :https://chat.whatsapp.com/F0CZ3PKMHGaCt1erwzuSkh<br>
We will let you know about the interview and other details regarding the selection process via this WhatsApp group.
We look forward to see you soon.<br>Sincerely <br>
Bhagyasree.V.S<br>
Chairperson <br>
ISTE Students chapter TKMCE";
// Content-Type helps email client to parse file as HTML
// therefore retaining styles
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$message = "<html>
<head>
<title>Thankyou</title>
</head>
<body>
<p>".$hello." ".$name."</p>
<p></p>
<br>
<h1>" . $subject . "</h1>
<p>.$msg.</p>
</body>
</html>";
if (mail($email, $subject, $message, $headers)) {
// echo "<script type='text/javascript'>alert('Email Sent');</script>";
}else{
echo("$name,$email,$subject,$message,$headers");
echo "<script type='text/javascript'>alert(".$email." ".$subject." ".$message." ".$headers.");</script>";
}
echo "<script type='text/javascript'>alert('Registration Sucessfull!');</script>";
echo "<script type='text/javascript'> document.location = 'index.php'; </script>";
}
else
{
$error="Something went wrong. Please try again";
}
}
}
?>
<!doctype html>
<html lang="en" class="no-js">
<head>
<title>Registration | ISTE JUNIOR EXECOM</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="css/trial.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/styles.css">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,500;1,600;1,700&display=swap" rel="stylesheet">
<script type="text/javascript">
// function validate()
// {
// var extensions = new Array("jpg","jpeg");
// var image_file = document.regform.image.value;
// var image_length = document.regform.image.value.length;
// var pos = image_file.lastIndexOf('.') + 1;
// var ext = image_file.substring(pos, image_length);
// var final_ext = ext.toLowerCase();
// for (i = 0; i < extensions.length; i++)
// {
// if(extensions[i] == final_ext)
// {
// return true;
// }
// }
// alert("Image Extension Not Valid (Use Jpg,jpeg)");
// return false;
// }
// </script>
</head>
<body style="font-family: 'Montserrat', sans-serif;">
<header>
<?php include('includes/header.php');?>
</header>
<br><br><br>
<div class="login-page bk-img">
<div class="form-content">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="text-center text-bold mt-2x">Register</h1>
<h4 class="text-center mt-2x">Personal Details</h4>
<div class="hr-dashed"></div>
<div class="well row pt-1x pb-2x bk-light text-center">
<form method="post" class="form-horizontal" enctype="multipart/form-data" name="regform" onSubmit="return validate();">
<div class="form-group">
<label class="col-sm-1 control-label">Name<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<input type="text" name="name" class="form-control input" required>
</div>
<label class="col-sm-1 control-label">Email<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<input type="text" name="email" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">Branch<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<input type="text" name="branch" class="form-control input" placeholder="Eg: Mechanical" required>
</div>
<label class="col-sm-1 control-label">Batch<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<input type="text" name="batch" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">Phone<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<input type="number" name="mobileno" class="form-control" required>
</div>
</div>
<h4 class="text-center mt-2x">Recruitment Details</h4><br>
<div class="form-group">
<label class="col-sm-1 control-label"> 1<sup>st</sup> Pref<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<select name="pref1" class="form-control" required>
<option value="">Select</option>
<option value="Documentation">Documentation</option>
<option value="Co Designer">Co Designer</option>
<option value="Public">Public Relations</option>
<option value="Student">Student Rep</option>
<option value="Programme Coordinator">Programme Coordinator</option>
<option value="Registration">Registration</option>
<option value="Finance Manager">Finance Manager</option>
<option value="Technical">Technical Support</option>
<option value="Web">Web Team</option>
</select>
</div>
<label class="col-sm-1 control-label"> 2<sup>nd</sup> Pref<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<select name="pref2" class="form-control" required>
<option value="">Select</option>
<option value="Documentation">Documentation</option>
<option value="Co Designer">Co Designer</option>
<option value="Public">Public Relations</option>
<option value="Student">Student Rep</option>
<option value="Programme Coordinator">Programme Coordinator</option>
<option value="Registration">Registration</option>
<option value="Finance Manager">Finance Manager</option>
<option value="Technical">Technical Support</option>
<option value="Web">Web Team</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-1 control-label"> 3<sup>rd</sup> Pref<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<select name="pref3" class="form-control" required>
<option value="">Select</option>
<option value="Documentation">Documentation</option>
<option value="Co Designer">Co Designer</option>
<option value="Public">Public Relations</option>
<option value="Student">Student Rep</option>
<option value="Programme Coordinator">Programme Coordinator</option>
<option value="Registration">Registration</option>
<option value="Finance Manager">Finance Manager</option>
<option value="Technical">Technical Support</option>
<option value="Web">Web Team</option>
</select>
</div>
<label class="col-sm-1 control-label"> 4<sup>th</sup> Pref<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<select name="pref4" class="form-control" required>
<option value="">Select</option>
<option value="Documentation">Documentation</option>
<option value="Co Designer">Co Designer</option>
<option value="Public">Public Relations</option>
<option value="Student">Student Rep</option>
<option value="Programme Coordinator">Programme Coordinator</option>
<option value="Registration">Registration</option>
<option value="Finance Manager">Finance Manager</option>
<option value="Technical">Technical Support</option>
<option value="Web">Web Team</option>
</select>
</div>
</div>
<div class="form-group">
<br>
<label class="col-sm-4 col-lg-12 alignment" >Why ISTE?<span style="color:red">*</span><br></label>
<br>
<div class="col-sm-5 col-lg-12">
<textarea class="form-control" rows = "5" name = "why"></textarea><br>
</div>
<br><br>
<label class="col-sm-4 col-lg-12 alignment">Tell us why you will be favorable for this position<span style="color:red">*</span><br></label>
<br>
<div class="col-sm-5 col-lg-12">
<textarea class="form-control" rows = "5" name = "text"></textarea><br>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-1 control-label"> Gender<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<select name="gender" class="form-control" required>
<option value="">Select</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
<div class="form-group">
<label class="col-sm-1 control-label">Avtar<span style="color:red">*</span><br></label>
<div class="col-sm-5">
<div><input type="file" name="image" class="form-control"></div>
</div>
</div>-->
<br>
<button class="btn btn-primary" name="submit" type="submit">Register</button>
</form>
<br>
<br>
<!-- <p>Login as a Admin <a href="admin/index.php" >Admin</a></p> -->
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="footer" id="footer">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
<br><br><br>
<img src="./images/logo1.png">
</div>
<div class="col-lg-4 col-sm-4 col-xs-4">
<h3> Contact </h3>
<ul>
<br/>
<li>
<p>Fardeen Khan K 7356334434</p>
</li>
<li>
<p>Sreelekshmi N S 8547282695</p>
</li>
</ul>
</div>
<!--/.row-->
</div>
<!--/.container-->
</div>
<!--/.footer-->
<div class="footer-bottom">
<div class="container">
<center><p class=" copyright text-center" style="text-align:center;"> © Designed and Developed by 404 ISTE </p></center>
</div>
</div>
<!--/.footer-bottom-->
</footer>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>