-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpidataportal.php
138 lines (109 loc) · 3.98 KB
/
pidataportal.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
<?php
session_start();
include 'dbh.php';
$userId=mysqli_real_escape_string($conn,$_SESSION['id']);
$sqlx="SELECT profilePicLocation FROM faculty_table WHERE id='$userId'";
$resultx=mysqli_query($conn,$sqlx);
$rowx=mysqli_fetch_assoc($resultx);
$profilePicLocation=$rowx['profilePicLocation'];
$sqlp="SELECT hod, committee, department FROM faculty_table WHERE id='$userId'";
$resultp=mysqli_query($conn,$sqlp);
$rowp=mysqli_fetch_assoc($resultp);
$hod=$rowp['hod'];
$department=$rowp['department'];
if($hod==1)
{
include 'top.php';
include 'left-nav.php';
?>
<div class="container">
<div class="row">
<div class="col offset-md-2 parta">
<!-- place all code here -->
<div class="custombox">
<br>
<h2>P.I. Data Input Portal</h2>
<form method="POST" class="piportalform">
<p class="text-center h6">Choose a faculty in your department and fill their PI values</p>
<br>
<label class="text-left" for="facultyselect">Choose Faculty</label>
<select style="width:100%;padding:10px" id="facultyselect" name="facultyselect">
<?php
$sql="SELECT id, faculty_name FROM faculty_table WHERE department='$department' AND id!='$userId'";
$result=mysqli_query($conn, $sql);
while($row=mysqli_fetch_assoc($result))
{
$id=$row['id'];
$faculty_name=$row['faculty_name'];
?>
<option value="<?php echo $id; ?>"><?php echo $faculty_name; ?></option>
<?php
}
?>
</select>
<br>
<!--Section 1-->
<br>
<p style="font-size:20px"><b>2017-2018</b></p>
<hr style="border: 0.5px solid #f7497d; "><br>
<div>
<input type="number" name="parta18" id="parta18" min="0" max="50" required>
<label>Part A Total PI (maximum marks: 50)</label>
</div>
<p><b>Part B</b></p>
<hr style="border: 0.5px solid #f7497d;"><br>
<div>
<input type="number" name="partbi18" id="partbi18" min="0" max="100" required>
<label>Category I Total PI (maximum marks: 100)</label>
</div>
<div>
<input type="number" name="partbii18" id="partbii18" min="0" max="100" required>
<label>Category II Total PI (maximum marks: 100)</label>
</div>
<div>
<input type="number" name="partbiii18" id="partbiii18" min="0" max="175" required>
<label>Category III Total PI (maximum marks: 175)</label>
</div>
<div>
<input type="number" name="partbiv18" id="partbiv18" min="0" max="75" required>
<label>Category IV Total PI (maximum marks: 75)</label>
</div>
<hr style="border: 0.5px solid #ccc; "><br>
<!--Section 2-->
<p style="font-size:20px"><b>2016-2017</b></p>
<hr style="border: 0.5px solid #f7497d; "><br>
<div>
<input type="number" name="parta17" id="parta17" min="0" max="50" required>
<label>Part A Total PI (maximum marks: 50)</label>
</div>
<p><b>Part B</b></p>
<hr style="border: 0.5px solid #f7497d;"><br>
<div>
<input type="number" name="partbi17" id="partbi17" min="0" max="100" required>
<label>Category I Total PI (maximum marks: 100)</label>
</div>
<div>
<input type="number" name="partbii17" id="partbii17" min="0" max="100" required>
<label>Category II Total PI (maximum marks: 100)</label>
</div>
<div>
<input type="number" name="partbiii17" id="partbiii17" min="0" max="175" required>
<label>Category III Total PI (maximum marks: 175)</label>
</div>
<div>
<input type="number" name="partbiv17" id="partbiv17" min="0" max="75" required>
<label>Category IV Total PI (maximum marks: 75)</label>
</div>
<input type="submit" value="SAVE">
<p class="text-center my-2" id="message"></p>
</form>
</div>
</div>
</div>
</div>
<?php
}
else
{
header('LOCATION: index.php');
}