-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateFeesData.php
More file actions
196 lines (122 loc) · 3.73 KB
/
UpdateFeesData.php
File metadata and controls
196 lines (122 loc) · 3.73 KB
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
<?php include 'connection.php';?>
<?php
$nm=$_GET['i'];
//echo $nm;
$feesdata=mysqli_query($con,"select * from detailsofstaff where Name='$nm'");
$result=mysqli_fetch_array($feesdata);
?>
<?php
session_start();
if(isset($_SESSION['email']))
{
//echo $_SESSION['email'];
?>
<style type="text/css">
html,body{
height: 100%;
}
body{
}
.bg-all {
background: #FFDA1F;
position: relative;
width: 100%;
height: 100%;
}
.culd{
position: absolute;
top: 100px;
left: 100px;
width: 10px;
height: 10px;
border: 1px solid #079e71;
transform-origin: top left;
transform: scale(0) rotate(0deg) translate(-50%,-50%);
animation: culd 12s ease-in forwards infinite;
}
</style>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Pay Fees To Staff</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="bg-all">
<div class="culd"></div>
<div class="culd"></div>
<div class="culd"></div>
<div class="culd"></div>
<div class="culd"></div>
<br>
<div class="container">
<div class="card">
<div class="card-body">Pay To Staff Member<a href="stafFeesManagment.php" class="btn btn-danger" style="float: right;">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-box-arrow-left" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.5.5v2a.5.5 0 0 1-1 0v-2A1.5 1.5 0 0 1 6.5 2h8A1.5 1.5 0 0 1 16 3.5v9a1.5 1.5 0 0 1-1.5 1.5h-8A1.5 1.5 0 0 1 5 12.5v-2a.5.5 0 0 1 1 0v2z"/>
<path fill-rule="evenodd" d="M.146 8.354a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L1.707 7.5H10.5a.5.5 0 0 1 0 1H1.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3z"/>
</svg>
</a>
</div>
</div>
<br>
<div class="container">
<div class="card">
<div class="card-body">
<form method="post" autocomplete="off">
<label>Name</label>
<input class="form-control" type="text" placeholder="Default input" name="snm" readonly="" value="<?php echo $result[1];?>">
<br>
<label>Role</label>
<input class="form-control" type="text" placeholder="Default input" readonly="" value="<?php echo $result[4];?>">
<br>
<label>Pay</label>
<input class="form-control" type="number" placeholder="Staff Pay Money" name="spay" required="">
<br>
<label>Date</label>
<input class="form-control" type="date" placeholder="Pay Date" name="pdate" required="">
<br>
<input type="submit" name="btn" class="btn btn-success btn-block" value="Submit">
</form>
</div>
<div class="card-footer">
<?php
if(isset($_POST['btn']))
{
$mnm=$_POST['snm'];
$mpay=$_POST['spay'];
$gdate=$_POST['pdate'];
$pay=mysqli_query($con,"update feesstaff set Pay='$mpay',Date='$gdate' where Name='$mnm'");
if($pay)
{
echo " <div class='alert alert-success'>
<strong>Success!</strong> Pay Data Succesfull Add.
</div>";
}
else {
echo"<div class='alert alert-danger'>
<strong>Fail</strong> Error Occur
</div>";
}
}
?>
</div>
</div>
</div>
</body>
</div>
<?php
}
else
{
header("location:Login.php")
?>
<?php
}
?>
</html>