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

📄 inc_top.asp

📁 一个不错的ASP论坛源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
dim mLev, strLoginStatus,whereSql

function remoteIP()	
	
	remoteIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")	
	if remoteIP = "" then		
		remoteIP = Request.ServerVariables("REMOTE_ADDR")	
	end if
end function


set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString


if (strAuthType = "nt") then
	call NTauthenticate()
	if (ChkAccountReg() = "1") then
		call NTUser()
	end if
end if

	strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
	strDBNTFUserName = Request.Form("Name")
	if strAuthType = "nt" then
		strDBNTUserName = Session(strCookieURL & "userID")
		strDBNTFUserName = Session(strCookieURL & "userID")
	end if

	
select case Request.Form("Method_Type")
	case "login"
		select case ChkUser2(strDBNTFUserName, Request.Form("Password"))
			case 1, 2, 3, 4
				Call DoCookies(Request.Form("SavePassword"))
				strLoginStatus = 1
			case else
				strLoginStatus = 0
			end select
	case "logout"
		Call ClearCookies()
				'delete user if exists
				SQL = "DELETE FROM " & strTablePrefix & "ONLINE WHERE " & strTablePrefix & "ONLINE.UserID = '" & strDBNTUserName & "'"
				my_conn.Execute SQL
				SQL = "DELETE FROM " & strTablePrefix & "ONLINE WHERE " & strTablePrefix & "ONLINE.UserID = '" & remoteIP() & "Guest" & "'"
				my_Conn.Execute SQL
		
end select

