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

📄 head.asp

📁 支持IE 手机同步访问的WAP论坛社区程序
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001" EnableSessionState = False%><%
Option Explicit
'On Error Resume Next
Server.ScriptTimeout=30
Response.ContentType="Text/Html;Charset=UTF-8"
Response.Expires=-1

Public Const Server_DB_Path="../Database.mdb"
Public Const Server_IPDB_Path="IPData.mdb"

Public Page_Time,Conn,Conn2
Page_Time=Timer
Call Get_Admin()

Rem 版权信息类,请勿修改.
Class xkon
	Rem 程序名称
	Public Function name()
		name="新空程序网 论坛程序"
	End Function
	Rem 程序版本
	Public Function ver()
		ver="1.0"
	End Function
	Rem 程序官方网站
	Public Function Url()
		Url="http://wap.xkon.cn"
	End Function
	Rem 程序升级接口
	Public Function Interface()
		Interface="http://wap.xkon.cn/update/bbs/"
	End Function
End Class
Public Function Get_Admin()
	Dim URL,Cn2,Cn1
	URL=Request.ServerVariables("URL")
	If Mid(URL,InstrRev(URL,"/")+1)<>"DenLu.Asp" Then
		If Request.Cookies("AdminZhangHao")="" Or Request.Cookies("AdminMiMa")="" Then
		Else
			Call OpenData()
				Set Cn1=Server.CreateObject("ADODB.Command")
				Cn1.ActiveConnection=Conn
				Cn1.CommandType=1
				Cn1.CommandText="SELECT * FROM ADMIN WHERE ZHANGHAO='"&Request.Cookies("AdminZhangHao")&"' And MiMa='"&Request.Cookies("AdminMiMa")&"'"
				Set Cn2=Cn1.Execute
				If Cn2.Eof Then
					Set Cn2=Nothing
					Set Cn1=Nothing
					Call CloseData()
					Response.Redirect("DenLu.Asp")
				Else
					Response.Cookies("xkon_Cookies")=Cn2("QuanXian")
				End If
				Set Cn2=Nothing
				Set Cn1=Nothing
			Call CloseData()
		End If
	End If
End Function
Function Read_Cookies(Str)
	If Request.Cookies("xkon_Cookies")="" Then Read_Cookies="0":Exit Function
	Dim Str2
	Str2=Split("FangWen,Admin_MiMa,Admin_Admin,Admin_JBXX,Admin_GG,Admin_Help,Admin_TouXiang,JiLu,DenJi,BanKuai,BanZhu,TieZhi,HuiFu,HuiYuan,XiaoXi,ZiFu_GuoLv,BiaoQing,Data,TiShi,DiaoCha,QunFa,IP",",")
	Dim Str3
	Str3=Split(Request.Cookies("xkon_Cookies")," ")
	Dim i,ii
	For i=0 To Ubound(Str3)
		If Str2(i)=Str Then ii=i:Exit For
	Next
	If ii="" Then
		Call xkon_Error("找不到该Cookies")
	Else
		Read_Cookies=Str3(i)
	End If
End Function
Public Function OpenData()
	On Error Resume Next
	Set Conn=Server.CreateObject("ADODB.Connection")
	Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.Mappath(Server_DB_Path)
	Conn.Open
	If Err Then
		Conn.Close()
		Set Conn=Nothing
		Call xkon_Error("连接数据库出错")
	End If
End Function
Public Function OpenData2()
	On Error Resume Next
	Set Conn2=Server.CreateObject("ADODB.Connection")
	Conn2.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.Mappath(Server_IPDB_Path)
	Conn2.Open
	If Err Then
		Conn2.Close()
		Set Conn2=Nothing
		Call xkon_Error("连接数据库出错")
	End If
End Function
Public Function CloseData()
	On Error Resume Next
	Conn.Close()
	Set Conn=Nothing
	If Err Then
		Call xkon_Error("Database Error")
	End If
