-
Notifications
You must be signed in to change notification settings - Fork 0
/
employee_contract.php
105 lines (66 loc) · 3.06 KB
/
employee_contract.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
<?php require_once("top.php"); ?>
<?php require_once("connection.php"); restrict(1,1,9,9); ?>
<?php
$contract = mysqli_query($con, "SELECT * , ROUND(DATEDIFF(end_date, start_date) / 30, 0) AS duration FROM contract WHERE employee_id=" . getValue($_GET["employee_id"]) . " ORDER BY employee_id DESC ");
$row_contract = mysqli_fetch_assoc($contract);
?>
<div class="card card-header">
<!-- headin -->
<div class="card card-header">
<nav class="navbar navbar-light bg-light">
<a class="navbar-brand" href="#">
Employee Contract
</a>
</nav>
</div>
<!-- body -->
<div class="card card-body ">
<table class="table table-dark table-striped table-hover">
<thead class="bg-danger">
<tr>
<th>Contract ID</th>
<th width="100">Start Date</th>
<th width="100">End Date</th>
<th>Duration</th>
<th>Position</th>
<th>Gross Salary</th>
<th>Edit</th>
<th>delete</th>
</tr>
</thead>
<tbody>
<?php if($row_contract > 0) { ?>
<?php do { ?>
<tr>
<td><?php echo $row_contract["contract_id"]; ?></td>
<td><?php echo $row_contract["start_date"]; ?></td>
<td><?php echo $row_contract["end_date"]; ?></td>
<td><?php echo $row_contract["duration"]; ?> <small> months </small></td>
<td><?php echo $row_contract["position"]; ?></td>
<td><?php echo $row_contract["gross_salary"]; ?></td>
<td>
<a href="contract_edit.php?contract_id=<?php echo $row_contract["contract_id"]; ?>">
<span class="glyphicon glyphicon-edit"></span>
</a>
</td>
<td>
<a href="contract_delete.php?contract_id=<?php echo $row_contract["contract_id"]; ?>" >
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<?php } while ($row_contract = mysqli_fetch_assoc($contract)); ?>
<?php } else { ?>
<h1 class="text-center text-warning">تاسو د دی سره قرارداد نه لرئ </h1>
<?php } ?>
</tbody>
</table>
<!-- back button -->
<div class="" >
<a href="employee_list.php" class="alert-link float-right">
<span class="glyphicon glyphicon-arrow-left " style="color:red">
</span> Back </a>
</div>
</div>
</div>
<?php require_once("footer.php"); ?>