-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHOD_View.php
173 lines (144 loc) · 5.66 KB
/
HOD_View.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
<?php
require "Connection.php";
?>
<?php
session_start();
if(!($_SESSION['department_id']))
{
echo '<script type="text/javascript"> alert("Please login to continue.") </script>';
echo '<script type="text/javascript"> location.href="./HOD_Login.php" </script>';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>FRIENDZY | HOD View</title>
<link rel="stylesheet" type="text/css" href="./css/homestyle.css">
<style type="text/css">
.view-form { height: 500px; width: 550px; background-color: rgba(0,0,0,0.8);
margin-left: 425px; margin-top: 5px; overflow: auto; position: fixed;}
.view-form::-webkit-scrollbar { width: 8px; }
.view-form::-webkit-scrollbar-thumb { background-color: rgba(255,0,0,0.7); outline: 0;
border-radius: 50px;
box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.profile-pic { background-color: rgba(0,0,0,0.8); margin-left: 200px; margin-top: 0px; height: 130px; width: 130px; border-radius: 100px; border-color: rgba(255,0,0,1.0); border-width: 5px;
text-decoration: none;
overflow: hidden;
background-repeat: no-repeat; background-size: cover; position:relative; }
#lbl { color: white; font-family: Bookman Old Style; font-size: 22px; margin-top: 0px; padding-top: 10px;}
.view-details { padding-top: 10%; padding-left: 10%; padding-bottom:0%; }
.textbox { border-radius:5px; background-color:rgba(0,0,0,0.85); height:25px; color: white;
font-family: Bookman Old Style;
font-size: 16px; width: 180px; border-color:rgba(0,0,0,0.85); transition: .3s;}
#label { text-align:left; font-weight:none; color: white; font-family: Bookman Old Style;
padding: 15px; font-size: 18px;}
.btn { border-radius:5px; width:200px; margin-top:0px; margin-left:27%; padding:5px;
font-weight:bold; border-width:2px; color: white; cursor: pointer; font-size: 17px;
font-family: Bookman Old Text; border-color: rgba(255,0,0,1.0); text-decoration: none;
background-color: rgba(0,0,0,0.6); transition: .5s; }
.btn:hover { background-color: rgba(255,0,0,1.0); transition: .3s ease;}
</style>
</head>
<body>
<header>
<nav>
<h1>FRIENDZY</h1>
<ul id="list">
<li> <a class="colblack" href="./webhome.php">Home</a> </li>
<li> <a class="colblack" href="./Student_Login.php">Student Corner</a> </li>
<li> <a class="colblack" href="./Faculty_Login.php">Faculty Corner</a> </li>
<li> <a class="colred" href="#">HOD Corner</a> </li>
<li> <a class="colblack" href="./Admin_Login.php">Admin Corner</a> </li>
</ul>
</nav>
</header>
<?php
$id=$_SESSION['department_id'];
$query="select * from hod_details where d_id='$id'";
$result=mysqli_query($con,$query);
if($result)
{
$row_count=mysqli_num_rows($result);
if($row_count==1)
{
$row=mysqli_fetch_assoc($result);
$f_name=$row['f_name'];
$m_name=$row['m_name'];
$l_name=$row['l_name'];
$email=$row['email'];
$phone=$row['phone'];
$gender=$row['gender'];
$img=$row['profile_pic'];
}
}
$query="select d_name from department_details where d_id='$id'";
$result=mysqli_query($con,$query);
if($result)
{
$row_count=mysqli_num_rows($result);
if($row_count==1)
{
$row=mysqli_fetch_assoc($result);
$department=$row['d_name'];
}
}
mysqli_close($con);
?>
<div class="divider"></div>
<div class="backimg">
<div class="view-form" >
<p id="lbl" align="center">View HOD Profile</p>
<div class="profile-pic" >
<img src=<?php echo $img;?> height="132" width="132">
</div>
<form name="" action="" method="post">
<table class="view-details">
<tr>
<td id="label">First Name:</td>
<td id="label"><?php echo $f_name;?></td>
</tr>
<tr>
<td id="label">Middle Name:</td>
<td id="label"><?php echo $m_name;?></td>
</tr>
<tr>
<td id="label">Last Name:</td>
<td id="label"><?php echo $l_name;?></td>
</tr>
<tr>
<td id="label">Department ID:</td>
<td id="label"><?php echo $id;?></td>
</tr>
<tr>
<td id="label">Email:</td>
<td id="label"><?php echo $email;?></td>
</tr>
<tr><td id="label">Phone No (+91):</td>
<td id="label"><?php echo $phone;?></td>
</tr>
<tr>
<td id="label">Gender:</td>
<td id="label"><?php echo $gender;?></td>
</tr>
<tr>
<td id="label">Department:</td>
<td id="label"><?php echo $department;?></td>
</tr>
</table>
</form>
<p >
<form action="./HOD_Edit.php" method="post" onsumit="">
<input class="btn" type="submit" value="Edit Details">
</form>
</p>
<p >
<form action="./HOD_Home.php" method="post" onsumit="">
<input class="btn" type="submit" value="Back to Profile">
</form>
</p>
</div>
</div>
<div class="divider"></div>
<footer></footer>
</body>
</html>