<%
hxStudioAdminName =Session("hxStudioAdminName")
hxStudioAdminDj  =Session("hxStudioAdminDj")
hxStudioAdminAdmin  =Session("hxStudioAdminAdmin")
hxType =session("hxType")
if hxStudioAdminName="" or hxStudioAdminDj="" or hxStudioAdminAdmin="" then
 hxStudioAdminDj=0
end if
if hxStudioAdminDj=4 then
hxStudioCheckAdmin="ok"
hxStudioCheckAdminAll="ok"
elseif hxStudioAdminDj=1 or hxStudioAdminDj=2 then
if Admin<>"" then
  if hxStudioAdminAdmin<>"" then
  tempAdmin=split(hxStudioAdminAdmin, ",")
  for i = 0 to ubound(tempAdmin)
	if trim(tempAdmin(i))=trim(Admin) then
	  hxStudioCheckAdmin="ok"
	  exit for
    end if
  next
  end if
else
hxStudioCheckAdmin="ok"
end if
else
  response.write("<table width=500  border=0 align=center cellpadding=0 cellspacing=0><tr><td><font style='font-size:13px;'><BR><li>您没有进入本页面的权限,本次操作已被记录!<br><li>本页面为<b><font color=#FF0000>[栏目管理员]</font></b>等级以上用户专用，请先<a href=admin.asp target=_top><b><font color=#FF0000>登陆</font></b></a>后进入......</font></td><tr></table>")
  response.end
end if

if hxStudioCheckAdmin<>"ok" then
  response.write("<table width=100%  border=0 align=center cellpadding=0 cellspacing=0><tr><td align=center><font style='font-size:13px;'><BR><li>您没有进入本页面的权限!</font></td><tr></table>")
  response.end
end if

function CheckAdmin(TAdmin,Admin)
  CheckAdmin=false
if hxStudioAdminDj=4 then
CheckAdmin=true
else
  if Admin<>"" then
  tempAdmin=split(Admin,",")
  for i = 0 to ubound(tempAdmin)
	if trim(tempAdmin(i))=trim(TAdmin) then
	  CheckAdmin=true
	  exit for
    end if
  next
  end if
end if
end function

'++++++++加入权限判断开始++++++
function Check_Admin(admin_user)
Check_Admin=False
if admin_user<>"" then 
   set adminrs=conn.execute("select admin_name from [admin] where admin_name='"&admin_user&"'")
   if not adminrs.eof then 
      if Session("hxStudioAdminName")<>adminrs(0) and Session("hxStudioAdminDj")<>4 then
         Check_Admin=true
      end if
   end if
set adminrs=nothing
end if
end function
'++++++++加入权限判断结束+++++
%>

