-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathleaveday.php
79 lines (71 loc) · 3.33 KB
/
leaveday.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
<?php include('header.php');?>
<?php
include_once('controller/connect.php');
$dbs = new database();
$db=$dbs->connection();
$sql = mysqli_query($db,"select * from leavedays");
$rom = mysqli_fetch_assoc($sql);
$dayid = $rom['LeaveDayId'];
if(isset($_POST['submit']))
{
$day = $_POST['leaveday'];
mysqli_query($db,"update leavedays set LeaveDay='$day' where LeaveDayId='$dayid'");
echo "<script>window.location.reload()</script>";
}
?>
<ol class="breadcrumb" style="margin: 10px 0px ! important;">
<li class="breadcrumb-item"><a href="Home.php">Home</a><i class="fa fa-angle-right"></i>Leave<i class="fa fa-angle-right"></i>Add Leave</li>
</ol>
<form method="POST">
<div class="container-fluid" style="margin-bottom: 30px;margin-top: 10px; background: white; ">
<div class="row">
<h2 style="color: #1abc9c;">Add Leave</h2><hr>
<div class="col-md-3 control-label">
<label class="control-label">Leave (Year Days)</label>
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-sun-o" aria-hidden="true"></i>
</span>
<input type="text" name="leaveday" title="Yearly Leave Days" autocomplete="off" maxlength="3" placeholder="Enter Day" value="" required="" class="form-control" style="width: 250px; height: 36px;" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')">
</div>
<label style="color: #008000;">Yearly Leave Days is <?php echo(isset($rom['LeaveDay']))?$rom['LeaveDay']:'0'; ?>.</label>
</div>
<div class="col-md-4">
</div>
<div class="clearfix"> </div>
</div>
<div class="row">
<div class="col-md-3 form-group">
<button type="submit" name="submit" class="btn btn-primary" title="Add">Add</button>
<button type="reset" class="btn btn-default" title="Reset">Reset </button>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="container-fluid" style="margin-bottom: 30px;margin-top: 10px; background: white; ">
<div class="row">
<h2 style="color: #1abc9c;">Add Leave</h2><hr>
<div class="col-md-3 control-label">
<label class="control-label">Leave (Year Days)</label>
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-sun-o" aria-hidden="true"></i>
</span>
<input type="text" name="leaveday" title="Yearly Leave Days" autocomplete="off" maxlength="3" placeholder="Enter Day" value="" required="" class="form-control" style="width: 250px; height: 36px;" onkeyup="if (/\D/g.test(this.value)) this.value = this.value.replace(/\D/g,'')">
</div>
<label style="color: #008000;">Yearly Leave Days is <?php echo(isset($rom['LeaveDay']))?$rom['LeaveDay']:'0'; ?>.</label>
</div>
<div class="col-md-4">
</div>
<div class="clearfix"> </div>
</div>
<div class="row">
<div class="col-md-3 form-group">
<button type="submit" name="submit" class="btn btn-primary" title="Add">Add</button>
<button type="reset" class="btn btn-default" title="Reset">Reset </button>
</div>
<div class="clearfix"> </div>
</div>
</div>
</form>
<?php include('footer.php'); ?>