<%@ page language="java" import="java.sql.*, java.io.*, java.util.*, users.databases.*" %> <%! /***** METHOD DECLARATION *****/ /*** function FOUND-EMPTY-BOX checks for null entry or empty textbox ***/ boolean foundEmptyBox (String strBoxValue) { boolean found = false; if (strBoxValue.equals("")) { found = true; } return found; } %> <% /**** VARIABLE DECLARATION and INITIALIZATION *****/ boolean withError = true; byte bytStatus = 0; String strPwd2 = "", strEMail2 = ""; String strTempDB = "product_tmpClientInfoDB"; String strMainDB = "product_pgpClientInfoDB"; String strUserLogName = request.getParameter("userLogName"); String strPwd1 = request.getParameter("userPwd"); String strEMail1 = request.getParameter("userEMail"); String strWhatDB = request.getParameter("whatDB"); // WHAT DATABASE TO USE, VALUES = { mainDB, tempDB } = pgpClientInfoDB, tmpClientInfoDB respectively String strFirstTimer = request.getParameter("userFirstTime"); int intErrCounter = Integer.parseInt(request.getParameter("errorCounter")); /***** MAIN *****/ strEMail1 = strEMail1.toLowerCase(); if (strWhatDB.equals("mainDB")) { users.connect(strMainDB); } else { users.connect(strTempDB); } String SQLstmt = "SELECT Usr_Pwd, ApplicLvlStatus FROM tblUserPwd WHERE Usr_LogName=\"" + strUserLogName + "\";"; ResultSet rs = users.listQuery(SQLstmt); while (rs.next()) { strPwd2 = rs.getString("Usr_Pwd"); bytStatus = rs.getByte("ApplicLvlStatus"); } if (bytStatus==1) { users.disconnect(); if (strPwd1.equals(strPwd2)) { withError = false; } } else { SQLstmt = "SELECT Usr_EMail FROM tblUserPwd JOIN tblUserInfo WHERE Pwd_ID=Usr_ID AND Usr_LogName=\"" + strUserLogName + "\";"; rs = users.listQuery(SQLstmt); while (rs.next()) { strEMail2 = rs.getString("Usr_EMail"); } users.disconnect(); if (strPwd1.equals(strPwd2)) { if (strEMail1.equals(strEMail2)) { withError = false; } } } %> User Verification <% if (bytStatus != 1) { %> <% } else { %> <% } %>
         

 


 
<% if (withError) { %> <% if (intErrCounter==3) { %> <% } else { %> <% intErrCounter++; %> <% if (bytStatus==1) { %>

The password you entered is invalid! Please enter the password you registered before.

<% } else if (strFirstTimer.equals("true")) { %>

Please fill up the following:

<% } else { %>

Either the PASSWORD or EMAIL ADDRESS you entered is invalid OR BOTH. Please check if you entered the same values when you registered with us previously.

<% } %>

User name: <%= strUserLogName %>
Password:
<% if (bytStatus != 1) { %> e-mail Address:

<% } else { %> <% } %>

<% } %> <% } else { %> <% if (bytStatus==1) { %> <% } else { %> <% if (strWhatDB.equals("mainDB")) { users.connect(strMainDB); } else { users.connect(strTempDB); } if (bytStatus==0) { bytStatus = 7; } else if ((bytStatus==5) || (bytStatus==6) || (bytStatus==9)) { bytStatus = 8; } SQLstmt = "UPDATE tblUserPwd SET ApplicLvlStatus=" + bytStatus + " WHERE Usr_LogName=\"" + strUserLogName + "\";"; users.updateData(SQLstmt); users.disconnect(); %> <% } %> <% } %>
 

Copyright © 2001-2003 by Grafikoncepts and Designs, Inc.
A joint project of Grafikoncepts and Designs, Inc. and Digital Management and Solutions, Inc.
Layout by MVMG (VPIT), Digital Management and Solutions, Inc.