📄 conn.asp
字号:
<%@ LANGUAGE = VBScript.Encode%>
<!--#include file="../setup.asp" -->
<!--#include file="../setup1.asp" -->
<%dim conn
On Error Resume Next '容错声明
response.buffer=true
dim db,connstr
db="#data.asp"
set Conn = server.CreateObject("ADODB.Connection")
connstr="driver={Microsoft Access Driver (*.mdb)};dbq="& server.MapPath("../data/"&db&"")
conn.Open connstr
Function HtmlEncode(Content)
Content = Replace(Content, ">", ">")
Content = Replace(Content, "<", "<")
Content = Replace(Content, "'", "")
HtmlEncode = content
End Function
Function HtmlEncode2(Content)
Content = Replace(Content, ">", ">")
Content = Replace(Content, "<", "<")
Content = Replace(Content, " ", " ")
Content = Replace(Content, "'", "")
Content = Replace(Content, vbcrlf,"<br>")
HtmlEncode2 = content
End Function
function isChkInteger(para)
On Error Resume Next
dim str
dim l,i
if isNUll(para) then
isChkInteger=false
exit function
end if
str=cstr(para)
if trim(str)="" then
isChkInteger=false
exit function
end if
l=len(str)
for i=1 to l
if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
isChkInteger=false
exit function
end if
next
isChkInteger=true
if err.number<>0 then err.clear
end function
Function PageSplit(currentpage,totalpage,pagename)
if currentpage mod 10 = 0 then
Sp = currentpage \ 10
else
Sp = currentpage \ 10 + 1
end if
Pagestart = (Sp-1)*10+1
Pageend = Sp*10
strSplit = "<a href="&pagename&"?pageid=1><font face=webdings title=第一页>9</font></a> "
if Sp > 1 then strSplit = strSplit & "<a href="&pagename&"?pageid="&Pagestart-10&"><font face=webdings title=前十页>7</font></a> "
for j=PageStart to Pageend
if j > totalpage then exit for
if j <> currentpage then
strSplit = strSplit & "<a href="&pagename&"?pageid="&j&">["&j&"]</a> "
else
strSplit = strSplit & "<font color=red>["&j&"]</font> "
end if
next
if Sp*10 < totalpage then strSplit = strSplit & "<a href="&pagename&"?pageid="&Pagestart+10&"><font face=webdings title=后十页>8</font></a>"
strSplit = strSplit & "<a href="&pagename&"?pageid="&totalpage&" ><font face=webdings title=""最后一页"">:</font></a>"
PageSplit = strSplit
End Function%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -