|
|
<% if (intConflictStatus == 80000000) { %>
<%
} else {
String SQLstmt = "SELECT Pwd_ID, ApplicLvlStatus FROM tblUserPwd WHERE Usr_LogName=\"" + strUserLogName + "\";";
if (strWhatDB.equals("mainDB")) {
users.connect(strMainDB);
} else {
users.connect(strTempDB);
}
ResultSet rs = users.listQuery(SQLstmt); // GET THE ASSIGNED VALUE FOR Usr_ID AND ApplicLvlStatus
while (rs.next()) {
intUserID = rs.getInt("Pwd_ID");
intStatus = rs.getInt("ApplicLvlStatus");
}
if (intStatus != 9) { // IF THEY HAVE NOT BEEN UPDATED YET
int intCoID = 0;
intCompanyID = intUserID;
if (intStatus != 2) { // IF USER IS GOING TO BE OR ALREADY A MULTI-ACCT USER
SQLstmt = "UPDATE tblUserInfo SET Usr_MultiStatus=(Usr_MultiStatus+1) WHERE Usr_ID=" + intUserID + ";";
users.updateData(SQLstmt); // INCREMENT CURRENT VALUE OF Usr_MultiStatus BY 1.
}
SQLstmt = "UPDATE tblUserPwd SET ApplicLvlStatus=9 WHERE Usr_LogName=\"" + strUserLogName + "\";";
users.updateData(SQLstmt);
if (strWhatDB.equals("mainDB")) { // CHECKS IF ACTIVE DATABASE IS ALREADY THE TEMP DATABASE
users.disconnect();
users.connect(strTempDB);
}
String strBlankLogName = "";
String strUserID = "" + intUserID;
if (intStatus != 2) {
bytApplicLvlStatus = 10;
users.addUser(strBlankLogName, strUserID, bytApplicLvlStatus);
SQLstmt = "SELECT MAX(Pwd_ID) AS Pwd_ID FROM tblUserPwd where Usr_LogName=\"" + strBlankLogName + "\" and Usr_Pwd=\"" + strUserID + "\";";
rs = users.listQuery(SQLstmt); // GET A NEW VALUE FOR COMPANYID
while (rs.next()) {
intCoID = rs.getInt("Pwd_ID");
}
intCompanyID = (intCoID + 80000000);
}
strCoRefName = " ";
users.addCompanyInfo(intCompanyID, intUserID, strCompanyName, strCoRefName, strUserPosition, intConflictStatus);
users.disconnect(); // Disconnects with strTempDB
users.connect(strMainDB);
SQLstmt = "INSERT INTO tblSubscriptionType VALUES (" + intCompanyID + "," + intSType + ");";
users.updateData(SQLstmt);
users.disconnect(); // Disconnects with strMainDB
%>
<% } else { %>
<% 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.
|