End Function
Public Function H_Title1(Title)
	Response.Write("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8""/><title>"&Title&"</title><link rel=""stylesheet"" type=""text/css"" href=""../Inc/xkon.Css"" /></head><body onload=setTimeout(""load.style.display='none';h.style.display='block'"",100) ><div id=""load""><font color=#FF0000>页面载入中...</font><br/></div><div id=""h"" style=""display:none""><input type=button onclick=""window.location.reload()"" value=刷新 /><br/>")
	Response.Flush()
End Function
Public Function H_Title(Title)
	Response.Write("<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html xmlns=""http://www.w3.org/1999/xhtml""><head><meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8""/><title>"&Title&"</title><link rel=""stylesheet"" type=""text/css"" href=""../Inc/xkon2.Css"" /></head><body onload=setTimeout(""load.style.display='none';h.style.display='block'"",100) ><div id=""load""><font color=#FF0000>页面载入中...</font><br/></div><div id=""h"" style=""display:none""><input type=button onclick=""window.location.reload()"" value=刷新 /><br/>")
	Response.Flush()
End Function
Public Function H_End()
	Dim x
	Set x=New xkon
	Response.Write("<br/><br/></div><font size=2 color=#A9A9A9 >程序名称:"&x.Name&"<br/>技术支持:<a target=_blank href="""&x.Url&""">"&x.Url&"</a></font></body></html>")
End Function
Public Function Checkstr(C_Str)
	If IsNull(C_Str) Then Exit Function
	C_Str=Trim(C_Str)
	C_Str=Replace(C_Str,"&","&amp;")
	C_Str=Replace(C_Str,"'","&apos;")
	C_Str=Replace(C_Str,">","&gt;")
	C_Str=Replace(C_Str,"<","&lt;")
	C_Str=Replace(C_Str," ","&nbsp;")
	C_Str=Replace(C_Str,"""","&quot;")
	C_Str=Replace(C_Str,",",",")
	Checkstr=C_Str
End Function
Class xkon_Request
	Public Function Form(xkon_Request_Str)
		xkon_Request_Str=Request.Form(xkon_Request_Str)
		xkon_Request_Str=Checkstr(xkon_Request_Str)
		Form=xkon_Request_Str
	End Function
	Public Function QueryString(xkon_QueryString_Str)
		xkon_QueryString_Str=Request.QueryString(xkon_QueryString_Str)
		xkon_QueryString_Str=Checkstr(xkon_QueryString_Str)
		QueryString=xkon_QueryString_Str
	End Function
	Public Function Form_long(xkon_Request_Str)
		On Error Resume Next
		xkon_Request_Str=Request.Form(xkon_Request_Str)
		If xkon_Request_Str="" Then
			xkon_Request_Str=1
		Else
			xkon_Request_Str=Clng(xkon_Request_Str)
		End If
		If Err Then
			Form_long=1
		End If
		Form_long=xkon_Request_Str
	End Function
	Public Function Form_Str(xkon_Request_Str,d,c)
		Dim xkon_Request_Str1
		xkon_Request_Str1=Checkstr(Request.Form(xkon_Request_Str))
		If xkon_Request_Str1<>"" Then
			If len(xkon_Request_Str1)<d Then
				Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
			End If
			If Len(xkon_Request_Str1)>c Then
				Call xkon_Error("提交的长度不能小于"&c&"位<br/>参数:"&xkon_Request_Str)
			End If
			Form_Str=xkon_Request_Str1
		End If
	End Function
	Public Function QueryString_Str(xkon_Request_Str,d,c)
		Dim xkon_Request_Str1
		xkon_Request_Str1=Checkstr(Request.QueryString(xkon_Request_Str))
		If xkon_Request_Str1<>"" Then
			If len(xkon_Request_Str1)<d Then
				Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
			End If
			If Len(xkon_Request_Str1)>c Then
				Call xkon_Error("提交的长度不能小于"&c&"位<br/>参数:"&xkon_Request_Str)
			End If
			QueryString_Str=xkon_Request_Str1
		End If
	End Function
	Public Function QueryString_long(xkon_Request_Str)
		On Error Resume Next
		xkon_Request_Str=Request.QueryString(xkon_Request_Str)
		If xkon_Request_Str="" Then
			xkon_Request_Str=1
		Else
			xkon_Request_Str=Clng(xkon_Request_Str)
		End If
		If Err Then
			Form_long=1
		End If
		QueryString_long=xkon_Request_Str
	End Function
	Public Function Form_aa(xkon_Request_Str,d,c)
		Dim xkon_Request_Str1
		xkon_Request_Str1=Request.Form(xkon_Request_Str)
		If xkon_Request_Str1<>"" Then
			If aa(xkon_Request_Str1)=False Then
				Call xkon_Error("字符只能是由字母或数字组成<br/>参数:"&xkon_Request_Str)
			End If
			If Len(xkon_Request_Str1)<d Then
				Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
			End If
			If Len(xkon_Request_Str1)>c Then
				Call xkon_Error("提交的长度不能大于"&d&"位<br/>参数:"&xkon_Request_Str)
			End If
			Form_aa=xkon_Request_Str1
		End If
	End Function
	Public Function QueryString_aa(xkon_Request_Str,d,c)
		Dim xkon_Request_Str1
		xkon_Request_Str1=Request.QueryString(xkon_Request_Str)
		If xkon_Request_Str1<>"" Then
			If aa(xkon_Request_Str1)=False Then
				Call xkon_Error("字符只能是由字母或数字组成<br/>参数:"&xkon_Request_Str)
			End If
			If Len(xkon_Request_Str1)<d Then
				Call xkon_Error("提交的长度不能小于"&d&"位<br/>参数:"&xkon_Request_Str)
			End If
			If Len(xkon_Request_Str1)>c Then
				Call xkon_Error("提交的长度不能大于"&d&"位<br/>参数:"&xkon_Request_Str)
			End If
			QueryString_aa=xkon_Request_Str1
		End If
	End Function
End Class
Class xkon_Response
	Public Function Writeln(xkon_Response_Str)
		Response.Write(xkon_Response_Str)
		Response.Write("<br/>")
	End Function
	Public Function WriteHTMLEncode(xkon_Response_Str)
		xkon_Response_Str=CheckStr(xkon_Response_Str)
		Response.Write(xkon_Response_Str)
	End Function
	Public Function Write(xkon_Response_Str)
		Response.Write(xkon_Response_Str)
	End Function
	Public Function WriteUBB(xkon_Response_Str)
		Response.Write(UBB(xkon_Response_Str))
	End Function
End Class
Class xkon_FangWen
	Public Function FangWen()
		Call QuanXian("FangWen","访问后台")
		If Request.Cookies("AdminZhangHao")="" Or Request.Cookies("AdminMiMa")="" Then
			Call xkon_Error("你无权访问后台")
		End If
	End Function
	Public Function Admin_MiMa()
		Call QuanXian("Admin_MiMa","修改密码")
	End Function
	Public Function Admin_Admin()
		Call QuanXian("Admin_Admin","管理站长")
	End Function
	Public Function Admin_JBXX()
		Call QuanXian("Admin_JBXX","设置基本信息")
	End Function
	Public Function Admin_GG()
		Call QuanXian("Admin_GG","管理广告")
	End Function
	Public Function Admin_Help()
		Call QuanXian("Admin_Help","管理帮助")
	End Function
	Public Function Admin_TouXiang()
		Call QuanXian("Admin_TouXiang","管理头像")
	End Function
	Public Function JiLu()
		Call QuanXian("JiLu","查看日志")
	End Function
	Public Function DenJi()
		Call QuanXian("DenJi","管理等级")
	End Function
	Public Function BanKuai()
		Call QuanXian("BanKuai","管理版块")
	End Function
	Public Function BanZhu()
		Call QuanXian("BanZhu","管理版主")
	End Function
	Public Function TieZhi()
		Call QuanXian("TieZhi","管理贴子")
	End Function

⌨️ 快捷键说明

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