74 lines
2.5 KiB
PHP
74 lines
2.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
<title>Placeholder Register</title>
|
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
|
<link rel='stylesheet' type='text/css' media='screen' href='style.css'>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
|
|
<nav>
|
|
<table>
|
|
<tr>
|
|
<th><a href="home.php">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>Home</a></th>
|
|
<th><a href="display.php">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>Equipment</a></th>
|
|
<th><a href="">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>About Us</a></th>
|
|
</tr>
|
|
</table>
|
|
</nav>
|
|
</header>
|
|
<div class="login-box">
|
|
<center><h1 style="color: aliceblue">Display Records</h1></center>
|
|
|
|
|
|
|
|
<?php
|
|
session_start();
|
|
if($_SESSION['EmployeeID'] = ''){
|
|
header("location:index.php");
|
|
}
|
|
$conn = mysqli_connect('localhost','root','','g1_pila');
|
|
$command = "select SHIPMENT_ID from shipment";
|
|
$result = mysqli_query($conn,$command);
|
|
if(mysqli_num_rows($result) > 0){
|
|
echo "<table style='color: aliceblue; border: 3px solid deepskyblue; padding: 20px;margin-left: 5%'>";
|
|
echo "<tr>";
|
|
echo "<th> Shipment ID</th>";
|
|
echo "<th>Update?</th>";
|
|
echo "<th>Delete?</th>";
|
|
echo "</tr>";
|
|
while ($row = mysqli_fetch_array($result)){
|
|
echo "<tr>";
|
|
echo "<td class='white-box'> $row[0] </td>";
|
|
echo "<td class='white-box'><a href='update.php?empID=".$row[0]."'>Update</a></td>";
|
|
echo "<td class='white-box'><a href = 'delete.php?empID=".$row[0]."' class='white-button'>Delete</a></td>";
|
|
echo "</tr>";
|
|
}
|
|
}else{
|
|
echo "<center><h1 style='color: aliceblue'>Sorry, I can't find any records</h1></center>";
|
|
}
|
|
echo "</table>";
|
|
?>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
<?php
|