permission.asp

来自「投资管理系统, asp+ mssql server」· ASP 代码 · 共 51 行

ASP
51
字号
<!--#include file="../../inc/conn.asp"-->
<%
response.expires=-1
session.timeout=1200
if Session("LoginName")="" or Session("LoginOK")=False or Session("Pwd")="" then
	%>
	<!-- #include file="../../inc/close.asp" -->
	<%
	ErrorMessage="请登录后再维护!"
	response.redirect("../../index.asp?errormessage="& Server.URLencode(ErrorMessage))
end if

set rs=server.createobject("adodb.recordset")
sql="select * from tblYeZhuBase where LoginName='" & Session("LoginName")&"'"
rs.open sql,conn,1,1
dim r_Rights,ID
Session("Name")=trim(rs("Name"))
Session("Zerenren")=trim(rs("Zerenren"))
Session("Lianxiren")=trim(rs("Lianxiren"))
Session("Address")=trim(rs("Address"))
Session("PostCode")=trim(rs("PostCode"))
Session("Fax")=trim(rs("Fax"))
Session("Tel")=trim(rs("Tel"))
Session("EMail")=trim(rs("EMail"))

if rs.eof then
	rs.close
    Session("LoginName") = ""
	Session("LoginOK")= false
	Session("Name")= ""
	%>
	<!-- #include file="../../inc/close.asp" -->
	<%
	response.Redirect "../../index.asp"
elseif trim(rs("pwd"))<>Session("Pwd") then
	rs.close
    Session("LoginName") = ""
	Session("LoginOK")= false%>
	<!-- #include file="../../inc/close.asp" -->
	<%
	ErrorMessage="请输入正确的用户名称和密码。"
	response.redirect("../../index.asp?errormessage="& Server.URLencode(ErrorMessage))
elseif trim(rs("pwd"))=Session("Pwd") then
	rs.close
	set rs=nothing%>
	<!-- #include file="../../inc/close.asp" -->
<%
end if
%>

⌨️ 快捷键说明

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