diff --git a/adminPages/AddEmployee.php b/adminPages/AddEmployee.php index 9e646e7..2cd060c 100644 --- a/adminPages/AddEmployee.php +++ b/adminPages/AddEmployee.php @@ -2,6 +2,24 @@ require("../dbCon.php"); require("../commonFunctions.php"); +if (isset($_GET['LastName'])){ + $query = "INSERT INTO employees (password, LastName, FirstName, Title, TitleOfCourtesy, + BirthDate, HireDate, Address, City, Region, + PostalCode, Country, HomePhone, Extension, Notes, + ReportsTo, Salary) + VALUES(?,?,?,?,?, + ?,?,?,?,?, + ?,?,?,?,?, + ?,?)"; + $stmt = $con->prepare($query); + $stmt ->bind_param("sssssssssssssssdd", $_GET['Password'], $_GET['LastName'], $_GET['FirstName'], $_GET['Title'], $_GET['TitleOfCourtesy'], + $_GET['BirthDate'], $_GET['HireDate'], $_GET['Address'], $_GET['City'], $_GET['Region'], + $_GET['PostalCode'], $_GET['Country'], $_GET['HomePhone'], $_GET['Extension'], $_GET['Notes'], + $_GET['ReportsTo'], $_GET['Salary']); + + $stmt ->execute(); + +} ?> @@ -14,11 +32,74 @@ require("../commonFunctions.php");
-

- -

+
+

Add Employee

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/adminPages/Report_Customers.php b/adminPages/Report_Customers.php index 943d857..89eabdb 100644 --- a/adminPages/Report_Customers.php +++ b/adminPages/Report_Customers.php @@ -13,7 +13,7 @@ require("../commonFunctions.php");
- + //To do
diff --git a/adminPages/Report_Employees.php b/adminPages/Report_Employees.php index 943d857..89eabdb 100644 --- a/adminPages/Report_Employees.php +++ b/adminPages/Report_Employees.php @@ -13,7 +13,7 @@ require("../commonFunctions.php");
- + //To do
diff --git a/adminPages/Report_Inventory.php b/adminPages/Report_Inventory.php index 943d857..89eabdb 100644 --- a/adminPages/Report_Inventory.php +++ b/adminPages/Report_Inventory.php @@ -13,7 +13,7 @@ require("../commonFunctions.php");
- + //To do
diff --git a/adminPages/Report_Sales.php b/adminPages/Report_Sales.php index 943d857..0e7ffa6 100644 --- a/adminPages/Report_Sales.php +++ b/adminPages/Report_Sales.php @@ -13,7 +13,44 @@ require("../commonFunctions.php");
+ prepare($query); + $stmt ->bind_param("d", $_GET['Category']); //Bind category to query, category is taken in as CategoryID, so it's a digit + $stmt ->execute(); + $searchResult = $stmt->get_result(); //Get results + + makeTable($searchResult); //Make table from results, makeTable code is in commonFunctions.php + + }else{ //If category has not been set, show HTML form to pick category + ?> + +
+

Sales Report

+
+ + + + +
+
+ +