Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added more functionality to view employees page, added pages for each…
… employee
- Loading branch information
Josh
authored and
Josh
committed
Dec 7, 2016
1 parent
ba82e25
commit 55efdda
Showing
13 changed files
with
188 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
require("../dbCon.php"); | ||
require("../commonFunctions.php"); | ||
|
||
?> | ||
|
||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../style.css"> | ||
</head> | ||
<body> | ||
<div id="header"> | ||
<?php writeMenuAdm('AllOrders.php'); ?> | ||
</div> | ||
<form action = "AddEmployee.php" class="form-group" style='display: block; margin: auto; width: 960px;'> | ||
<input type="submit" value="New Employee"> | ||
</form> | ||
<div id='contentwrapper'> | ||
<?php | ||
$sql = "SELECT | ||
EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, PostalCode, Country, HomePhone, Extension, ReportsTo, Salary | ||
FROM employees"; | ||
|
||
$result = $con->query($sql); | ||
$trArgs = array("onclick=\"window.document.location='ViewEmployee.php?EmployeeID=%EmployeeID%'\"", | ||
array('%EmployeeID%' => 'EmployeeID') | ||
); | ||
makeTable($result, $trArgs); | ||
?> | ||
</div> | ||
</body> | ||
|
||
|
||
|
||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
require("../dbCon.php"); | ||
require("../commonFunctions.php"); | ||
|
||
?> | ||
|
||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../style.css"> | ||
</head> | ||
<body> | ||
<div id="header"> | ||
<?php writeMenuAdm('Employees.php'); ?> | ||
</div> | ||
<div id='contentwrapper'> | ||
<?php | ||
$sql = "SELECT | ||
EmployeeID, LastName, FirstName, Title, TitleOfCourtesy, BirthDate, HireDate, Address, City, Region, PostalCode, Country, HomePhone, Extension, ReportsTo, Salary | ||
FROM employees WHERE EmployeeID = " . $_GET['EmployeeID']; | ||
$result = $con->query($sql); | ||
makeTable($result); | ||
?> | ||
|
||
<hr> | ||
|
||
<?php | ||
$sql = "SELECT Photo, Notes | ||
FROM employees WHERE EmployeeID = " . $_GET['EmployeeID']; | ||
$result = $con->query($sql); | ||
$row = $result->fetch_assoc(); | ||
if ($row['Photo'] !== null){ | ||
loadPicture($row['Photo'], 40); | ||
} | ||
?> | ||
<hr> | ||
<h3>Notes:</h3> | ||
<p><?php echo $row['Notes']; ?> </p> | ||
</div> | ||
</body> | ||
|
||
|
||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
require("../dbCon.php"); | ||
require("../commonFunctions.php"); | ||
|
||
$sql = "SELECT * FROM employees WHERE EmployeeID = '" . $_SESSION["EmployeeID"] . "'"; | ||
//echo $sql; | ||
if (!$result = $con->query($sql)) {} | ||
|
||
$row = $result->fetch_assoc(); | ||
if ($row) { | ||
$FirstName = $row['FirstName']; | ||
|
||
} | ||
|
||
//echo "Welcome " . $_SESSION["userName"] . "!"; | ||
?> | ||
|
||
<html> | ||
<head> | ||
<link rel="stylesheet" href="../style.css"> | ||
</head> | ||
<body> | ||
<div id="header"> | ||
<?php writeMenuEmp(basename($_SERVER['PHP_SELF'])); ?> | ||
</div> | ||
<div id='contentwrapper'> | ||
<h1>All orders</h1> | ||
<hr> | ||
<?php | ||
$sql = "SELECT * FROM northwind.`orders qry` ORDER BY ShippedDate ASC;"; | ||
if (!$result = $con->query($sql)){} | ||
|
||
|
||
$trArgs = array("onclick=\"window.document.location='ViewOrder.php?orderID=%OrderID%'\"", | ||
array('%OrderID%' => 'OrderID') | ||
); | ||
makeTable($result, $trArgs); | ||
?> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters