Skip to content

Commit

Permalink
Merge pull request #171 from arc12012/mobile
Browse files Browse the repository at this point in the history
nhpup disabled for mobile devices
  • Loading branch information
beb13005 committed Apr 27, 2017
2 parents f7bb296 + 5ea12ed commit e075359
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions WebContent/html/javascript/nhpup_1.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ nhpup = {

initialized: false,
initialize : function(){
if(/(iphone|ipod|ipad|android|blackberry|iemobile|opera m(ob|in)i|vodafone)/i.test(navigator.userAgent)) return;
if (this.initialized) return;

window.$jq = jQuery; // this is safe in WP installations with noConflict mode (which is default)
Expand Down
5 changes: 4 additions & 1 deletion WebContent/html/webpages/userLogin.jsp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<%@ page import = "database.*,entities.Location" %>
<%@ page import = "java.util.Arrays" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import = "java.sql.*" %>
Expand Down Expand Up @@ -93,10 +94,12 @@ for(;;){
ResultSet result;
result = stmt.executeQuery("select * FROM employee where Employee_ID='" + ssoNum + "'");
if (result.next()){
String name = result.getString("Name"); //cookie does not allow the use of space(possibly just a tomcat issue)!!!!
request.getSession();
session.setAttribute("ssoNum", ssoNum);
newCookie = new Cookie("name",result.getString("Name"));
newCookie = new Cookie("name", name);
stmt.close();
connection.close();
newCookie.setMaxAge(30*60);
Expand Down

0 comments on commit e075359

Please sign in to comment.