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

📄 conn.asp

📁 一个综合类整站
💻 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, ">", "&gt;") 
  Content = Replace(Content, "<", "&lt;")
  Content = Replace(Content, "'", "") 
  HtmlEncode = content 
End Function

Function HtmlEncode2(Content)
  Content = Replace(Content, ">", "&gt;") 
  Content = Replace(Content, "<", "&lt;")
  Content = Replace(Content, " ", "&nbsp;")
  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>&nbsp;"                            
if Sp > 1 then strSplit = strSplit & "<a href="&pagename&"?pageid="&Pagestart-10&"><font face=webdings title=前十页>7</font></a>&nbsp;"                            
for j=PageStart to Pageend                            
if j > totalpage then exit for                            
if j <> currentpage then                            
strSplit = strSplit & "<a href="&pagename&"?pageid="&j&">["&j&"]</a>&nbsp;"			                            
else                            
strSplit = strSplit & "<font color=red>["&j&"]</font>&nbsp;"                            
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 + -