Here is more of the code: ( this is bits of the code.... )
Private Sub GetPrefixInfo()
'Put user code to initialize the page here
Dim occAssocInfo As cAssocInfo = New cAssocInfo()
Dim odsPrefixInfo As dsPrefixData = New dsPrefixData()
Dim selAlpha As Char
'Get Store ID, Employee and Contractor Prefixes
odsPrefixInfo = occAssocInfo.GetPrefix()
Session.Clear()
Session("iEmpPrefix") = odsPrefixInfo.usp_GetPrefix(0).emp_prefix
Session("iContrPrefix") = odsPrefixInfo.usp_GetPrefix(0).contr_prefix
Session("sBarCodeDir") = odsPrefixInfo.usp_GetPrefix(0).seq_descr
Session("PageID") = "Main"
Session("iStoreID") = iStoreID
Session("UIDType") = UIDType
--------------------------
Function getStoreNumberFromIP()
Dim sIPAddress As String
Dim iSplitID As Integer
sIPAddress = Request.ServerVariables("REMOTE_ADDR")
iSplitID = CInt(sIPAddress.Split("."c)(1))
'Identify all valid store id
If iSplitID < 2 Or iSplitID > 99 Then
iSplitID = 999
End If
Return iSplitID
End Function
----------------------------------------
'Find the user on the email list
Try
GRSearch.Filter = "(&(objectCategory=user)(mail=" & UID & "*))"
oResults = GRSearch.FindAll()
'Determine if the user is in the group of valid users
For Each oResult In oResults
For iMemCount = 0 To
oResult.GetDirectoryEntry().Properties("memberOf").Count - 1
strMember = oResult.GetDirectoryEntry().Properties("memberOf")(iMemCount)
iEqlIdx = strMember.IndexOf("=", 1)
iComIdx = strMember.IndexOf(",", 1)
strGroupName = strMember.Substring(iEqlIdx + 1, (iComIdx - iEqlIdx) - 1)
'Check if the Group is a valid user or not
If strGroupName = GRAdminGroup Then
UIDType = "Admin"
bValid = True
End If
If strGroupName = GRUserGroup Then
UIDType = "User"
bValid = True
End If
'Check if there is a Store Group for the user
If Len(strGroupName) >= 7 Then
If UCase(strGroupName.Substring(0, 5)) = "STORE" Then
'Extract StoreID
If IsNumeric(strGroupName.Substring(5, 2)) Then
iStoreID = CInt(strGroupName.Substring(5, 2))
End If
End If
End If
Next
Next
Catch e1 As Exception
Return False
End Try
================================================
This is not in order, but the bits the seem to have to do with the
validating the user...
thanks.