-
Notifications
You must be signed in to change notification settings - Fork 0
/
comp_req.php
429 lines (395 loc) · 12.7 KB
/
comp_req.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
<?php
session_start();
if(!isset($_SESSION['logged_in']) || $_SESSION['logged_in']!=1 || $_SESSION['role']!= 'AdminLogin')
header('location: login.php?err=2');
include 'connection.php';
if(isset($_POST["submit"]))
{
if(empty($_POST['slno']))
{
$slno='0000';
}
else {
$slno=$_POST['slno'];
}
if(empty($_POST['safety']))
{
$safety='nothing extra';
}
else {
$safety=$_POST['safety'];
}
if(empty($_POST['insurance']))
{
$insurance='nothing extra';
}
else {
$insurance=$_POST['insurance'];
}
if(empty($_POST['others']))
{
$others='nothing extra';
}
else {
$others=$_POST['others'];
}
if(empty($_POST['website']))
{
$website='nothing extra';
}
else {
$website =$_POST['website'];
}
if(empty($_POST['spoc']))
{
$spoc='nothing extra';
}
else {
$spoc =$_POST['spoc'];
}
if(empty($_POST['spoc_e']))
{
$spoc_e='nothing extra';
}
else {
$spoc_e =$_POST['spoc_e'];
}
if(empty($_POST['spoc_ph']))
{
$spoc_ph='nothing extra';
}
else {
$spoc_ph =$_POST['spoc_ph'];
}
if(empty($_POST['info_dtl']))
{
$info_dtl='nothing extra';
}
else{
$info_dtl =$_POST['info_dtl'];
}
if(empty($_POST['dtl_comm']))
{
$dtl_comm='0000/00/00';
}
else {
$dtl_comm =$_POST['dtl_comm'];
}
if(empty($_POST['by_per']))
{
$by_per='nothing extra';
}
else {
$by_per =$_POST['by_per'];
}
if(empty($_POST['dc']))
{
$dc='0000/00/00';
}
else {
$dc =$_POST['dc'];
}
$doc = $_POST['doc'];
$org = $_POST['org'];
$orgc = $_POST['orgc'];
$nsc = $_POST['nsc'];
$now = $_POST['now'];
$gender = $_POST['gender'];
$branch = $_POST['branch'];
$skill = $_POST['skill'];
$dress_code = $_POST['dress_code'];
$address = $_POST['address'];
$bd = $_POST['bd'];
$cgb = $_POST['cgb'];
$email_id = $_POST['email_id'];
$phno = $_POST['phno'];
$ovb = $_POST['ovb'];
$max_stu = $_POST['max_stu'];
$rol = $_POST['rol'];
$oob = $_POST['oob'];
$db = mysqli_connect('localhost', 'root', '123456', 'pp')or die('Error connecting to MySQL server.');
$query = "INSERT INTO consent_rec(slno,doc,org,orgc,nsc,now,gender,branch,skill,dress_code,safety,insurance,others,address,website,bd,cgb,email_id,phno,spoc,spoc_e,spoc_ph,ovb,max_stu,rol,oob,info_dtl,dtl_comm,by_per,dc) VALUES('$slno','$doc','$org','$orgc','$nsc','$now','$gender','$branch','$skill','$dress_code','$safety','$insurance','$others','$address','$website','$bd','$cgb','$email_id','$phno','$spoc','$spoc_e','$spoc_ph','$ovb','$max_stu','$rol','$oob','$info_dtl','$dtl_comm','$by_per','$dc')";
$resul = mysqli_query($db,$query)or die("error<br>".mysqli_error($dbc));
echo "<script>alert('Succesfully Saved');window.location.assign('admin_home.php');</script>";
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Company requirements</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<style media="screen">
h5{
margin-top: 30px;
margin-bottom: 30px;
}
h2{
}
img.logo{
width: 40%;
}
img.img-thumbnail{
width:40%;
}
nav{
background-color: #283955;
}
footer{
background-color: #283955;
}
</style>
</head>
<body>
<div class="container-fluid mb-2 mt-2">
<div class="row">
<div class="col-md-3">
<img class=" logo" src="assets/img/logo.png" alt="Presidency Logo">
</div>
<div class="col-md-6 text-center ">
<h3>Presidency University,Bengaluru</h3>
<h4>School of Engineering</h4>
<h4>Industrial Practice Division</h4>
</div>
</div>
</div>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<div class="container">
<a class="navbar-brand" href="">Presidency University</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<span class="navbar-text text-light">
</span>
<li class="nav-item ">
<a class="nav-link" href="admin_home.php">Home
<span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="comp_req.php">CR</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin_remove.php">Remove</a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout
</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row mt-3 mb-3">
<div class="col-md-10">
<h2 >Consent Record:</h2>
</div>
</div>
</div>
<div class="container">
<h5 class="font-weight-bold">Enter Following Details: <small>(<span class="text-danger"> *</span> means <mark>required</mark> feild )</small></h5>
<form method="post" action="conrec.php">
<div class="container">
<div class="row">
<div class="form-group">
<label>Sl.No.</label>
<input type="text" id="slno" class="form-control" name="slno">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Date of Consent: <span class="text-danger">*</span></label>
<input type="text" id="doc" class="form-control" name="doc" required>
</div>
<div class="container">
<div class="row">
<label>Organisation: <span class="text-danger">*</span></label>
<input type="text" id="org" class="form-control" name="org" required>
</div>
<div class="row">
<div class="container">
<div class="row">
<div class="form-group ">
<label>4 Digit Organisation Code: <span class="text-danger">*</span></label>
<input type="text" id="orgc" class="form-control" name="orgc" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>No. of Students Consented: <span class="text-danger">*</span></label>
<input type="number" id="nsc" class="form-control" name="nsc" required>
</div>
<div class="container">
<div class="form-group "><div class="row">
<label>Nature of Work: <span class="text-danger">*</span></label>
<input type="text" id="now" class="form-control" name="now" required>
</div>
<div class="row"> <div class="container">
<div class="row">
<div class="form-group ">
<label>Gender: <span class="text-danger">*</span></label>
<input type="radio" name="gender" required value="Male"/>Male
<input type="radio" name="gender" required value="Female"/>Female
<input type="radio" name="gender" required value="Male and Female"/>Both Male and Female
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Branch: <span class="text-danger">*</span></label>
<input type="text" id="branch" class="form-control" name="branch" placeholder="Ex: CSE">
</div>
<div class="container">
<div class="form-group">
<div class="row">
<label> Skill (Seperate Using comma(,)):</label><label> <span class="text-danger">*</span></label>
<input type="text" id="skill" class="form-control" name="skill" placeholder="Seperate Using comma(,)" required>
</div>
<div class="row">
<div class="container">
<div class="row">
<label>Specific Discipline & Dresscode: <span class="text-danger">*</span></label>
<input type="text" id="dress_code" class="form-control" name="dress_code" required>
</div>
<div class="row">
<label>Safety:</label>
<input type="text" id="safety" class="form-control" name="safety">
</div>
<div class="row">
<div class="form-group ">
<label>Insurance:</label>
<input type="text" id="insurance" class="form-control" name="insurance">
</div>
<div class="container">
<div class="row">
<label>Others:</label>
<input type="text" id="others" class="form-control" name="others">
</div>
<div class="row">
<div class="container">
<div class="row">
<div class="form-group ">
<label for="address">Address:<span class="text-danger">*</span></label>
<textarea class="form-control" rows="2" id="address" name="address" required></textarea>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Website:</label>
<input type="text" id="website" class="form-control" name="website">
</div>
<div class="container">
<div class="row">
<label>Brief Description:<span class="text-danger">*</span></label>
<input type="text" id="bd" class="form-control" name="bd" required>
</div>
<div class="row">
<div class="container">
<div class="row">
<div class="form-group ">
<label>Consent Given by:<span class="text-danger">*</span></label>
<input type="text" id="cgb" class="form-control" name="cgb" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Email-ID: <span class="text-danger">*</span></label>
<input type="email" id="email_id" class="form-control" name="email_id" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Ph.No.<span class="text-danger">*</span></label>
<input type="text" id="phno" class="form-control" name="phno" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Single Point of Contact (SPOC):</label>
<input type="text" id="spoc" class="form-control" name="spoc">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>SPOC Email ID:</label>
<input type="email" id="spoc_e" class="form-control" name="spoc_e">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>SPOC Ph.No.</label>
<input type="text" id="spoc_ph" class="form-control" name="spoc_ph">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Consent Obtained by/ Organisation Visited by:<span class="text-danger">*</span></label>
<input type="text" id="ovb" class="form-control" name="ovb" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>No. of students to be alotted(maximum of):<span class="text-danger">*</span></label>
<input type="number" id="max_stu" class="form-control" name="max_stu" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Remoteness of Location:<span class="text-danger">*</span></label>
<input type="text" id="rol" class="form-control" name="rol" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Other Observations:<span class="text-danger">*</span></label>
<input type="text" id="oob" class="form-control" name="oob" required>
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Information Details:</label>
<input type="text" id="info_dtl" class="form-control" name="info_dtl">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Date on which the details to be communicated:</label>
<input type="text" id="dtl_comm" class="form-control" name="dtl_comm">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>by (Person):</label>
<input type="text" id="by_per" class="form-control" name="by_per">
</div>
<div class="container">
<div class="row">
<div class="form-group ">
<label>Date communicated:</label>
<input type="text" id="dc" class="form-control" name="dc">
</div>
<div class="container">
<div class="row">
<div class="form-group">
<input type="submit" name="submit" value="Save Details">
</div>
</form>
</div>
<!-- Footer -->
<footer class="py-5 ">
<div class="container">
<p class="m-0 text-center text-white">Copyright © Presidency University 2018</p>
</div>
</footer>
</body>
</html>