rem 得到指定编码开头的菜单组
function menuArray(code,level)
sql=" SELECT n_ID, v_bm, v_name, v_description, v_PicturePath, "&_
" isnull(v_DealPath,'noright.asp') as v_DealPath, c_ShowWay "&_
" FROM hxdf_menu_office "&_
" WHERE (v_bm LIKE '"& code &"%') "
if cint(level)0 then
sql=sql & " AND ( LEN(v_bm) = "& level &" )"
end if
sql=sql & " ORDER BY v_bm "
dim rs
set rs=server.CreateObject("adodb.recordset")
rs.Open sql,conn,1,1
if rs.EOF then
temp=null
else
temp=rs.GetRows
end if
rs.Close: set rs=nothing
menuArray=temp
end function
rem 得到指定用户的指定字段的权限数组
function userRight(tfield, UserID)
sql="SELECT isnull("& tfield &",'0') as "& tfield &" FROM hxdf_user_purview WHERE (c_UserID = '" & UserID & "') "
dim rs
set rs=server.CreateObject("adodb.recordset")
rs.Open sql,conn,1,1
if rs.EOF then
temp=null
else
temp=rs.GetRows
end if
rs.Close: set rs=nothing
userRight=temp
end function
%>