📄 classmenu.asp
字号:
strTemp = strTemp & ","
strTemp = strTemp & totalrec
strTemp = strTemp & ","
strTemp = strTemp & PageNum
strTemp = strTemp & ",'"
strTemp = strTemp & strLink
strTemp = strTemp & "','"
strTemp = strTemp & ExtName
strTemp = strTemp & "','"
strTemp = strTemp & ListName
strTemp = strTemp & "');"
strTemp = strTemp & "</script>" & vbNewLine
ShowHtmlPage = strTemp
End Function
Public Function htmlshowpage(page,Pcount,totalnumber,maxperpage,strLink,ExtName,ListName)
If Pagesmode = False Then
htmlshowpage = ShowHtmlPage(page, Pcount, totalnumber, maxperpage, strLink, ExtName, ListName)
Exit Function
End If
Dim strTemp, b, e
Dim pagestart,pageend
Dim i, ii, n, p, s
b = 5 : e = 5 : s = "五"
pagestart = page - 50
pageend = page + 50
If pagestart < 1 Then
pagestart = 2
End If
If pageend > Pcount Then
pageend = Pcount
End If
If (page - 1) Mod b = 0 Then
p = (page-1) \ b
Else
p = ((page-1) - (page-1) Mod b) \ b
End If
If totalnumber Mod maxperpage = 0 Then
n = totalnumber \ maxperpage
Else
n = (totalnumber - totalnumber Mod maxperpage) \ maxperpage + 1
End If
strTemp = "<table border=""0"" cellpadding=""0"" cellspacing=""1"" class=""Tableborder5"">" & vbNewLine
strTemp = strTemp & " <form method=""post"">" & vbNewLine
strTemp = strTemp & " <tr align=""center"">" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""" & ListName & """> " & ListName & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""总数""> " & totalnumber & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""每页""> " & maxperpage & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""页次""> " & page & "/" & Pcount & "页 </td>" & vbNewLine
If page = 1 Then
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">9</font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""index" & ExtName & """ title=""首页""><font face=""webdings"">9</font></a> </td>" & vbNewLine
End If
If p * b > 0 Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & (p*b) & ExtName & """ title=""上" & s & "页""><font face=""webdings"">7</font></a> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">7</font> </td>" & vbNewLine
End If
For i = p * b + 1 To p * b + e
If i = page Then
strTemp = strTemp & " <td class=""tablebody2""> <font class=""normalTextSmall""><u><b>" & i & "</b></u></font> </td>" & vbNewLine
Else
If i = 1 Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""index" & ExtName & """ title=""第1页"">1</a> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & i & ExtName & """ title=""第" & i & "页"">" & i & "</a> </td>" & vbNewLine
End If
End if
If i = n Then Exit For
Next
If i < n Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & i & ExtName & """ title=""下" & s & "页""><font face=""webdings"">8</font></a> <td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">8</font> <td>" & vbNewLine
End If
If page = n Then
strTemp = strTemp & " <td class=""tablebody1""> <Font face=""webdings"">:</font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & n & ExtName & """ title=""尾页""><font face=""webdings"">:</font></a> </td>" & vbNewLine
End If
strTemp = strTemp & " <td class=""tabletitle1"" title=""转到""> GO </td>" & vbNewLine
strTemp = strTemp & " <td class=""tablebody1""><select class=""PageInput"" name=""page"" size=""1"" onchange=""javascript:window.location=this.options[this.selectedIndex].value;"">" & vbNewLine
strTemp = strTemp & " <option value=""index" & ExtName & """>第1页</option>"
If pagestart > 1 Then
For ii = pagestart To pageend'Pcount
If ii = page Then
strTemp = strTemp & "<option value=""" & strLink & ii & ExtName & """ selected>第" & ii & "页</option>"
Else
strTemp = strTemp & "<option value=""" & strLink & ii & ExtName & """>第" & ii & "页</option>"
End If
Next
End If
strTemp = strTemp & "</select></td>" & vbNewLine
strTemp = strTemp & " </tr>" & vbNewLine
strTemp = strTemp & " </form>" & vbNewLine
strTemp = strTemp & "</table>" & vbNewLine
htmlshowpage = strTemp
End Function
Public Function htmlmorepage(page,Pcount,totalnumber,maxperpage,strLink,ExtName,ListName)
If Pagesmode = False Then
htmlmorepage = ShowHtmlPage(page, Pcount, totalnumber, maxperpage, strLink, ExtName, ListName)
Exit Function
End If
Dim strTemp, b, e
Dim pagestart,pageend
Dim i, ii, n, p, s
b = 5 : e = 5 : s = "五"
pagestart = page - 50
pageend = page + 50
If pagestart < 1 Then
pagestart = 2
End If
If pageend > Pcount Then
pageend = Pcount
End If
If (page - 1) Mod b = 0 Then
p = (page-1) \ b
Else
p = ((page-1) - (page-1) Mod b) \ b
End If
If totalnumber Mod maxperpage = 0 Then
n = totalnumber \ maxperpage
Else
n = (totalnumber - totalnumber Mod maxperpage) \ maxperpage + 1
End If
strTemp = "<table border=""0"" cellpadding=""0"" cellspacing=""1"" class=""Tableborder5"">" & vbNewLine
strTemp = strTemp & " <form method=""post"">" & vbNewLine
strTemp = strTemp & " <tr align=""center"">" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""" & ListName & """> " & ListName & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""总数""> " & totalnumber & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""每页""> " & maxperpage & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""页次""> " & page & "/" & Pcount & "页 </td>" & vbNewLine
If page = 1 Then
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">9</font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & "001" & ExtName & """ title=""首页""><font face=""webdings"">9</font></a> </td>" & vbNewLine
End If
If p * b > 0 Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & Newasp.Supplemental(p*b,3) & ExtName & """ title=""上" & s & "页""><font face=""webdings"">7</font></a> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">7</font> </td>" & vbNewLine
End If
For i = p * b + 1 To p * b + e
If i = page Then
strTemp = strTemp & " <td class=""tablebody2""> <font class=""normalTextSmall""><u><b>" & i & "</b></u></font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & Newasp.Supplemental(i,3) & ExtName & """ title=""第" & i & "页"">" & i & "</a> </td>" & vbNewLine
End if
If i = n Then Exit For
Next
If i < n Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & Newasp.Supplemental(i,3) & ExtName & """ title=""下" & s & "页""><font face=""webdings"">8</font></a> <td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">8</font> <td>" & vbNewLine
End If
If page = n Then
strTemp = strTemp & " <td class=""tablebody1""> <Font face=""webdings"">:</font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & strLink & Newasp.Supplemental(n,3) & ExtName & """ title=""尾页""><font face=""webdings"">:</font></a> </td>" & vbNewLine
End If
strTemp = strTemp & " <td class=""tabletitle1"" title=""转到""> GO </td>" & vbNewLine
strTemp = strTemp & " <td class=""tablebody1""><select class=""PageInput"" name=""page"" size=""1"" onchange=""javascript:window.location=this.options[this.selectedIndex].value;"">" & vbNewLine
If pagestart > 0 Then
For ii = pagestart To pageend'Pcount
If ii = page Then
strTemp = strTemp & "<option value=""" & strLink & Newasp.Supplemental(ii,3) & ExtName & """ selected>第" & ii & "页</option>"
Else
strTemp = strTemp & "<option value=""" & strLink & Newasp.Supplemental(ii,3) & ExtName & """>第" & ii & "页</option>"
End If
Next
End If
strTemp = strTemp & "</select></td>" & vbNewLine
strTemp = strTemp & " </tr>" & vbNewLine
strTemp = strTemp & " </form>" & vbNewLine
strTemp = strTemp & "</table>" & vbNewLine
htmlmorepage = strTemp
End Function
Public Function showlistpages(page, Pcount, totalnumber, maxperpage, strLink, ListName)
Dim strTemp, sName
Dim i, n, p, s, b, e
b = 5
e = 5
s = "五"
sName = ""
If (page - 1) Mod b = 0 Then
p = (page -1) \ b
Else
p = ((page -1) - (page -1) Mod b) \ b
End If
If totalnumber Mod maxperpage = 0 Then
n = totalnumber \ maxperpage
Else
n = (totalnumber - totalnumber Mod maxperpage) \ maxperpage + 1
End If
strTemp = "<table border=""0"" cellpadding=""0"" cellspacing=""1"" class=""Tableborder5"">" & vbNewLine
strTemp = strTemp & " <form method=""post"" action=""" & sName & "?pcount="& Pcount & strLink & """>" & vbNewLine
strTemp = strTemp & " <tr align=""center"">" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""" & ListName & """> " & ListName & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""总数""> " & totalnumber & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""每页""> " & maxperpage & " </td>" & vbNewLine
strTemp = strTemp & " <td class=""tabletitle1"" title=""页次""> " & page & "/" & Pcount & "页 </td>" & vbNewLine
If page = 1 Then
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">9</font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & sName & "?page=1" & strLink & """ title=""首页""><font face=""webdings"">9</font></a> </td>" & vbNewLine
End If
If p * b > 0 Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & sName & "?page="& p * b & strLink & """ title=""上" & s & "页""><font face=""webdings"">7</font></a> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">7</font> </td>" & vbNewLine
End If
For i = p * b + 1 To p * b + e
If i = page Then
strTemp = strTemp & " <td class=""tablebody2""> <font class=""normalTextSmall""><u><b>" & i & "</b></u></font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & sName & "?page=" & i & strLink & """ title=""第" & i & "页"">" & i & "</a> </td>" & vbNewLine
End If
If i = n Then Exit For
Next
If i < n Then
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & sName & "?page=" & i & strLink & """ title=""下" & s & "页""><font face=""webdings"">8</font></a> <td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <font face=""webdings"">8</font> <td>" & vbNewLine
End If
If page = n Then
strTemp = strTemp & " <td class=""tablebody1""> <Font face=""webdings"">:</font> </td>" & vbNewLine
Else
strTemp = strTemp & " <td class=""tablebody1""> <a href=""" & sName & "?page=" & n & strLink & """ title=""尾页""><font face=""webdings"">:</font></a> </td>" & vbNewLine
End If
strTemp = strTemp & " <td class=""tablebody1""><input class=""PageInput"" type=""text"" name=""page"" size=""1"" maxlength=""10"" value=""" & page & """></td>" & vbNewLine
strTemp = strTemp & " <td class=""tablebody1""><input type=""submit"" value=""Go"" name=""submit"" class=""PageInput""></td>" & vbNewLine
strTemp = strTemp & " </tr>" & vbNewLine
strTemp = strTemp & " </form>" & vbNewLine
strTemp = strTemp & "</table>" & vbNewLine
showlistpages = strTemp
End Function
Public Function CurrentNum(ByVal num)
If Len(num) = 1 Then
CurrentNum = CStr("00")
Exit Function
ElseIf Len(num) = 2 Then
CurrentNum = CStr("0")
Exit Function
Else
CurrentNum = ""
End If
End Function
Public Function AdsReplace(ByVal strHTML,ByVal strCode,ByVal istop)
Dim ArrayAdsCode
If istop = 0 Then
ArrayAdsCode = Split(strCode & "|||||||||", "|||")
strHTML = Replace(strHTML, "{$AdsCode1}", ArrayAdsCode(0))
strHTML = Replace(strHTML, "{$AdsCode2}", ArrayAdsCode(1))
strHTML = Replace(strHTML, "{$AdsCode3}", ArrayAdsCode(2))
strHTML = Replace(strHTML, "{$AdsCode4}", ArrayAdsCode(3))
strHTML = Replace(strHTML, "{$AdsCode5}", ArrayAdsCode(4))
Else
strHTML = Replace(strHTML, "{$AdsCode1}", "")
strHTML = Replace(strHTML, "{$AdsCode2}", "")
strHTML = Replace(strHTML, "{$AdsCode3}", "")
strHTML = Replace(strHTML, "{$AdsCode4}", "")
strHTML = Replace(strHTML, "{$AdsCode5}", "")
End If
strHTML = Replace(strHTML, "{$AdsCode}", vbNullString)
AdsReplace = strHTML
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -