'' Important code, copy these code to the code profile. (The code profile is a normal ASP file, all public code is placed in this file, and the other needs to call the public code, the file is included in the file.
'' Permissions Verification Code 'RightString: Permissions Skew (all the strings of the user are connected, using all the (,) connections. For example:, 1, 3, 12, 7, 45,' Rightid: Verified Permissions ID, The function of a digital 'program is to find the RightID in the RightString string. If you find it, you're checking that the user has the operation permission' Returns True. If you don't check that the user doesn't have this permission, return false.
function ValidRight (RightString, RightID) if RightString = "" or RightID = "" then ValidRight = false exit functionend if if instr (1, RightString, "," & RightID & ",")> 0 then ValidRight = true else ValidRight = FALSE END IF End Function
'Right Verification Code 2' RightString: Permissions Skew (all the strings of the user connected, using all the (,) connections, and start with a comma, with a comma. ', For example:, 1, 3, 12, 7, 45 , 'RightidString: Verified permission ID string, constituting mode Similar to RightString, but there is no comma on both sides.' The function of the program is to find each permission included in the RightIDString string in the RightString string, if you find any match, ' The user has one of the operation permissions, returns True; if any match is not found, the user does not have the 'any operation permissions included in RightidString, return false .function ValidRight2 (Rightstring, RightidString) if rightstring = "" or rightidstring = "" then ValidRight = false exit functionend if RightIDArr = split (RightIDString, ",") for i = 0 to ubound (RightIDArr) if ValidRight (RightString, RightIDArr (i)) then ValidRight2 = trueexit function end if next ValidRight2 = falseend function