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

📄 login.asp

📁 苹果风格的论坛 asp编写
💻 ASP
字号:
<%response.buffer = true%>
<!--#INCLUDE FILE="inc/db_inc.asp"-->
<!--#INCLUDE FILE="inc/md5_inc.asp"-->
<!--#INCLUDE FILE="inc/char_inc.asp"-->
<!--#INCLUDE FILE="header.asp"-->
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'	Snowman Forum v2.0
'
'	Copyright(C) Snowman, All rights reserved.
'
'	http://www.xinboard.net
'
'	Access版本免费, 欲使用SQL Server商业版本请购买使用权
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

dim StrSql, toptext, rs, rs2, StrHtml, error

StrHtml = loadtemplate("htmltop")
StrHtml = Replace(StrHtml, "{pagetitle}", loadtemplate("logintitle"))
StrHtml = Replace(StrHtml, "{style_path}", loadtemplate("path"))
StrHtml = Replace(StrHtml, "{forumtitle}", boardtitle)
response.write StrHtml
StrHtml = loadtemplate("pagetitle")
StrHtml = Replace(StrHtml, "{title_img}", "<img src=""style/" & loadtemplate("path") & "/image/title.gif"">")

if request.cookies("sf")("username") = "" then
	toptext = loadtemplate("toptextguest")
else
	toptext = loadtemplate("toptextuser")
end if
toptext = toptext & loadtemplate("toptext")
StrHtml = Replace(StrHtml, "{top_text}", toptext)
StrHtml = Replace(StrHtml, "{username}", request.cookies("sf")("username"))
response.write StrHtml
StrHtml = loadtemplate("pagepath")
StrHtml = Replace(StrHtml, "{path_text}", "<img src=""style/" & loadtemplate("path") & "/image/home.gif""><a href=index.asp>" & boardtitle & "</a> &raquo; " & loadtemplate("logintitle"))
response.write StrHtml


step = ChkSql(request("step"))
select case step
	case "2"
		error = ""
		if request("username") = "" then error = error & "<br><li>" & loadtemplate("err_username")
		if request("password") = "" or len(request("password")) < 3 then error = error & "<br><li>" & loadtemplate("err_chkpassword")
		if error <> "" then
			StrHtml = loadtemplate("error")
			StrHtml = Replace(StrHtml, "{error_text}", error)
			response.write StrHtml
			response.end
		end if
		StrSql = "select userid, username, password, pmpopup from sf_user where username = '" & ChkSql(request("username")) & "'"
		Set rs2 = Conn.Execute(StrSql)
		if not (rs2.bof or rs2.eof) then
			if md5(request("password")) = rs2("password") then
				response.cookies("sf")("username")= ChkSql(rs2("username"))
				response.cookies("sf")("password")= md5(request("password"))
				response.cookies("sf")("userid")= rs2("userid")
				response.cookies("sf")("pmpop")= rs2("pmpopup")
				cookietime = ChkSql(request("cookietime"))
				if IsNumeric(cookietime) then
					cookietime = clng(cookietime)
				else
					cookietime = 0
				end if
				if cookietime = 0 then
					'response.cookies("sf").expires = 0
				else
					response.cookies("sf").expires = dateadd("d", cookietime, date())
				end if
				StrSql = "update sf_user set lastvisit = '" & now() & "', lastactivity = '" & now() & "' where username = '" & ChkSql(rs2("username")) & "'"
				Set rs2 = Conn.Execute(StrSql)
				StrHtml = loadtemplate("hint")
				StrHtml = Replace(StrHtml, "{hint_text}", loadtemplate("hint_logined"))
				StrHtml = Replace(StrHtml, "{pro_name}", request("reurl"))
				response.write StrHtml
			else
				StrHtml = loadtemplate("error")
				StrHtml = Replace(StrHtml, "{error_text}", loadtemplate("err_chkpassword"))
				response.write StrHtml
			end if
		else
			StrHtml = loadtemplate("error")
			StrHtml = Replace(StrHtml, "{error_text}", loadtemplate("err_chkpassword"))
			response.write StrHtml
		end if
	case else
		StrHtml = loadtemplate("login")
		if (request.ServerVariables("HTTP_REFERER") = "") or (instr(lcase(request.ServerVariables("HTTP_REFERER")), "login.asp") > 0) then
			StrHtml = Replace(StrHtml, "{reurl}", "index.asp")
		else
			StrHtml = Replace(StrHtml, "{reurl}", server.htmlencode(request.ServerVariables("HTTP_REFERER")))
		end if
		response.write StrHtml
		response.write sfcopyright
end select

response.write loadtemplate("htmlbottom")
response.end
Conn.Close
Set Conn = nothing
Set rs = nothing
Set rs2 = nothing
%>

⌨️ 快捷键说明

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