-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser_dash.php
148 lines (134 loc) · 5.53 KB
/
user_dash.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
<?php session_start();?>
<?php
if(!isset($_SESSION['emp_id'])){
header('location:index.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<!--link rel="stylesheet" href="https://bootswatch.com/3/flatly/bootstrap.min.css"-->
<!--icon-->
<link rel="icon" type="image/png" sizes="192x192" href="android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>EMS | Employee Management System</title>
<style>
#grad{
height: 100%;
background: #e6fff2; /* For browsers that do not support gradients */
background: linear-gradient(#e6fff2, #e6fff4); /* Standard syntax (must be last) */
}
</style>
</head>
<body id="grad">
<div class="container-fluid" id="">
<!--navbar-->
<nav class="navbar navbar-static-top navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://localhost/proj/user_dash.php">Employee Management System</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="http://localhost/proj/user_dash.php">Dashboard</a></li>
<li><a href="http://localhost/proj/view_profile.php">Profile</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Settings <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li class="divider"></li>
<!--li><a href="#">Change Password</a></li-->
<li><a href="#">Change Password</button></li>
<li class="divider"></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<marquee direction="" width="100%" scrolldelay="300" behavior="sliding" class="text-center"><strong>User Dashboard</strong></marquee>
<!--/navbar-->
<!--user dashboard view-->
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<h2>Employee Dashboard</h2>
<p class="text-muted"> Notices for Employee </p>
<div class="jumbotron">
<!-- _-->
<?php
$dept = $_SESSION['dept_id'];
require 'connection.php';
$sql="SELECT * FROM `notice` WHERE `dept_id`= ".$dept." ORDER BY `notice_id` DESC LIMIT 10 ";
//$sql="SELECT * FROM `notice` WHERE `dept_id`= ".$dept." ORDER BY `notice_id` DESC LIMIT 10 ";
$result=$db->query($sql);
// var_dump($sql);
//var_dump($result);
if($db->query($sql))
{
if($result->num_rows>0)
{
echo"<div class='row'>";
$col=$result->num_rows;
for($i=0;$i<$result->num_rows;$i++)
{
$row=$result->fetch_assoc();
echo "<div class='col-md-offset-1 col-md-10 col-xs-12 '>";
echo "<h3 class='text-center text-primary '>".ucfirst($row['title'])."</h3>";
echo "<hr>";
echo "<i class='text-muted'>Date:".$row['notice_date']."</i><br/>";
echo "<p class='text-muted'>".$row['body']."</p>";
// echo "<a href='view_notice.php?notice_id=".$row['notice_id']."' class='btn btn-default btn-block'>More...<a/>";
echo "</div>";
}
echo"</div class='row'>";
}
else
{
echo"<div><p class='text-center text-info'>Currently No Notice Avaiable In The System!!</p><div>";
}
}
$db->close();
?>
<!-- / -->
</div>
</div>
</div>
<div class="col-md-2"></div>
</div>
<!--/user dashboard view-->
<!--footer-->
<div class="container-fluid">
<div class="navbar nav navbar-fixed-bottom navbar-inverse" style="padding-bottom: 0px; max-height: fit-content;">
<div class="container">
<p class="text-center text-muted" style="">
Employee Management System | Powered By Bootstrap<br/>
© | 2018-19<br/>
Version 1.0.1
</p>
</div>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
</body>
</html>
<!--/footer-->