mLev = cint(ChkUser2(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
if request.serverVariables("PATH_INFO") <> (strCookieURL & "admin_login.asp") then
if (Application("down") AND mLev <> 4) then
response.redirect "mods/down.asp"
end if
end if


strYOffset=180
strStaticYOffset=40
strMenuWidth=140

Response.Write	"<html>" & vbcrlf & vbcrlf & _
				"<head>" & vbcrlf & _
				"<title>" & strForumTitle & "</title>" & vbcrlf & _
				"<meta name=""copyright"" content=""Snitz Forums 2000 Version 3.1 SR4 资源搜罗站汉化修改(http://www.99ss.net)"">" & vbcrlf


				%>
<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function openWindow(url) {
  popupWin = window.open(url,'new_page','width=400,height=400')
}
function openWindow2(url) {
  popupWin = window.open(url,'new_page','width=400,height=450')
}
function openWindow3(url) {
  popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')
}
function openWindow4(url) {
  popupWin = window.open(url,'new_page','width=400,height=525')
}
function openWindow5(url) {
popupWin = window.open(url,'new_page','width=400,height=500,scrollbars=1')
}
function openpollWindow(url) {
  popupWin = window.open(url,'new_page','width=300,height=400')
}
function openAnnounceWindow(url) {
  popupWin = window.open(url,'new_page','width=300,height=400,scrollbars=1')
}

// done hiding -->
</script>
<style type=text/css><!--
a:link    {color:<% =strLinkColor %>;text-decoration:<% =strLinkTextDecoration %>}
a:visited {color:<% =strVisitedLinkColor %>;text-decoration:<% =strVisitedTextDecoration %>}
a:hover   {color:<% =strHoverFontColor %>;text-decoration:<% =strHoverTextDecoration %>}
input.radio {background: <% = strPopUpTableColor %>; color:#000000}
font {  font-size: 9pt; line-height: 13pt; FONT-FAMILY:<% =strDefaultFontFace %>}
td {  font-size: 9pt; line-height: 13pt; FONT-FAMILY:<% =strDefaultFontFace %>}
textarea { BACKGROUND-COLOR: #e8e8e8; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000;; font-size: 9pt ;FONT-FAMILY:<% =strDefaultFontFace %>}
input { BACKGROUND-COLOR: #e8e8e8; BORDER-BOTTOM: 1px double; BORDER-LEFT: 1px double; BORDER-RIGHT: 1px double; BORDER-TOP: 1px double; COLOR: #000000;; font-size: 9pt; FONT-FAMILY:<% =strDefaultFontFace %>}

--></style>
<% If intSideMenu = 1 then %>
<!--#include file="popout_script.asp"-->
<% End if
	If intPollMentor = 1 then %>
<!--#include file="inc_pollmentor.asp"-->
<% End If %>
</HEAD>
<%
' WHOS ONLINE SCRIPT
Dim strOnlinePathInfo, strOnlineQueryString, strOnlineLocation
Dim strOnlineUser, strOnlineDate, strOnlineCheckInTime, strOnlineTimedOut
Dim strOnlineUsersCount, strOnlineGuestsCount, strOnlineMembersCount
Dim strOnlineGuestUserIP

' ******************************************************
' ADD HERE WHAT YOU WANT THE PREFIX OF YOUR COOKIE TO BE
' it will either be 'strCookieURL' or 'strUniqueID'
strTempCookieType = strUniqueID
' ******************************************************




Function OnlineSQLencode(byVal strPass)
 If not isNull(strPass) and strPass <> "" Then
 	strPass = Replace(strPass, "%", "'%'")
 	strPass = Replace(strPass, "'", "''")
 	strPass = Replace(strPass, "|", "'|'")
 	OnlineSQLencode = strPass
 End If
End Function

Function OnlineSQLdecode(byVal strPass)
 If not isNull(strPass) and strPass <> "" Then
 	strPass = Replace(strPass, "'%'", "%")
 	strPass = Replace(strPass, "''", "'")
 	strPass = Replace(strPass, "'|'", "|")
 	OnlineSQLdecode = strPass
 End If
End Function


' LETS GET WHAT PAGE THEY ARE ON
strOnlinePathInfo = Request.ServerVariables("Path_Info")
strOnlineQueryString = Request.QueryString

' TRY AND FIND OUT WHAT PAGE THEY ARE ON
If lcase(Right(strOnlinePathInfo, 9)) = "forum.asp" Then
	strOnlineLocation = "<a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a>"
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "default.asp" Then
	strOnlineLocation = "<a href=""default.asp"">论坛首页</a>"
ElseIf lcase(Right(strOnlinePathInfo, 9)) = "topic.asp" Then
	strOnlineLocation = "查看主题' <a href=""link.asp?TOPIC_ID=" & Request.QueryString("TOPIC_ID") & """>" & Request.QueryString("Topic_Title") & "</a> '"
ElseIf lcase(Right(strOnlinePathInfo, 8)) = "post.asp" Then
	If Request.QueryString("method") = "Reply" Then
		strOnlineLocation = "回复主题' <a href=""topic.asp?" & strOnlineQueryString & """>" & ChkString(Request.QueryString("Topic_Title"),"title") & "</a> '"
	ElseIf Request.QueryString("method") = "Topic" Then
		strOnlineLocation = "发表新主题 ' <a href=""forum.asp?" & strOnlineQueryString & """>" & Request.QueryString("Forum_Title") & "</a> '"
	Else
		strOnlineLocation = "不知道在做什么"
	End If
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "active.asp" Then
	strOnlineLocation = "<a href=""active.asp"">浏览最新文章</a>"
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "members.asp" Then
	strOnlineLocation = "<a href=""members.asp"">浏览论坛会员列表</a>"
ElseIf lcase(Right(strOnlinePathInfo, 10)) = "search.asp" Then
	strOnlineLocation = "<a href=""search.asp"">好像准备搜寻什么东西似的</a>"
ElseIf lcase(Right(strOnlinePathInfo, 7)) = "faq.asp" Then
	strOnlineLocation = "<a href=""faq.asp"">正在查看帮助说明</a>"
ElseIf lcase(Right(strOnlinePathInfo, 15)) = "pop_profile.asp" Then
	If Request.QueryString("mode") = "Display" Then
		strOnlineLocation = "<a href=""pop_profile.asp?" & strOnlineQueryString & """>正在修改个人资料</a> '"
	Else
		strOnlineLocation = "个人资料"

⌨️ 快捷键说明

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