%@LANGUAGE="VBScript"%>
<%'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'FILE NAME: edit_assoc.asp
'PURPOSE:
'HISTORY:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''%>
<%Option Explicit%>
<%Response.Expires = 0%>
<%
dim strUserName
dim strPassword
dim btnSubmit
dim strLoginErrorMessage
dim strLogoutMessage
dim logout
strUserName = request("username")
strPassword = request("password")
btnSubmit = request("btnSubmit")
strLoginErrorMessage = ""
Session.Timeout = 420
logout= request("logout")
if logout = "true" then
objSessionData.Item ("sintCurrentUserID") = 0
objSessionData.Item ("sintCurrentUserTypeID") = 0
objSessionData.Item ("sintCurrentProjectID") = 0
objSessionData.Item ("svchCurrentProjectNumber") = 0
objSessionData.Item ("sintCurrentMemberTypeID") = 0
objSessionData.item ("svchCurrentUserName") = null
intCurrentUserTypeID = 0
intCurrentMemberTypeID = 0
intCurrentUserID = 0
strLogoutMessage = "You have been logged out of the system."
end if
if btnSubmit <> "" then
'define recordset object
dim rsContactInfo
set rsContactInfo = server.createobject("adodb.recordset")
'define command object
dim cmdContactInfo
set cmdContactInfo = server.createobject("adodb.command")
with cmdContactInfo
.activeconnection = conNerveCenterM8
.commandtext = "sp_select_cm_ContactsLogin"
.commandtype = adCmdStoredProc
'Create and append parameter to Command object for input to stored procedure
.parameters.append .CreateParameter("@intCMContactsUserLogin", adVarChar, adParamInput,30, strUserName)
.parameters.append .CreateParameter("@intCMContactsPassword", adVarChar, adParamInput,30, strPassword)
'execute stored procedure
set rsContactInfo = .execute
'clear command object
set .activeconnection = nothing
set cmdContactInfo = nothing
end with
if rsContactInfo.EOF <> true then
'set session id's for new logged in user
objSessionData.item("sintCurrentUserID") = IntegerConvert(rsContactInfo("intCMContactsIDPK"))
objSessionData.item("sintCurrentUserTypeID") = IntegerConvert(rsContactInfo("intCMContactsContactTypesIDFK"))
objSessionData.item("svchCurrentUserName") = rsContactInfo("vchCMContactsFirstName") & " " & rsContactInfo("vchCMContactsLastName")
if IntegerConvert(objSessionData.item("sintCurrentUserTypeID")) = ncContactTypeNFAID then
strLoginErrorMessage = "Login was unsuccessful, please try again."
elseif IntegerConvert(objSessionData.item("sintCurrentUserTypeID")) = ncContactTypeUserID then
response.redirect "NervecenterM9/nc_home/master/nc_home.asp"
elseif IntegerConvert(objSessionData.item("sintCurrentUserTypeID")) = ncContactTypeProspectID then
response.redirect "NervecenterM9/f1/manager/index.asp"
elseif IntegerConvert(objSessionData.item("sintCurrentUserTypeID")) < ncContactTypeUserID then
response.redirect "NervecenterM9/nc_home/master/nc_home.asp"
else
strLoginErrorMessage = "Login was unsuccessful, please try again."
end if
else
strLoginErrorMessage = "Login was unsuccessful, please try again."
end if
'close recordset
rsContactInfo.close
set rsContactInfo = nothing
End if
%>
Welcome to Thirdeye Communications