fuckery
This commit is contained in:
parent
1242d6e633
commit
f01cfaec8c
34
display.php
34
display.php
|
|
@ -10,43 +10,25 @@
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
|
<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>
|
</header>
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
$ID = $_SESSION['EmployeeID'];
|
||||||
|
if ($ID == ''){
|
||||||
|
header("location:index.php");
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<center><h1 style="color: aliceblue">Display Records</h1></center>
|
<center><h1 style="color: aliceblue">Display Records</h1></center>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
if($_SESSION['EmployeeID'] = ''){
|
|
||||||
header("location:index.php");
|
|
||||||
}
|
|
||||||
$conn = mysqli_connect('localhost','root','','g1_pila');
|
$conn = mysqli_connect('localhost','root','','g1_pila');
|
||||||
$command = "select SHIPMENT_ID from shipment";
|
$command = "select SHIPMENT_ID from shipment";
|
||||||
$result = mysqli_query($conn,$command);
|
$result = mysqli_query($conn,$command);
|
||||||
if(mysqli_num_rows($result) > 0){
|
if(mysqli_num_rows($result) > 0){
|
||||||
echo "<table style='color: aliceblue; border: 3px solid deepskyblue; padding: 20px;margin-left: 5%'>";
|
echo "<table style='color: aliceblue; border: 3px solid deepskyblue; padding: 20px;margin-left: 23%'>";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<th> Shipment ID</th>";
|
echo "<th> Shipment ID</th>";
|
||||||
echo "<th>Update?</th>";
|
echo "<th>Update?</th>";
|
||||||
|
|
|
||||||
22
home.php
22
home.php
|
|
@ -2,7 +2,6 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset='utf-8'>
|
<meta charset='utf-8'>
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<title>Placeholder Register</title>
|
<title>Placeholder Register</title>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||||
<link rel='stylesheet' type='text/css' media='screen' href='style.css'>
|
<link rel='stylesheet' type='text/css' media='screen' href='style.css'>
|
||||||
|
|
@ -13,16 +12,23 @@
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
if (!isset($_SESSION['EmployeeID'])){
|
||||||
|
header("location:index.php");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<h2>Hello, <?php
|
<h2>Hello, <?php
|
||||||
session_start();
|
|
||||||
$empID = $_SESSION['EmployeeID'];
|
$empID = $_SESSION['EmployeeID'];
|
||||||
$connect = mysqli_connect("localhost", "root", "", "g1_pila") or die("Unable to connect");
|
$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 ";
|
$sql = "SELECT OWNER FROM store WHERE STORE_ID=$empID ";
|
||||||
$result = mysqli_query($connect, $sql);
|
try{
|
||||||
|
$result = mysqli_query($connect, $sql);
|
||||||
|
}catch (Exception $ex){
|
||||||
|
echo "<script>alert('Sum Ting Wong'); window.location='index.php';</script>";
|
||||||
|
}
|
||||||
$row = mysqli_fetch_assoc($result);
|
$row = mysqli_fetch_assoc($result);
|
||||||
echo $row['OWNER'];
|
echo $row['OWNER'];
|
||||||
?></h2>
|
?></h2>
|
||||||
|
|
@ -41,14 +47,14 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>Create User</a></th>
|
<span></span>Create Store</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="Insert.php">
|
<th><a href="Insert.php">
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>Insert</a></th>
|
<span></span>Insert Shipment</a></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="logout.php">
|
<th><a href="logout.php">
|
||||||
|
|
|
||||||
21
index.php
21
index.php
|
|
@ -11,27 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<span style="font-family: cursive; color:white; font-size: xx-large;" >Placeholder</span>
|
<span style="font-family: cursive; color:white; font-size: xx-large;" >Placeholder</span>
|
||||||
<nav>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th><a href="index.html">
|
|
||||||
<span></span>
|
|
||||||
<span></span>
|
|
||||||
<span></span>
|
|
||||||
<span></span>Home</a></th>
|
|
||||||
<th><a href="Equipment.html">
|
|
||||||
<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>
|
</header>
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<h2>Login</h2>
|
<h2>Login</h2>
|
||||||
|
|
|
||||||
11
insert.php
11
insert.php
|
|
@ -12,6 +12,13 @@
|
||||||
<a href="home.php" style="font-family: cursive; color:white; font-size: xx-large; text-decoration: none"> Placeholder</a>
|
<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">
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
$ID = $_SESSION['EmployeeID'];
|
||||||
|
if ($ID == ''){
|
||||||
|
header("location:index.php");
|
||||||
|
}
|
||||||
|
?>
|
||||||
<h2>Shipment Fill-out form</h2>
|
<h2>Shipment Fill-out form</h2>
|
||||||
<form action="insert.php" method="post">
|
<form action="insert.php" method="post">
|
||||||
<div class="user-box">
|
<div class="user-box">
|
||||||
|
|
@ -48,10 +55,6 @@
|
||||||
</html>
|
</html>
|
||||||
<!--The bettah code that I wrote MWAHAHAHA-->
|
<!--The bettah code that I wrote MWAHAHAHA-->
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
|
||||||
if($_SESSION['EmployeeID'] = ''){
|
|
||||||
header("location:index.php");
|
|
||||||
}
|
|
||||||
define('MYSQL','localhost');
|
define('MYSQL','localhost');
|
||||||
define('USERNAME','root');
|
define('USERNAME','root');
|
||||||
define('PASSWORD','');
|
define('PASSWORD','');
|
||||||
|
|
|
||||||
15
logout.php
15
logout.php
|
|
@ -1,4 +1,11 @@
|
||||||
<?php
|
<html>
|
||||||
session_destroy();
|
<body>
|
||||||
header("location:index.php");
|
<div class="login-box">
|
||||||
?>
|
<?php
|
||||||
|
session_start();
|
||||||
|
session_destroy();
|
||||||
|
header("location:index.php");
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user