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

📄 checklogin.asp

📁 一套基于asp的网络办公系统!功能类似于oa
💻 ASP
字号:
<!--#INCLUDE FILE="data.asp" -->

<%
if request("username")="" and request("password")=""  then
	Session("Ulogin")="no"
	Response.Redirect("login.asp?id=error")
	session.abandon()

else

'----------------------------------------

 Uname=trim(request("username"))
  Upass=trim(request("password"))
    Uname=replace(Uname,"'","")
  Upass=replace(Upass,"'","")


'------------------------------------------
	
	Set rs= Server.CreateObject("ADODB.Recordset") 
	strSql="select * from user where username='"&Uname&"' and pwd='"&Upass&"'"
	rs.open strSql,Conn,1,3 
	if rs.eof then
		Session("Ulogin")="no"
		response.redirect "login.asp?id=error"
'-------------------------------------------------------
	IP= Request.ServerVariables("REMOTE_ADDR")
    nowtime=now()
    sj=cstr(year(nowtime))+"-"+cstr(month(nowtime))+"-"+cstr(day(nowtime))+" "+cstr(hour(nowtime))+":"+right("0"+cstr(minute(nowtime)),2)+":"+right("0"+cstr(second(nowtime)),2)
	shijian=cstr(year(nowtime))+right("0"+cstr(month(nowtime)),2)+right("0"+cstr(day(nowtime)),2)+right("0"+cstr(hour(nowtime)),2)+right("0"+cstr(minute(nowtime)),2)
  

'-----------------------------------------------------------		
    else  
		if rs("shenhe")=false then
			response.redirect "login.asp?id=pass"
		end if
		
		'response.end
		rs("state")=true
		rs("loginIP")=IP
		rs("Utime")=shijian
		rs("times")=rs("times")+1
		
		rs.update
		Session("Uid")=rs("id")
		Session("Uname")=rs("username")
		Session("Rname")=rs("name")
		Session("Upass")=rs("pwd")
		Session("Upart")=rs("part")
		Session("Urule")=rs("rule")
		Session("tel")=rs("phone")
		Session("Utime")=rs("Utime")
		Session("IP")=rs("logIP")
		Session("Ulogin")="yes"
		Session("email")=rs("email")
		session("mobile")=rs("mobile")
		session("time")=rs("time")
		
		'----------------邮箱系统专用环境变量,请勿删除-------------------
			Session("id")=rs("username")
			Session("pwd")=rs("pwd")
			Session("level")=rs("ilevel")
			Session("iPageSize")=rs("iPageSize")
			Session("iAdd")=rs("iAdd")
			Session("iBegin")=rs("iBegin")
			Session("num")=0
		'----------------邮箱系统专用环境变量,请勿删除-------------------
		response.redirect("main.asp")
	%>


<script language="JavaScript">
<!--
function tmt_fullscreen(url, scrollo) {
    var larg_schermo = screen.availWidth - 10;
    var altez_schermo = screen.availHeight - 75;
    window.open(url, "", "width=" + larg_schermo + ",height=" + altez_schermo + ",top=0,left=0,menubar=yes,scrollbars=yes" );
}
//tmt_fullscreen("main.asp");


// -->
</script>

<%
	end if
	
end if

 rs.Close 
 Conn.Close 
 set Conn = nothing 
 

%>

⌨️ 快捷键说明

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