-
Notifications
You must be signed in to change notification settings - Fork 1
/
employee_add.php
293 lines (261 loc) · 12.1 KB
/
employee_add.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
<?php
require_once("inc/dbcontroller.php");
$db_handle = new DBController();
$sql1 = "SELECT * FROM employee ";
$faq = $db_handle->runQuery($sql1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Dashboard">
<meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
<title>MNGT</title>
<!-- Favicons -->
<link href="img/favicon.png" rel="icon">
<link href="img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Bootstrap core CSS -->
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!--external css-->
<link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap-datepicker/css/datepicker.css" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap-daterangepicker/daterangepicker.css" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap-timepicker/compiled/timepicker.css" />
<link rel="stylesheet" type="text/css" href="lib/bootstrap-datetimepicker/datertimepicker.css" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link href="css/style-responsive.css" rel="stylesheet">
</head>
<body>
<section id="container">
<!-- **********************************************************************************************************************************************************
TOP BAR CONTENT & NOTIFICATIONS
*********************************************************************************************************************************************************** -->
<!--header start-->
<header class="header black-bg">
<div class="sidebar-toggle-box">
<div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
</div>
<!--logo start-->
<a href="index.html" class="logo"><b>MN<span>GT</span></b></a>
<!--logo end-->
<div class="nav notify-row" id="top_menu">
<!-- notification start -->
<ul class="nav top-menu">
</ul>
<!-- notification end -->
</div>
<div class="top-menu">
<ul class="nav pull-right top-menu">
<li><a class="logout" href="login.html">Logout</a></li>
</ul>
</div>
</header>
<!--header end-->
<!--sidebar start-->
<aside>
<div id="sidebar" class="nav-collapse ">
<!-- sidebar menu start-->
<ul class="sidebar-menu" id="nav-accordion">
<li class="mt">
<a href="index.html">
<i class="fa fa-dashboard"></i>
<span>Dashboard</span>
</a>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-user"></i>
<span>Employee</span>
</a>
<ul class="sub">
<li><a class="active" href="employee_add.php">Add</a></li>
<li><a href="employee.php">List</a></li>
</ul>
</li>
<li class="sub-menu">
<a href="javascript:;">
<i class="fa fa-clock-o"></i>
<span>Leave</span>
</a>
<ul class="sub">
<li><a href="leave.php">Apply</a></li>
<li><a href="">View</a></li>
</ul>
</li>
</ul>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
<!-- **********************************************************************************************************************************************************
MAIN CONTENT
*********************************************************************************************************************************************************** -->
<!--main content start-->
<section id="main-content">
<section class="wrapper site-min-height">
<!-- page start-->
<div class="chat-room mt">
<aside class="mid-side">
<div class="chat-room-head">
<h3>Add Employee</h3>
</div>
<div class="room-desk">
<h4 class="pull-left">ADD Employee</h4>
<br><br><br>
<div class="room-box">
<form action="gears/insert_employee.php" class="form-horizontal style-form" method="post">
<div class="form-group">
<label class="control-label col-md-3">First Name</label>
<div class="col-sm-6">
<input type="text" placeholder="Enter first name" name="f_name" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Last Name</label>
<div class="col-sm-6">
<input type="text" placeholder="Enter Last name" name="l_name" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Age</label>
<div class="col-sm-6">
<input type="number" placeholder="Enter Age" name="age" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">State</label>
<div class="col-sm-6">
<input type="text" placeholder="Enter State of residential" name="state" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Address</label>
<div class="col-sm-6">
<textarea type="text" row="3" placeholder="full address" name="address" class="form-control" required></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Education(highest degree and Instituition name)</label>
<div class="col-sm-6">
<textarea type="text" row="3" placeholder="Degree and Instituition" name="education" class="form-control" required></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Email ID</label>
<div class="col-sm-6">
<input type="text" placeholder="EmailID" name="email" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Phone no.</label>
<div class="col-sm-6">
<input type="text" placeholder="Enter phone number" name="phone" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Role</label>
<div class="col-sm-6">
<input type="text" placeholder="Enter Role" name="role" class="form-control" required>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3">Team</label>
<div class="col-sm-6">
<input type="text" placeholder="Enter Team alloted" name="team" class="form-control" required>
</div>
</div>
<?php
$mysqli = new mysqli("localhost", "", "", "");
$query111 = "SELECT * FROM employee ORDER BY ID DESC LIMIT 1";
if ($result = $mysqli->query($query111)) {
while ($row = $result->fetch_assoc()) {
$field88name = $row["emp_id"];
}
$result->free();
}?>
<input type="text" placeholder="status" id="status" name="emp_id" value="<?php echo $field88name ?>" required hidden>
<input type="text" placeholder="status" id="status" name="status" value="Active" required hidden>
<input type="text" id="timestamp" name="timestamp" value="<?php date_default_timezone_set("Asia/Calcutta"); echo date("Y/m/d") . " " . date("h:i:sa"); ?>" required readonly hidden>
<button type="submit" name="upload" value="Upload" class="btn btn-primary"><span class="fa fa-check"></span>  Submit</button></center>
</form>
</div>
</div>
</aside>
<aside class="right-side">
<div class="user-head">
<h4 class="pull-left">Total Employee:
<?php
$mysqli = new mysqli("localhost", "", "", "");
$query = "SELECT count(*) AS count FROM employee";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_assoc()) {
$field1name = $row["count"];
}
$result->free();
} echo $field1name;?></h4>
</div>
<div class="invite-row">
<h4 class="pull-left">Employee Names:
</h4></div>
<ul class="chat-available-user">
<?php
if (is_array($faq) || is_object($faq))
{
foreach($faq as $k=>$v) {
?>
<li>
<a href="chat_room.html">
<?php echo $faq[$k]["f_name"]; ?> <?php echo $faq[$k]["l_name"]; ?> 
<span class="text-muted"><?php if($faq[$k]["status"]=="In-Active") { ?> <span class="label label-info label-mini"><?php echo $faq[$k]["status"];}?></span>
<?php if($faq[$k]["status"]=="Active"){ ?><span class="label label-success label-mini"><?php echo $faq[$k]["status"];}?></span>
<?php if($faq[$k]["status"]=="Purged"){ ?><span class="label label-danger label-mini"><?php echo $faq[$k]["status"];}?></span>
</span>
</a>
</li>
<?php
}} ?>
</ul>
</aside>
</div>
<!-- page end-->
</section>
<!-- /wrapper -->
</section>
<!-- /MAIN CONTENT -->
<!--main content end-->
<!--footer start-->
<footer class="site-footer">
<div class="text-center">
<p>
© Copyrights <strong>MNGT</strong>. All Rights Reserved
</p>
<div class="credits">
</div>
<a href="lobby.html#" class="go-top">
<i class="fa fa-angle-up"></i>
</a>
</div>
</footer>
<!--footer end-->
</section>
<!-- js placed at the end of the document so the pages load faster -->
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
<script class="include" type="text/javascript" src="lib/jquery.dcjqaccordion.2.7.js"></script>
<script src="lib/jquery.scrollTo.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="lib/bootstrap-daterangepicker/date.js"></script>
<script type="text/javascript" src="lib/bootstrap-daterangepicker/daterangepicker.js"></script>
<script type="text/javascript" src="lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="lib/bootstrap-daterangepicker/moment.min.js"></script>
<script type="text/javascript" src="lib/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
<script src="lib/advanced-form-components.js"></script>
<script src="lib/jquery.nicescroll.js" type="text/javascript"></script>
<!--common script for all pages-->
<script src="lib/common-scripts.js"></script>
<!--script for this page-->
</body>
</html>