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

📄 inc.asp

📁 OA最新破解2008版 全新 破解 希望大家用着舒服
💻 ASP
字号:
<%

Dim Conn
Dim Connstr

if not IsObject(Application(ConnName&"Pconn")) then

	Set Application(ConnName&"Pconn")=server.createobject("ADODB.CONNECTION")
	Set Application(ConnName&"PconnI")=server.createobject("ADODB.CONNECTION")
	Set Application(ConnName&"PconnII")=server.createobject("ADODB.CONNECTION")

	db = "data/count.mdb"
		connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
	'	connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(""&db&"")
	Application(ConnName&"Pconn").open Connstr 

	dbI = "data/address.mdb"
		connstrI="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&dbI&"")
	'	connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(""&db&"")
	Application(ConnName&"PconnI").open ConnstrI

	dbII = "data/vister.mdb"
		connstrII="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&dbII&"")
	'	connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(""&db&"")
	Application(ConnName&"PconnII").open ConnstrII 
end if

Set Conn = Application(ConnName&"Pconn")

Function GetRs(Sql)
	Set Rs = Server.CreateObject("ADODB.Recordset")
	Rs.open Sql,Conn,1,1
	Set GetRs = Rs
End Function

Function UIRs(Sql)
	Set Rs = Server.CreateObject("ADODB.Recordset")
	Rs.open Sql,Conn,2,3
	Set UIRs = Rs
End Function

Function Fn_Dir(FilePath)
	for i=1 to len(FilePath)
	if left(right(FilePath,i),1)="/" or left(right(FilePath,i),1)="\" then
	  abc=i
	  exit for
	end if
	next
	if abc <> 1 then
	Fn_Dir=left(FilePath,len(FilePath)-abc+1)
	end if
end Function


	function Fn_IP(ip)
		ip=cstr(ip)
		ip1=left(ip,cint(instr(ip,".")-1))
		ip=mid(ip,cint(instr(ip,".")+1))
		ip2=left(ip,cint(instr(ip,".")-1))
		ip=mid(ip,cint(instr(ip,".")+1))
		ip3=left(ip,cint(instr(ip,".")-1))
		ip4=mid(ip,cint(instr(ip,".")+1))
		Fn_IP=cint(ip1)*256*256*256+cint(ip2)*256*256+cint(ip3)*256+cint(ip4)
	end function

'转译字符
	Function Fn_EnChar(body)
	'	body = Trim(body)
		body = Replace(body,CHR(38),"&#38;")
		body = replace(body,">","&gt;")
		body = replace(body,"<","&lt;")
		body = Replace(body,Chr(10),"<br>")
		body = Replace(body,Chr(13),"")
		
		body = Replace(body,CHR(34),"&quot;")
		body = Replace(body,CHR(39),"&#39;")
		body = Replace(body,CHR(32),"&nbsp;")
		Fn_EnChar = body
	End Function
'还原字符
	Function Fn_DeChar(body)
		body = replace(body,"&gt;",">")
		body = replace(body,"&lt;","<")
		body = Replace(body,"<br>",Chr(10))
		body = Replace(body,"",Chr(13))
		body = Replace(body,"&nbsp;",CHR(32))
		body = Replace(body,"&quot;",CHR(34))
		body = Replace(body,"&#39;",CHR(39))
		body = Replace(body,"&#38;",CHR(38))
		Fn_DeChar = body
	End Function
'
	Function GetWhere(IP)
		db = "data/address.mdb"
		vSql = "select country from address where ip1 <= "&IP&" and ip2 >= "&IP&""

		Set vRs = Server.CreateObject("ADODB.Recordset")
		vRs.open vSql,Application(ConnName&"PconnI"),1,1
	
		if NOT vRs.Eof then
			GetWhere = vRs("country")
		else
			GetWhere = "未知"
		end if
		vRs.close

	End Function
			
	Function RValue(vSql,v)
		Set wRs = UIRs(vSql)
		
		if wRs.eof then
			wRs.AddNew
			wRs("cv") = v
		end if
		
		wRs("cc") = wRs("cc")+1
		wRs.Update
		wRs.close
	End Function

	Function PageSplit(vI,vPageCount,cstate)
		if vI mod 10 = 0 then
			Sp = vI \ 10
		else
			Sp = vI \ 10 + 1
		end if
		Pagestart = (Sp-1)*10+1
		Pageend = Sp*10
		strSplit = "<table width=500 align=center><tr><td align=center>共"&vPageCount&"页 当前第"&vI&"页 &nbsp; &nbsp;<a href=index.asp?act="&cstate&"&AbsolutePage=1><font face=webdings title=第一页>9</font></a>&nbsp;"
		if Sp > 1 then strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&Pagestart-10&"><font face=webdings title=前十页>7</font></a>&nbsp;"
		for j=PageStart to Pageend
			if j > vPageCount then exit for
			if j <> vI then
				strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&j&">["&j&"]</a>&nbsp;"			
			else
				strSplit = strSplit & "<font color=red>["&j&"]</font>&nbsp;"
			end if
		next
		if Sp*10  < vPageCount then strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&Pagestart+10&"><font face=webdings title=后十页>8</font></a>" 
		strSplit = strSplit & "<a href=index.asp?act="&cstate&"&AbsolutePage="&vPageCount&" ><font face=webdings title=""最后一页"">:</font></a></td></tr></table>"
		PageSplit = strSplit
End Function

	Function GetVister(IP)
		db = "data/vister.mdb"
		vSql = "select * from v where ip="&Ip
		

		Application(ConnName&"PconnII").execute("Delete * from v where DateDiff('"&DaType&"',ct,Now())>"&ExpTime&"")

		Set vRs = Server.CreateObject("ADODB.Recordset")
		vRs.open vSql,Application(ConnName&"PconnII"),1,3
	
		if NOT vRs.Eof then
			vRs("MT") = Now()
			vRs.update
			GetVister = true
		else
			vRs.Addnew
			vRs("ip") = ip
			vRs("CT") = Now()
			vRs("MT") = Now()
			vRs.update
			GetVister = false
		end if
		vRs.close

	End Function
%>

⌨️ 快捷键说明

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