<%@ page language="java" import="java.sql.*, java.io.*, java.util.*, users.databases.*" %> Password Registration <%! /***** METHOD DECLARATION *****/ /*** function FOUND-INVALID-CHAR checks for null entry or invalid char ***/ boolean foundInvalidChar (String strToSearch) { int strLength = strToSearch.length(); boolean found = false; if (strToSearch.equals("")) { found = true; } else { for (int pos=0; pos <% /**** VARIABLE DECLARATION and INITIALIZATION *****/ boolean invalidName = false, existingUser = false; boolean withError = false, invalidPwdChar = false, pwdError = true; String strTempDB = "product_tmpClientInfoDB"; String strMainDB = "product_pgpClientInfoDB"; String strFoundAtDB = ""; int intStatus = 0; byte bytAppLvlStatus = 0; String strPwd1 = request.getParameter("userPwd1"); String strPwd2 = request.getParameter("userPwd2"); String strNewName = request.getParameter("userLogName"); /***** MAIN *****/ if (foundInvalidChar(strPwd1) || foundInvalidChar(strPwd2)) { withError = true; invalidPwdChar = true; pwdError = false; } else if (strPwd1.equals(strPwd2)) { pwdError = false; } else { withError = true; } String SQLstmt = "SELECT Usr_LogName FROM tblUserPwd"; strNewName = strNewName.toLowerCase(); if (foundInvalidChar(strNewName)) { withError = true; } else { users.connect(strMainDB); ResultSet rs = users.listQuery(SQLstmt); while (rs.next()) { String strName = rs.getString("Usr_LogName"); strName = strName.toLowerCase(); if (strName.equals(strNewName)) { strFoundAtDB = "mainDB"; invalidName = true; existingUser = true; withError = true; break; } } users.disconnect(); if (invalidName==false) { users.connect(strTempDB); rs = users.listQuery(SQLstmt); while (rs.next()) { String strName = rs.getString("Usr_LogName"); strName = strName.toLowerCase(); if (strName.equals(strNewName)) { strFoundAtDB = "tempDB"; invalidName = true; existingUser = true; withError = true; break; } } users.disconnect(); } } %>
         

Registration >> New User


 

Back to HomePage

<% if (withError) { %> <% if (invalidName) { %>

Your USERNAME exists already! If you are a New User, please enter another and press the Ok button when done. <% if (pwdError) { %>
(Also, your password does not confirm with your second entry.) <% } else if (invalidPwdChar) { %>
(Also, your PASSWORD might be empty or contains one or more invalid characters. Valid characters are "A" to "Z", "a" to "Z", "0" to "9", "@", "-", and "_" with maximum of 12 characters. <% } %>

<% } else if (pwdError) { %>

Your PASSWORD does not confirm with your second entry. Please re-enter data and press the Ok button when done.

<% } else { %>

Your USERNAME/PASSWORD might be empty or contains one or more invalid characters. Valid characters are "A" to "Z", "a" to "Z", "0" to "9", "@", "-", and "_" with maximum of 12 characters. Please re-enter data and press the Ok button when done.

<% } %>

User name:
Password:
Confirm Password:

<% if (existingUser) { %>

If you are an EXISTING SUBSCRIBER and want to add a different company information or you REGISTERED before but did not finish, please press the press the YES button.

<% } %> <% } else { %> <% bytAppLvlStatus = 1; users.connect(strTempDB); users.addUser(strNewName, strPwd1, bytAppLvlStatus); 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.