-
Notifications
You must be signed in to change notification settings - Fork 2
/
projectlist.php
568 lines (429 loc) · 25.7 KB
/
projectlist.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
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
<?php
require 'includes/dbConnect.php';
$query="SELECT * FROM `project`";
$run=mysqli_query($conn,$query);
$query1="SELECT * FROM `task`";
$run1=mysqli_query($conn,$query1);
$query2="SELECT * FROM `subtask`";
$run2=mysqli_query($conn,$query2);
if(isset($_POST['replace'])){
$Proid=$_POST['pid'];
$Taskid=$_POST['tid'];
$Subid=$_POST['subid'];
$Newemp=$_POST['empid2'];
$replacequery="UPDATE `subtask` SET `empid`='$Newemp' WHERE `projectid`='$Proid' AND
`taskid`='$Taskid' AND `subtaskid`='$Subid'";
$resultup=mysqli_query($conn,$replacequery);
}
if(isset($_POST['delete'])){
$Proid=$_POST['ppid'];
$deletequerypro=" DELETE FROM `project` WHERE `projectid`='$Proid'";
$deletequerytask=" DELETE FROM `task` WHERE `projectid`='$Proid'";
$deletequerysub=" DELETE FROM `subtask` WHERE `projectid`='$Proid'";
$resultup1=mysqli_query($conn,$deletequerypro);
$resultup2=mysqli_query($conn,$deletequerytask);
$resultup3=mysqli_query($conn,$deletequerysub);
}
/*
if(isset($_GET['insert'])){
$Proid1=$_GET['dpid'];
$Taskid1=$_GET['dtid'];
$Tdeadline1=$_GET['deadline1'];
$Tdeadlinecomp1=$_GET['deadlinecomp1'];
$Tdeadline2=$_GET['deadline2'];
$Tdeadlinecomp2=$_GET['deadlinecomp2'];
$insertquery="INSERT INTO `task`(`deadline1`,`deadlinecomp1`,`deadline2`,`deadlinecomp2`)
VALUES ('$Tdeadline1','$Tdeadlinecomp1','$Tdeadline2','$Tdeadlinecomp2') WHERE `projectid`='$Proid1' AND
`taskid`='$Taskid1'";
$resultup1=mysqli_query($conn,$insertquery);
}
*/
?>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="assets/img/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>Employee</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
<!-- Bootstrap core CSS
<link href="assets/css/bootstrap.min.css" rel="stylesheet" /> -->
<!-- Animation library for notifications -->
<link href="assets/css/animate.min.css" rel="stylesheet" />
<!-- Light Bootstrap Table core CSS -->
<link href="assets/css/light-bootstrap-dashboard.css?v=1.4.0" rel="stylesheet" />
<!-- CSS for Demo Purpose, don't include it in your project -->
<link href="cs/employee.css" rel="stylesheet" />
<!-- Fonts and icons -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
<link href="assets/css/pe-icon-7-stroke.css" rel="stylesheet" />
<!--New Bootstrap Net v4
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" > -->
<!--Net Libraries -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment.min.js"></script>
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.43/css/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" type="text/css"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.43/css/bootstrap-datetimepicker-standalone.css">
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.43/js/bootstrap-datetimepicker.min.js"></script>
<!--PHP-->
</head>
<body>
<!--Sidebar Dashboard start-->
<div class="wrapper">
<div class="sidebar" data-color="red" data-image="assets/img/sidebar-5.jpg">
<div class="sidebar-wrapper">
<div class="logo">
<a href="#" class="simple-text">
Enterprise Project Analysis
</a>
</div>
<ul class="nav">
<li>
<a href="dashboard.php">
<i class="pe-7s-graph"></i>
<p>Dashboard</p>
</a>
</li>
<li >
<a href="employee.php">
<i class="pe-7s-users"></i>
<p>Employee</p>
</a>
</li>
<li>
<a href="projects.html">
<i class="pe-7s-note2"></i>
<p>Projects</p>
</a>
</li>
<li class="active">
<a href="projectlist.php">
<i class="pe-7s-news-paper"></i>
<p>Project Manage</p>
</a>
</li>
</ul>
</div>
</div>
<!--Sidebar Dashboard end-->
<div class="main-panel">
<!--Header navbar starts-->
<nav class="navbar navbar-default navbar-fixed">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target="#navigation-example-2">
<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="dashboard.php">Dashboard</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="logout.php">
<p>Log out</p>
</a>
</li>
<li class="separator hidden-lg"></li>
</ul>
</div>
</div>
</nav>
<!--Header navbar ends-->
<!--Body content starts-->
<div class="content">
<div class="container-fluid">
<!--Project Table Starts-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Replace Employee For Project</h4>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<form method="POST" action="projectlist.php">
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<label>Project Id</label>
<input type="text" class="form-control" name='pid'>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label>Task Id</label>
<input type="text" class="form-control" name='tid'>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label>Subtask Id</label>
<input type="text" class="form-control" name='subid'>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label>New Emp Id</label>
<input type="text" class="form-control" name='empid2'>
</div>
</div>
</div>
<input class="btn btn-danger" name="replace" type="submit" value="Update">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Drop Project Starts-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Delete Project</h4>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<form method="POST" action="projectlist.php">
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<label>Project Id</label>
<input type="text" class="form-control" name='ppid'>
</div>
</div>
<div>
<div class="row">
<div class="col-sm-2">
<br>
<input class="btn btn-danger" name="delete" type="submit" value="Delete">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!--
Deadline Insert Table Starts
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Insert Deadline for Project</h4>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<form method="GET" action="projectlist.php">
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<label>Project Id</label>
<input type="text" class="form-control" name='dpid'>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label>Task Id</label>
<input type="text" class="form-control" name='dtid'>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<label>Expected Deadline 1</label>
<input type="text" class="form-control" name='deadline1'>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Expected DeadlineCompletion 1</label>
<input type="text" class="form-control" name='deadlinecomp1'>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label>Expected Deadline 2</label>
<input type="text" class="form-control" name='deadline2'>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label>Expected DeadlineCompletion 2</label>
<input type="text" class="form-control" name='deadlinecomp2'>
</div>
</div>
</div>
<input class="btn btn-danger" name="insert" type="submit" value="Insert">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
Deadline Insert Table Ends-->
<!--Project Table Starts-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Project list</h4>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<table class="table">
<thead class="thead-light">
<tr>
<th scope="col">Project ID</th>
<th scope="col">Project Name</th>
<th scope="col">Project Desc</th>
<th scope="col">Project Leader</th>
<th scope="col">Project Completion</th>
<th scope="col">Project Start Date</th>
<th scope="col">Project End Date</th>
</tr>
<?php
while($row1=mysqli_fetch_array($run))
{
echo ' <tr>
<td>'.$row1['projectid'].'</td>
<td>'.$row1['projectname'].'</td>
<td>'.$row1['projectdesc'].'</td>
<td>'.$row1['projectleader'].'</td>
<td>'.$row1['projectcompletionaverage'].'</td>
<td>'.$row1['startdate'].'</td>
<td>'.$row1['enddate'].'</td>
</tr>';
}
?>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Task Table Starts-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title">Task list</h4>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<table class="table">
<thead class="thead-light">
<tr>
<th scope="col">Project ID</th>
<th scope="col">Task ID</th>
<th scope="col">Task Name</th>
<th scope="col">Task Completion</th>
<th scope="col">Task Start Date</th>
<th scope="col">Task End Date</th>
</tr>
<?php
while($row2=mysqli_fetch_array($run1))
{
echo ' <tr>
<td>'.$row2['projectid'].'</td>
<td>'.$row2['taskid'].'</td>
<td>'.$row2['taskname'].'</td>
<td>'.$row2['taskcompletionaverage'].'</td>
<td>'.$row2['startdate'].'</td>
<td>'.$row2['enddate'].'</td>
</tr>';
}
?>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Sub Task Table Starts-->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<h4 class="title"> Sub Task list</h4>
</div>
<div class="content">
<div class="row">
<div class="col-sm-12">
<table class="table">
<thead class="thead-light">
<tr>
<th scope="col">Project ID</th>
<th scope="col">Task ID</th>
<th scope="col">Sub task ID</th>
<th scope="col">Sub-Task Name</th>
<th scope="col">Employee ID</th>
<th scope="col">Subtask Completion</th>
</tr>
<?php
while($row3=mysqli_fetch_array($run2))
{
echo ' <tr>
<td>'.$row3['projectid'].'</td>
<td>'.$row3['taskid'].'</td>
<td>'.$row3['subtaskid'].'</td>
<td>'.$row3['subtaskname'].'</td>
<td>'.$row3['empid'].'</td>
<td>'.$row3['subtaskcompletionaverage'].'</td>
</tr>';
}
?>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Body content ends-->
</div>
</div>
</body>
<!-- Core JS Files
<script src="assets/js/jquery.3.2.1.min.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.min.js" type="text/javascript"></script> -->
<!-- Charts Plugin -->
<script src="assets/js/chartist.min.js"></script>
<!-- Notifications Plugin -->
<script src="assets/js/bootstrap-notify.js"></script>
<!-- Google Maps Plugin -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
<!-- Light Bootstrap Table Core javascript and methods for Demo purpose -->
<script src="assets/js/light-bootstrap-dashboard.js?v=1.4.0"></script>
<!-- Light Bootstrap Table DEMO methods, don't include it in your project! -->
<script src="js/employee.js"></script>
</html>