📄 main.asp
字号:
<!--#include file="inc/connection.asp"-->
<!--#include file="inc/const.asp"-->
<%
dim LoginName, Pwd
LoginName = replace(trim( request("LoginName") ), "'", "''")
Pwd = trim(request("Pwd"))
if LoginName="" and Pwd="" then
LoginName = session("LoginName")
Pwd = session("pwd")
end if
dim Success
Success = false
dim Rs
Set Rs= server.createobject ("adodb.recordset")
Rs.open "select * from tblUser where LoginName='"& LoginName &"'", Conn, 1,1
if not Rs.eof then
if Pwd = trim(Rs("pwd")) then
Success = true
Session("LoginName") = LoginName
Session("pwd") = Pwd
Session("LoginID") = trim(Rs("ID"))
Session("RealName") = trim(Rs("Name"))
Session("LoginOK")=true
set rstmp=server.createobject ("adodb.recordset")
sql="select * from tblLog where LoginTime>'"&(now()-0.015)&"' and LoginID="& trim(Rs("ID"))
rstmp.open sql,Conn
if not rstmp.eof then
else
Conn.execute ("INSERT INTO tblLog (LoginID,Name,IP,LoginTime) VALUES(" & trim(Rs("ID")) & _
",'" & trim(Rs("Name")) & _
"','" & Request.ServerVariables("Remote_Addr") & _
"','" & now() & _
"')")
end if
rstmp.close
set rstmp=nothing
else
Success = false
end if
else
ErrorMessage = "没有该用户!"
end if
Rs.close
set Rs=nothing
%>
<!-- #include file="inc/connclose.asp" -->
<%
if not Success then
if ErrorMessage="" then ErrorMessage="用户名或密码错误,请重新输入。"
response.redirect("Default.asp?errormessage="& Server.URLencode(ErrorMessage))
response.end
end if
%>
<HTML>
<HEAD>
<TITLE>办公自动化系统</TITLE>
<META NAME="Author" CONTENT="Jamsi">
<META NAME="Keywords" CONTENT="Info Manager">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<FRAMESET rows="100,*,0,0" FRAMEBORDER="0" framespacing="0" bordercolor="#D4CFC7">
<FRAME NAME="Frmtop" SRC="html/top.asp" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMEBORDER="NO" scrolling="no" bordercolor="#000000" noresize>
<FRAME NAME="FrmMain" SRC="office/index.asp" MARGINWIDTH="0" SCROLLING="auto" FRAMEBORDER="NO" noresize>
<FRAME NAME="FrmHidden" SRC="Scripts/Refresh.asp" MARGINWIDTH="0" MARGINHEIGHT="0" FRAMEBORDER="no" scrolling="no" noresize>
</FRAMESET>
<noframes>
</noframes>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -