diff --git a/WebContent/adminLogin.jsp b/WebContent/adminLogin.jsp index e33796f..df36b10 100644 --- a/WebContent/adminLogin.jsp +++ b/WebContent/adminLogin.jsp @@ -1,88 +1,221 @@ <%@ page import = "database.*" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import = "java.sql.*" %> <%@ page import = "java.security.MessageDigest" %> <%@ page import = "java.security.NoSuchAlgorithmException" %> -<% -int ssoNum; -String pass; -Cookie adminCookie; +<%@ page import = "java.util.Random" %> + + + + + + + + + -ssoNum = Integer.parseInt(request.getParameter("username")); -pass = request.getParameter("pass"); -String generatedPass = null; + Innovation Hub -try { - MessageDigest md = MessageDigest.getInstance("MD5"); - md.update(pass.getBytes()); - byte[] bytes = md.digest(); - StringBuilder sb = new StringBuilder(); - for(int i = 0; i + + + + + + + + + +<% +/* + If admin chose to login, we work on this form. +*/ +if(request.getParameter("login") != null){ + /* + Get form information from last page. + */ + int ssoNum = Integer.parseInt(request.getParameter("username")); + String pass = request.getParameter("pass"); + Cookie adminCookie; + String generatedPass = null; -} - -String database = "jdbc:mysql://us-cdbr-iron-east-04.cleardb.net/ad_15a989204c2ff8a?user=b372dfe7409692&password=74f6e317"; -String user = "b372dfe7409692"; -String password = "74f6e317"; -Class.forName("com.mysql.jdbc.Driver"); -Connection connection; -Statement stmt; -for(;;){ - try{ - connection = DriverManager.getConnection(database, user, password); - break; + /* + Hash what the user put in, so we can see if the passwords match up. + */ + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + md.update(pass.getBytes()); + byte[] bytes = md.digest(); + StringBuilder sb = new StringBuilder(); + for(int i = 0; i \ No newline at end of file +/* + Goes back to the previous page. +*/ +function goBack(){ + window.history.back(); +} + + \ No newline at end of file diff --git a/WebContent/html/webpages/administration/adminpasswordsetting.jsp b/WebContent/html/webpages/administration/adminpasswordsetting.jsp new file mode 100644 index 0000000..0359bc0 --- /dev/null +++ b/WebContent/html/webpages/administration/adminpasswordsetting.jsp @@ -0,0 +1,62 @@ + + + + + + + + + + Innovation Hub + + + + + + + + + + + + + + + +
+ +
+

Change Your Password

+
+ + +
+
+ + +
+
+ + +
+ +
+
+

Change Pincode

+
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/WebContent/html/webpages/administration/adminpasswordsettingtryagain.jsp b/WebContent/html/webpages/administration/adminpasswordsettingtryagain.jsp new file mode 100644 index 0000000..f006479 --- /dev/null +++ b/WebContent/html/webpages/administration/adminpasswordsettingtryagain.jsp @@ -0,0 +1,63 @@ + + + + + + + + + + Innovation Hub + + + + + + + + + + + + + + + +
+ +
+

Something went wrong. Try again!

+

Change Your Password

+
+ + +
+
+ + +
+
+ + +
+ +
+
+

Change Pincode

+
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/WebContent/html/webpages/administration/ticketApprove.jsp b/WebContent/html/webpages/administration/ticketApprove.jsp index 7b35f4c..7116095 100644 --- a/WebContent/html/webpages/administration/ticketApprove.jsp +++ b/WebContent/html/webpages/administration/ticketApprove.jsp @@ -29,6 +29,10 @@ + +

Approving Tickets

Thanks for approving a ticket!

@@ -36,7 +40,7 @@
Synchrony Financial

-
+
diff --git a/WebContent/html/webpages/components/adminnavbar.jsp b/WebContent/html/webpages/components/adminnavbar.jsp index 160a20a..e3cde2c 100644 --- a/WebContent/html/webpages/components/adminnavbar.jsp +++ b/WebContent/html/webpages/components/adminnavbar.jsp @@ -24,6 +24,7 @@
  • Device Hub
  • Location Hub
  • +
  • Update Password/Pincode
  • \ No newline at end of file diff --git a/WebContent/html/webpages/components/navbar.jsp b/WebContent/html/webpages/components/navbar.jsp index 0f32c01..ac1ec25 100644 --- a/WebContent/html/webpages/components/navbar.jsp +++ b/WebContent/html/webpages/components/navbar.jsp @@ -24,6 +24,7 @@