⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkpurview.asp

📁 天创商务网客户资源管理系统 v1,asp+Access,iis5
💻 ASP
字号:
<%
  Path=Request.ServerVariables("PATH_INFO")
  Num=len(path)-instrRev(Path,"/")
  FileName=lcase(right(path,Num))

  Name=session("Name")
  PassWord=session("PassWord")
  Userid=session("Userid")
  'if name="" then Response.redirect"index.htm"
  set CheckUser = server.createobject("adodb.recordset")
  sql = "select purview,SystemSet,Class from UserManage where UserName='"&Name&"' and password='"&PassWord&"'"
  CheckUser.open sql,conn,1,1
  Purview=CheckUser("purview")
  SystemSet=CheckUser("SystemSet")

  'response.write SystemSet
  'response.end

  select case Purview
  case "管理员"
  case "总编辑"
    Call CheckPurview
  case "录入员"
    Call ClassPurview
	Call CheckPurview
  end select
  
  Sub ClassPurview()
    SmallClass=trim(request.querystring("SmallClass"))
    if request.querystring("newsID")<>"" then
      set rs=conn.execute("select SmallClass from News where NewsID="&request.querystring("newsID")&"")
      if not rs.eof then  SmallClass=rs("SmallClass")
      rs.close
      set rs=nothing
    end if
    if SmallClass="" then SmallClass=request.form("SmallClass")
      ClassCot=split(CheckUser("Class"),",")
      FondError=true
    for i=0 to Ubound(ClassCot)	  
      if SmallClass=trim(ClassCot(i)) then  
        FondError=false
        exit for
      end if
    next
      if FondError=true then
        if SmallClass<>"" then
          Call Wran("操作"&SmallClass&"")
        else
          Call CheckPurview
	  end if
      end if
  End Sub

  Sub CheckAuditing
    select case Purview
     case "总编辑"
      if instr(1,SystemSet,"Auditing")=0 then Call Wran("没有审核商务信息"):response.end
    case "录入员"
      if auditing=false then Call Wran("没有审核商务信息"):response.end
    end select
  End Sub

  Sub CheckAD
    select case Purview
     case "总编辑"
      if instr(1,SystemSet,"AdsManage")=0 then Call Wran("广告管理"):response.end
    case "录入员"
      Call Wran("广告管理")
	  response.end
    end select
  End Sub

  Sub AuditingStat
    select case Purview
     case "总编辑"
      if instr(1,SystemSet,"Auditing")=0 then response.write "Class=InputStyle Disabled"
    case "录入员"
      if auditing=false then response.write "Class=InputStyle Disabled"
    end select
  End Sub

  Sub CheckPurview()
    select case FileName	
    case "classmanage.asp","classsave.asp","classmodify.asp","classsubmit.asp"
      if instr(1,SystemSet,"Category")=0 then
        Call Wran("栏目管理")
      end if
    case "servermanage.asp","servermodify.asp","serversubmit.asp"
      if instr(1,SystemSet,"server")=0 then
        Call Wran("业务管理")
      end if
    case "filemanage.asp"
      if instr(1,SystemSet,"File")=0 then
        Call Wran("文件管理")
      end if
    case "voteadd.asp","votemodify.asp","votemanage.asp"
      if instr(1,SystemSet,"VoteManage")=0 then
        Call Wran("投票管理")
      end if
    case "jsadd.asp","jsdel.asp","jsdelsave.asp","jsmanage.asp","jsmodify.asp"
      if instr(1,SystemSet,"SetJS")=0 then
        Call Wran("JS管理")
      end if
    case "recycle.asp"
      if instr(1,SystemSet,"SetRecycle")=0 then
        Call Wran("回收站管理")
      end if
	case "urlmanage.asp"
      if instr(1,SystemSet,"UrlManage")=0 then
        Call Wran("相关联接管理")
      end if
    case "setup.asp"
      Call Wran("参数设置")
    case "logmanage.asp"
      Call Wran("日志管理")
    case "backupdatabase.asp"
      Call Wran("数据备份")
    case "refurbishnews.asp"
      Call Wran("刷新新闻")
    case "register.asp"
      Call Wran("输入注册号")
	case "scanupdate.asp"
      Call Wran("在线升级")
    end select
  End Sub

  Sub Wran(content)
    CheckUser.close
    set CheckUser=nothing
	if Content="模板管理" or Content="广告管理" then
	  response.redirect"../error.asp?msg="&content&""
	else
	  response.redirect"error.asp?msg="&content&""
	end if
	response.end
  End Sub 
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -