?? header.asp
字號:
<%
Dim styleid,userID,username,userpass,userip,useronline,lastonline,usergroup,IPstay
styleid = Request.Cookies(JBBMasterCookies)("styleid")
userID = request.Cookies(JBBMasterCookies)("userID")
username = request.Cookies(JBBMasterCookies)("username")
userpass = request.Cookies(JBBMasterCookies)("userpass")
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")
'------------------------------------------------------
if IsNumeric(userID) and username <> "" and userpass <> "" then
set rsu = Conn.ExeCute("select userid,lastonline,usergroup,Cent from JBB_user where userid="&Cstr(userid) &" and username='"& username &"' and userpass='"& userpass &"'")
if Not(rsu.Eof and rsu.bof) then
useronline = true
lastonline = trim(rsu(1))
usergroup = rsu("usergroup")
Cent = rsu("Cent")
if IsDate(lastonline) then
lastonline = formatdatetime(lastonline,2)&" "& formatdatetime(lastonline,4)
End if
End if
set rsu = nothing
End if
if usergroup="" then usergroup = 6
'------------------------------------------------------
if Not(IsArray(Application(JBBMasterCookies&"BBS_Config"))) then
set rs = Conn.ExeCute("select top 1 Board_name,Board_Url,Home_name,Home_Url,master_Email,Board_close,Board_closecause,userreg,usernameshort,usernamelong,useremailonly,usernamestay,userregagree,IPstay,useronlinetiem,homeshowuseronline,useronlinecount,useronlinecounttime from JBB_config")
if not rs.eof then
dim ConfigArray()
Redim ConfigArray(18)
ConfigArray(0) = rtrim(rs(0))
ConfigArray(1) = rtrim(rs(1))
ConfigArray(2) = rtrim(rs(2))
ConfigArray(3) = rtrim(rs(3))
ConfigArray(4) = rtrim(rs(4))
ConfigArray(5) = rs(5)
ConfigArray(6) = rtrim(rs(6))
ConfigArray(7) = rs(7)
ConfigArray(8) = rtrim(rs(8))
ConfigArray(9) = rtrim(rs(9))
ConfigArray(10) = rs(10)
ConfigArray(11) = rtrim(rs(11))
ConfigArray(12) = rtrim(rs(12))
ConfigArray(13) = rtrim(rs(13))
ConfigArray(14) = rtrim(rs(14))
ConfigArray(15) = rs(15)
ConfigArray(16) = rtrim(rs(16))
ConfigArray(17) = rtrim(rs(17))
Application.Lock
Application(JBBMasterCookies&"BBS_Config")=ConfigArray
Application.UnLock
end if
set rs = nothing
'response.write "論壇配置信息獲取完畢!~"
end if
BBS_Config=Application(JBBMasterCookies&"BBS_Config")
'response.write BBS_Config(15)
'--------------------------------------------------------------
if Application(JBBMasterCookies&"user_Group")<>1 then
sql="select groupID,groupName,viewBoard,viewothers,viewuserinfo,SearchBoard,editproinfo,postnew,replyown,replyothers,upcount,editpost,delpost,movepost,closepost,delthread,pollnew,vote,usepm,pmcount,viewonline,viewonlineip from JBB_usergroup order By groupID asc"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then
dim user_Group_Array()
Redim user_Group_Array(22)
for g = 1 to rs.recordcount
user_Group_Array(0)=rs(0)
user_Group_Array(1)=rs(1)
user_Group_Array(2)=rs(2)
user_Group_Array(3)=rs(3)
user_Group_Array(4)=rs(4)
user_Group_Array(5)=rs(5)
user_Group_Array(6)=rs(6)
user_Group_Array(7)=rs(7)
user_Group_Array(8)=rs(8)
user_Group_Array(9)=rs(9)
user_Group_Array(10)=rs(10)
user_Group_Array(11)=rs(11)
user_Group_Array(12)=rs(12)
user_Group_Array(13)=rs(13)
user_Group_Array(14)=rs(14)
user_Group_Array(15)=rs(15)
user_Group_Array(16)=rs(16)
user_Group_Array(17)=rs(17)
user_Group_Array(18)=rs(18)
user_Group_Array(19)=rs(19)
user_Group_Array(20)=rs(20)
user_Group_Array(21)=rs(21)
Application.Lock
Application(JBBMasterCookies&"user_group"&rs(0))=user_Group_Array
Application.UnLock
rs.movenext
next'g
Application.Lock
Application(JBBMasterCookies&"user_group")=1
Application.UnLock
'response.write "成功獲取所有用戶組數據,共"&rs.recordCount
else
response.write "論壇用戶組不存在,請檢查數據庫或者聯系作者"
rs.close
set rs = nothing
response.End()
end if
rs.close
set rs = nothing
end if
user_Group=Application(JBBMasterCookies&"user_Group"&usergroup)
'response.write user_Group(1)&"_"&user_Group(0)&"_"&user_Group(21)
'--------------------頁面頭部開始----------------------------
function top()
if BBS_Skin(4) <> True then response.write BBS_Skin(0)
response.write "<script language=""JavaScript"">"
response.write "<!--"&chr(10)
response.write "function openstyle() {"
response.write "var Win = window.open('My_style.asp', 'newwindow', 'height=100, width=280, top=200,left=260, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no,status=no');"
response.write "}"
response.write "// -->"
response.write "</script>"
response.Write "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""Menu-table"">"
response.Write "<tr><td>"
if useronline <> true then
response.Write("<b>» 游客</b> | <a href=""login.asp?action=login"">登錄</a> | <a href=""register.asp"">注冊</a> |")
else
response.Write("<b>» "&username &"</b> | <a href=""login.asp?action=logout"">退出</a> | <a href=""pm.asp"">悄悄話</a> | <a href=""usercp.asp"">控制面板</a> | ")
End if
response.write " <a href=""search.asp"">搜索</a> | <a href=""userlist.asp?action=new"">會員</a> "
response.write " | <a href=""#"" onClick=""openstyle()"">風格</a> | <a href=""faq.asp"">幫助</a> "
if usergroup <= 4 then
response.Write(" | <a href=""logs.asp"">日志</a>")
End if
if usergroup = 1 then
response.Write(" | <a href=""admin/""><font color=red>管理</font></a>")
End if
response.write "</td></tr></table>"
if BBS_Skin(4) <> True then response.write "<br><br>"
if BBS_Skin(4) = True then response.write BBS_Skin(0)
End function
'----------------------頁面頭部結束--------------------------
function Bottom()
if BBS_Skin(6) = true then response.write Trim(BBS_Skin(5))
endtime=timer()*1000
response.write"<div align=""center"">< <a href=""mailto:"& BBS_Config(4) &""">聯系我們</a> - <a href="""& BBS_Config(3) &""">"& BBS_Config(2) &"</a> >"&_
"<br><br><br>Powered by: <a href=""http://www.joinboard.net"" target=""_blank"">JoinBoard</a> V2.3<br>"&_
"Copyright © <a href=""http://Youmeng.com"" target=""_blank"">YouMeng Studio.</a> 2003, 2004.<br>"&_
"頁面加載時間:"&formatnumber(endtime-startime,1,-1)&"毫秒<br>"&chr(10)
if BBS_Skin(6) <> true then response.write Trim(BBS_Skin(5))
response.write "</div></body>"&chr(10)&_
"</html>"
'-----------檢測是否有新的悄悄話---------------
if useronline = true then
set rspm = Conn.execute("select pm_id from JBB_pm where userid="&userid &" and receipt=0 and inform=0")
if Not rspm.eof then
Conn.ExeCute("update JBB_pm set inform=1 where userid="&userid)
if right(request.ServerVariables("SCRIPT_NAME"),6) <> "pm.asp" then
response.Write("<script language=javascript>if (confirm('您有新的悄悄話,點擊確定立即閱讀,點擊取消以后閱讀。')) {location.href='pm.asp'}</script>")
End if
End if
set rspm = nothing
End if
End function
'-----------------------------------------------
IPstay = BBS_Config(13)
if BBS_Config(5)=True then
%>
<!--#include file="STYLE.ASP"-->
<%
response.Write"<html>"&chr(10)&_
"<head>"&chr(10)&_
"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"&chr(10)&_
"<meta name=""keywords"" content=""joinboard,forum,bbs,youmeng,友盟論壇"">"&chr(10)&_
"<title>"& BBS_Config(0) &" - 系統信息 - 論壇關閉</title>"&chr(10)&_
"<link href="& Css_path &" rel=""stylesheet"" type=""text/css"">"&chr(10)&"</head>"&chr(10)&_
"<body leftmargin=""0"" topmargin=""0"">"&chr(10)
Call top()
ShowMsg BBS_Config(6)
Call Bottom
Application.Lock
Application(JBBMasterCookies & "conn") = ""
Application.UnLock
response.end
End if
'-----------------------------------------------
if userip <> "" and IPstay <> "" then
IpStr=Split(IPstay,",",-1,1)
For ip = 0 To UBound(IpStr,1)
if Instr(userip,IpStr(ip)) => 1 then
%>
<!--#include file="STYLE.ASP"-->
<%
response.Write"<html>"&chr(10)&_
"<head>"&chr(10)&_
"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"&chr(10)&_
"<meta name=""keywords"" content=""joinboard,forum,bbs,youmeng,友盟論壇"">"&chr(10)&_
"<title>"& BBS_Config(0) &" - 系統信息 - IP禁止 </title>"&chr(10)&_
"<link href="& Css_path &" rel=""stylesheet"" type=""text/css"">"&chr(10)&"</head>"&chr(10)&_
"<body leftmargin=""0"" topmargin=""0"">"&chr(10)
Call top()
ShowMsg "對不起!~ 您的IP被本站管理員禁止!"
Call Bottom
response.End
End if
Next
End if
'---------------------------
Function checkUrl()
Dim server_v1,server_v2
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.Write("您提交的路徑有誤,請不要從本站以外的URL向本站提交數據")
response.End()
end if
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -