shit
This commit is contained in:
parent
9fb08d43d0
commit
1242d6e633
8
.idea/.gitignore
vendored
8
.idea/.gitignore
vendored
|
|
@ -1,8 +0,0 @@
|
||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
<data-source source="LOCAL" name="g1_pila@localhost" uuid="7303aaeb-6e1d-4970-b61b-ab692dc4f07a">
|
<data-source source="LOCAL" name="g1_pila@localhost" uuid="06cec49b-e955-4ad7-913d-f29c2e2b4059">
|
||||||
<driver-ref>mysql.8</driver-ref>
|
<driver-ref>mysql.8</driver-ref>
|
||||||
<synchronize>true</synchronize>
|
<synchronize>true</synchronize>
|
||||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/PILA_LoginAndInsert.iml" filepath="$PROJECT_DIR$/.idea/PILA_LoginAndInsert.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/brian.iml" filepath="$PROJECT_DIR$/.idea/brian.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
38
display.php
38
display.php
|
|
@ -9,16 +9,16 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<span style="font-family: cursive; color:white; font-size: xx-large;" >Placeholder</span>
|
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
|
||||||
<nav>
|
<nav>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="index.html">
|
<th><a href="home.php">
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>Home</a></th>
|
<span></span>Home</a></th>
|
||||||
<th><a href="Equipment.html">
|
<th><a href="display.php">
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
@ -33,12 +33,8 @@
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<table>
|
<center><h1 style="color: aliceblue">Display Records</h1></center>
|
||||||
<tr>
|
|
||||||
<th> Full Name </th>
|
|
||||||
<th>Update?</th>
|
|
||||||
<th>Delete?</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -47,18 +43,28 @@
|
||||||
header("location:index.php");
|
header("location:index.php");
|
||||||
}
|
}
|
||||||
$conn = mysqli_connect('localhost','root','','g1_pila');
|
$conn = mysqli_connect('localhost','root','','g1_pila');
|
||||||
$command = "select CONCAT(FIRST_NAME, ' ',LAST_NAME) as name from employee";
|
$command = "select SHIPMENT_ID from shipment";
|
||||||
$result = mysqli_query($conn,$command);
|
$result = mysqli_query($conn,$command);
|
||||||
|
if(mysqli_num_rows($result) > 0){
|
||||||
while ($row = mysqli_fetch_array($result)){
|
echo "<table style='color: aliceblue; border: 3px solid deepskyblue; padding: 20px;margin-left: 5%'>";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<th> $row[0] </th>";
|
echo "<th> Shipment ID</th>";
|
||||||
echo "<th><a href = 'update.php'>Update</a></th>";
|
echo "<th>Update?</th>";
|
||||||
echo "<th><a href = 'delete.php'>Delete</a></th>";
|
echo "<th>Delete?</th>";
|
||||||
echo "</tr>";
|
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>";
|
||||||
?>
|
?>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
33
home.php
33
home.php
|
|
@ -9,13 +9,25 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<span style="font-family: cursive; color:white; font-size: xx-large;" >Placeholder</span>
|
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<h2>Hello, User</h2>
|
<h2>Hello, <?php
|
||||||
|
session_start();
|
||||||
|
$empID = $_SESSION['EmployeeID'];
|
||||||
|
$connect = mysqli_connect("localhost", "root", "", "g1_pila") or die("Unable to connect");
|
||||||
|
if($empID == ''){
|
||||||
|
header("location:index.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT OWNER FROM store WHERE STORE_ID=$empID ";
|
||||||
|
$result = mysqli_query($connect, $sql);
|
||||||
|
$row = mysqli_fetch_assoc($result);
|
||||||
|
echo $row['OWNER'];
|
||||||
|
?></h2>
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav style="margin-left: 35%">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="display.php">
|
<th><a href="display.php">
|
||||||
|
|
@ -24,6 +36,13 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>Display Table</a></th>
|
<span></span>Display Table</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><a href="createUser.php">
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>Create User</a></th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="Insert.php">
|
<th><a href="Insert.php">
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
@ -31,6 +50,14 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>Insert</a></th>
|
<span></span>Insert</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><a href="logout.php">
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>Log-off</a></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
if(isset($_POST['Submitto'])){
|
if(isset($_POST['Submitto'])){
|
||||||
$employeeUser = $_POST['employeeID'];
|
$employeeUser = $_POST['employeeID'];
|
||||||
$employeePass = $_POST['employeePassword'];
|
$employeePass = $_POST['employeePassword'];
|
||||||
$whereto = "SELECT EMPLOYEE_ID,PASSWD FROM employee where EMPLOYEE_ID='$employeeUser'";
|
$whereto = "SELECT STORE_ID,PASSWORD FROM store where STORE_ID='$employeeUser'";
|
||||||
$result = mysqli_query($connect,$whereto);
|
$result = mysqli_query($connect,$whereto);
|
||||||
$rows = mysqli_num_rows($result);
|
$rows = mysqli_num_rows($result);
|
||||||
$row = mysqli_fetch_array($result);
|
$row = mysqli_fetch_array($result);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<span style="font-family: cursive; color:white; font-size: xx-large;" >Placeholder</span>
|
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
|
||||||
</header>
|
</header>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<h2>Shipment Fill-out form</h2>
|
<h2>Shipment Fill-out form</h2>
|
||||||
|
|
|
||||||
4
logout.php
Normal file
4
logout.php
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
session_destroy();
|
||||||
|
header("location:index.php");
|
||||||
|
?>
|
||||||
16
style.css
16
style.css
|
|
@ -15,7 +15,7 @@ body {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 400px;
|
width: 800px;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
transform: translate(-50%, -30%);
|
transform: translate(-50%, -30%);
|
||||||
background: rgba(0,0,0,.5);
|
background: rgba(0,0,0,.5);
|
||||||
|
|
@ -36,6 +36,20 @@ header{
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.white-box{
|
||||||
|
border: 3px solid aliceblue;
|
||||||
|
padding-right: 35px;
|
||||||
|
padding-left: 35px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white-button{
|
||||||
|
text-decoration: none;
|
||||||
|
color: aliceblue;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
header nav{
|
header nav{
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 35%;
|
top: 35%;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user