-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathall.php
90 lines (84 loc) · 2.77 KB
/
all.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
<?php
include('connect.php');
session_start();
$query = "SELECT * FROM staff_details order by id";
$st=mysqli_query($conn,$query);
$result = mysqli_fetch_all($st,MYSQLI_ASSOC);
?>
<!DOCTYPE html>
<html>
<head>
<title>Details</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
</head>
<body>
<div class="container">
<br />
<h3 align="center">STAFF DETAILS</h3>
<br />
<div class="table-responsive">
<form method="POST" id="convert_form" action="">
<table class="table table-striped table-bordered" id="table_content">
<tr>
<th>ID</th>
<th>Program</th>
<th>Starting date</th>
<th>Ending date</th>
<th>Name</th>
</tr>
<?php
foreach($result as $row)
{
$id=$row["id"];
$program=$row["program"];
$sdate=$row["sdate"];
$edate=$row["edate"];
$name=$row["name"];
echo"
<tr>
<td>$id</td>
<td>$program</td>
<td>$sdate</td>
<td>$edate</td>
<td>$name</td>
<td><button id='d'><a href='udelete.php?id=$id&program=$program'.>DELETE</a></button></td>
<td><button id='u'><a href='update.php?id=$id&program=$program'.>UPDATE</a></button></td>
</tr>
";
}
?>
</table>
<input type="hidden" name="file_content" id="file_content" />
<button type="button" name="convert" id="convert" class="btn btn-primary" onclick="window.location.href='uexcel.php'">Download Excel file</button>
</form>
<br />
<button type="b" name="convert" id="convert" class="btn btn-primary" onclick="window.location.href='home.php'">Back</button>
<br />
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<style>
#d a{
text-decoration: none;
color: white;
}
#u a{
text-decoration: none;
color: white;
}
#d{
background-color:orange;
color: white;
border-radius: 5px;
border:solid 2px black;
}
#u{
background-color:greenyellow;
color: white;
border-radius: 5px;
border:solid 2px black;
}
</style>
</body>
</html>