% M_UAdd = fun_chkRight("Staff","E") M_LAdd = fun_chkRight("Login","E") if M_UAdd = 0 and M_LAdd = 0 then %> <% response.end end if%> <% Function selectedVal(oriVal,dataVal) if Trim(oriVal) <> "" and Trim(dataVal) <> "" Then if cstr(oriVal) = cstr(dataVal) Then selectedVal = "selected" else selectedVal = "" end if else selectedVal = "" end if End Function Function checkedVal(oriVal,dataVal) if Trim(oriVal) <> "" and Trim(dataVal) <> "" Then if cstr(oriVal) = cstr(dataVal) Then checkedVal = "checked" else checkedVal = "" end if else checkedVal = "" end if End Function Function checkedInstrVal(oriVal,dataVal) if Trim(oriVal) <> "" and Trim(dataVal) <> "" Then if instr(oriVal,dataVal) > 0 Then checkedInstrVal = "checked" else checkedInstrVal = "" end if else checkedInstrVal = "" end if End Function userId = Trim(Request("userId")) DB_loginId = "" DB_linkNm = "" DB_rights = "" DB_userType = "SU" DB_active = "Y" if userId = "" or isNumeric(userId) = False Then Response.Redirect "userL.asp" Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "select userId, userFnm, userLnm, notes, display from users where userId = " & userId rs.Open strSQL, con, 3, 3 if not rs.EOF Then userArr = rs.GetRows() end if rs.Close if userId <> "" Then strSQL = "select rightId, linkNm, rights from rights where display = 'Y' order by linkNm" rs.Open strSQL, con, 3, 3 if not rs.EOF Then rightsArr = rs.GetRows() end if rs.close strSQL = "select loginId, login, pasword, linkNm, rights, tableNm, colNm, recordId, userType, active from admin where tableNm = 'users' and recordId = " & userId rs.Open strSQL, con, 3, 3 if not rs.EOF Then loginArr = rs.GetRows() DB_loginId = Trim(loginArr(0,0)) DB_linkNm = Trim(loginArr(3,0)) DB_rights = Trim(loginArr(4,0)) DB_userType = Trim(loginArr(8,0)) DB_active = Trim(loginArr(9,0)) tmplinkNmArr = split(Trim(loginArr(3,0)),",") tmprightsArr = split(Trim(loginArr(4,0)),"|") end if rs.Close end if set rs = nothing con.Close set con = nothing %>