diff --git a/WebContent/html/webpages/adminpassword.jsp b/WebContent/html/webpages/adminpassword.jsp
new file mode 100644
index 0000000..2be0454
--- /dev/null
+++ b/WebContent/html/webpages/adminpassword.jsp
@@ -0,0 +1,60 @@
+<%@ page import = "database.*,entities.User" %>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+
+
+
+
+
+
+
+
+
+
Synchrony Financial
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/html/webpages/adminpasswordchange.jsp b/WebContent/html/webpages/adminpasswordchange.jsp
new file mode 100644
index 0000000..881eb1d
--- /dev/null
+++ b/WebContent/html/webpages/adminpasswordchange.jsp
@@ -0,0 +1,71 @@
+<%@ page import = "database.*,entities.Device" %>
+<%@ page import = "java.sql.*" %>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+
+
+
+
+
+
+
+
+
+
+
Synchrony Financial
+
+
+
+
+
+
+
+
+
+
+
Redirect Page
+
You shouldn't be seeing this page :)
+
+<%
+//add form was submitted
+if(request.getParameter("submit") != null){
+ String old = request.getParameter("old");
+ String newpass = request.getParameter("new");
+ String confirm = request.getParameter("confirm");
+ String pincode = request.getParameter("pincode");
+ String database = "jdbc:mysql://us-cdbr-iron-east-04.cleardb.net/ad_15a989204c2ff8a?user=b372dfe7409692&password=74f6e317";
+ String user = "b372dfe7409692";
+ String password = "74f6e317";
+ System.getenv("VCAP_SERVICES");
+ Class.forName("com.mysql.jdbc.Driver");
+ Connection connection = DriverManager.getConnection(database, user, password);
+ Statement stmt = connection.createStatement();
+ ResultSet result;
+ result = stmt.executeQuery("select * FROM admin where Admin_ID='" + navsso + "' AND Password='" + old + "'");
+ if(result.next()){//if old password is accurate
+ if (!old.equals(newpass) && newpass.equals(confirm) && pincode.length() == 4 && AdminQueries.pincodeInt(pincode)){//if the password is new AND both news ones are equal AND pincode is 4 digits AND pincode is a number
+ stmt.executeUpdate("UPDATE admin SET Password = \"" + newpass + "\", Password_Flag = 1, Pincode = " + pincode + " WHERE Admin_ID = " + navsso);
+ stmt.close();
+ connection.close();
+ response.sendRedirect("admin.jsp");
+ return;
+ }
+ else{
+ stmt.close();
+ connection.close();
+ response.sendRedirect("adminpasswordtryagain.jsp");
+ return;
+ }
+ }
+ else{
+ stmt.close();
+ connection.close();
+ response.sendRedirect("adminpasswordtryagain.jsp");
+ return;
+ }
+}
+%>
+
+
\ No newline at end of file
diff --git a/WebContent/html/webpages/adminpasswordtryagain.jsp b/WebContent/html/webpages/adminpasswordtryagain.jsp
new file mode 100644
index 0000000..ae7082f
--- /dev/null
+++ b/WebContent/html/webpages/adminpasswordtryagain.jsp
@@ -0,0 +1,61 @@
+<%@ page import = "database.*,entities.User" %>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+
+
+
+
+
+
+
+
+
+
Synchrony Financial
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebContent/html/webpages/deviceRedirect.jsp b/WebContent/html/webpages/deviceRedirect.jsp
index d3e9558..08624d8 100644
--- a/WebContent/html/webpages/deviceRedirect.jsp
+++ b/WebContent/html/webpages/deviceRedirect.jsp
@@ -37,7 +37,7 @@ String manufacturer = request.getParameter("manu").replace("\"","\\\"");
String hardware = request.getParameter("hardware").replace("\"","\\\"");
String model = request.getParameter("model").replace("\"","\\\"");
String serial = request.getParameter("serial");
-int nfc = Integer.parseInt(request.getParameter("NFC"));
+String nfc = request.getParameter("NFC");
//add form was submitted
if(request.getParameter("add") != null){
Device device = new Device(name,1,description,hardware,model,manufacturer,status,mac,serial,nfc);
@@ -65,7 +65,5 @@ if(request.getParameter("delete") != null){
-
-
\ No newline at end of file
diff --git a/WebContent/html/webpages/index.jsp b/WebContent/html/webpages/index.jsp
index b1672aa..8ccfa57 100644
--- a/WebContent/html/webpages/index.jsp
+++ b/WebContent/html/webpages/index.jsp
@@ -69,8 +69,8 @@
diff --git a/WebContent/html/webpages/logout.jsp b/WebContent/html/webpages/logout.jsp
new file mode 100644
index 0000000..e39c5f3
--- /dev/null
+++ b/WebContent/html/webpages/logout.jsp
@@ -0,0 +1,22 @@
+<%@ page import = "database.*" %>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<%@ page import = "java.sql.*" %>
+
+<%
+Cookie[] usercookies = request.getCookies();
+if(usercookies != null){
+ for(Cookie c : usercookies){
+ if(c.getName().equals("ssoNum") || c.getName().equals("admin")){//when (and if) we get to user cookie we want to reset it
+ c.setMaxAge(0);//delete current
+ String cookiename = c.getName();
+ Cookie newCookie = new Cookie(cookiename,"");//make new one
+ newCookie.setMaxAge(0);
+ newCookie.setPath("/");
+ response.addCookie(newCookie);
+ }
+ }
+}
+response.sendRedirect("index.jsp");
+return;
+%>
\ No newline at end of file
diff --git a/WebContent/html/webpages/navbar.jsp b/WebContent/html/webpages/navbar.jsp
index ab4cbb2..4ab3fbe 100644
--- a/WebContent/html/webpages/navbar.jsp
+++ b/WebContent/html/webpages/navbar.jsp
@@ -1,4 +1,4 @@
-<%@ page import = "database.*,entities.User" %>
+<%@ page import = "database.*,entities.User,utilities.Mail" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>