📄 create_shoping.asp
字号:
HtmlString = HtmlString & "<p align=center>还没有找到任何信息!</p>"
Else
If TotalPageNum > 1 then Rs.Move (CurrentPage - 1) * maxperpage
i = 0
Do While Not Rs.EOF And i < CInt(maxperpage)
HtmlString = HtmlString & DownsysClass.TempSet(10)
If i mod 2 = 0 then
thiscolor = "#FFFFFF"
Else
thiscolor = "#F6F6F6"
End If
SoftName = "" & TopImg & " <A HREF='" & DownsysClass.SetupDir & "Shopware/Catalog" & Rs("sortid") &"/" & Rs("softid") & ".html'>" & Trim(Rs("softname")) & " " & Trim(Rs("softver")) & "</a> " & isCommend & ""
If Rs("SoftTime") >= Date Then
SoftTime = "<FONT color=red>" & FormatDateTime(Rs("SoftTime"), 2) & "</FONT >"
Else
SoftTime = FormatDateTime(Rs("SoftTime"), 2)
End If
If Not IsNull(Trim(Rs("softimg"))) And Trim(Rs("softimg")) <> "" Then
SoftImg = "<A class=M HREF='" & DownsysClass.SetupDir & "Shopware/Catalog" & Rs("sortid") &"/" & Rs("softid") & ".html'><img src='" & Rs("softimg") & "' onload='javascript:if(this.height>this.width){this.height=" & DownsysClass.TempSet(16) & "}else{this.width=" & DownsysClass.TempSet(17) & "}' border='0'></a>"
Else
SoftImg = "<img src='" & DownsysClass.SetupDir & "images/NoPic.jpg' onload='javascript:if(this.height>this.width){this.height=" & DownsysClass.TempSet(16) & "}else{this.width=" & DownsysClass.TempSet(17) & "}' border='0'>"
End If
if Rs("PriceSH")<>"" then
PriceSH = Rs("PriceSH")
else
PriceSH = "空"
end if
DingGou = "<a href=" & DownsysClass.SetupDir & "shopessay.asp?id=" & Rs("softid") & "><img src='" & DownsysClass.SetupDir & "images/index/button_DingGou.gif' width=65 height=22 border=0>"
SoftReadme = DownsysClass.CutString(Rs("content"), CInt(DownsysClass.TempSet(7)))
HtmlString = Replace(HtmlString, "{$content}", SoftReadme)
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftImg}", SoftImg)
HtmlString = Replace(HtmlString, "{$thiscolor}", thiscolor)
HtmlString = Replace(HtmlString, "{$PriceSH}", PriceSH)
HtmlString = Replace(HtmlString, "{$DingGou}", DingGou)
Rs.movenext
i = i + 1
Loop
End If
Rs.Close
HtmlString = HtmlString & DownsysClass.TempSet(11)
HtmlString = Replace(HtmlString, "{$ShowPage}", AspShowPage(SortName, maxperpage, CurrentPage, totalnumber))
SoftShopingList = HtmlString
End Function
'*************************************************************
'函数作用:Html分页
'*************************************************************
Private Function AspShowPage(SortName, maxperpage, CurrentPage, totalnumber)
Dim ii
Dim n
dim page
dim page1
Dim HtmlShowPage
If totalnumber Mod maxperpage = 0 Then
n = totalnumber \ maxperpage
Else
n = totalnumber \ maxperpage + 1
End If
HtmlShowPage = "<TABLE width='98%' border=0 align='center' cellPadding=2 cellSpacing=0 style='BORDER-TOP: #9c9a9c 1px solid; BORDER-BOTTOM: #9c9a9c 1px solid'><tr><td align=center> " & vbCrLf
If CurrentPage < 2 Then
HtmlShowPage = HtmlShowPage & " <img src=""" & DownsysClass.SetupDir & "Images/but_pre.gif"" width=14 height=12 border=0> <img src=""" & DownsysClass.SetupDir & "Images/but_ago.gif"" width=12 height=12 border=0> "
Else
HtmlShowPage = HtmlShowPage & "<a href=Shoping_Indate_Desc_1.html><img src=""" & DownsysClass.SetupDir & "Images/but_pre.gif"" width=14 height=12 border=0></a> "
HtmlShowPage = HtmlShowPage & "<a href=Shoping_Indate_Desc_" & CurrentPage - 1 & ".html><img src=""" & DownsysClass.SetupDir & "Images/but_ago.gif"" width=12 height=12 border=0></a> "
End If
if n>10 then
if CurrentPage>5 then
page=CurrentPage-5
else
page=1
end if
if CurrentPage<5 then
page1=10
else
if CurrentPage+5>n then
page1=n
else
page1=CurrentPage+5
end if
end if
else
page=1
page1=n
end if
For ii = page To page1
HtmlShowPage = HtmlShowPage & " <a href=Shoping_Indate_Desc_" & ii & ".html>"
If CurrentPage = CInt(ii) Then
HtmlShowPage = HtmlShowPage & "<font color='#FF0000'><strong>"
End If
HtmlShowPage = HtmlShowPage & "" & ii & "</font></strong></a>"
Next
HtmlShowPage = HtmlShowPage & " ……"
If n - CurrentPage < 1 Then
HtmlShowPage = HtmlShowPage & " <img src=""" & DownsysClass.SetupDir & "Images/but_next.gif"" width=12 height=12 border=0> <img src=""" & DownsysClass.SetupDir & "Images/but_after.gif"" width=14 height=12 border=0> </td></FORM></tr>" & vbCrLf
Else
HtmlShowPage = HtmlShowPage & " <a href=Shoping_Indate_Desc_" & (CurrentPage + 1) & ".html><img src=""" & DownsysClass.SetupDir & "Images/but_next.gif"" width=12 height=12 border=0></a>"
HtmlShowPage = HtmlShowPage & " <a href=Shoping_Indate_Desc_" & n & ".html><img src=""" & DownsysClass.SetupDir & "Images/but_after.gif"" width=14 height=12 border=0></a></td></FORM></tr>" & vbCrLf
End If
HtmlShowPage = HtmlShowPage & "<tr><FORM name=beginPagefrm onsubmit='return onCheckPage()' action=''><td class=C align=center>共 <font COLOR=#FF0000>" & totalnumber & "</font> 条信息 当前页数:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 每页<b>" & maxperpage & "</b>条信息" & vbCrLf
HtmlShowPage = HtmlShowPage & " 直接到第 <INPUT size=5 name=beginPage> 页 <INPUT type=image src='" & DownsysClass.SetupDir & "images/button_small2_qw.gif' align=absMiddle value='确 定' name=submit2 >" & vbCrLf
HtmlShowPage = HtmlShowPage & "</FORM></tr></table>" & vbCrLf
HtmlShowPage = HtmlShowPage & "<SCRIPT language=javascript>" & vbCrLf
HtmlShowPage = HtmlShowPage & "<!--" & vbCrLf
HtmlShowPage = HtmlShowPage & "function onCheckPage(){" & vbCrLf
HtmlShowPage = HtmlShowPage & " var beginPage = parseInt(document.beginPagefrm.beginPage.value);" & vbCrLf
HtmlShowPage = HtmlShowPage & " if(isNaN(beginPage)){" & vbCrLf
HtmlShowPage = HtmlShowPage & " alert(""请输入数字!(0到" & n & ")"")" & vbCrLf
HtmlShowPage = HtmlShowPage & " return false;" & vbCrLf
HtmlShowPage = HtmlShowPage & " }" & vbCrLf
HtmlShowPage = HtmlShowPage & " if(beginPage < 0 ) {" & vbCrLf
HtmlShowPage = HtmlShowPage & " beginPage = 1;" & vbCrLf
HtmlShowPage = HtmlShowPage & " }" & vbCrLf
HtmlShowPage = HtmlShowPage & " if(beginPage > " & n & "){" & vbCrLf
HtmlShowPage = HtmlShowPage & " beginPage = " & n & ";" & vbCrLf
HtmlShowPage = HtmlShowPage & " }" & vbCrLf
HtmlShowPage = HtmlShowPage & " document.beginPagefrm.action = ""Shoping_Indate_Desc_"" + beginPage + "".html"";" & vbCrLf
HtmlShowPage = HtmlShowPage & " return true;" & vbCrLf
HtmlShowPage = HtmlShowPage & "}" & vbCrLf
HtmlShowPage = HtmlShowPage & "-->" & vbCrLf
HtmlShowPage = HtmlShowPage & "</SCRIPT>" & vbCrLf
AspShowPage = HtmlShowPage
End Function
'*************************************************************
'函数作用:当前位置
'*************************************************************
Private Function NowStation(sortid, SortName, ParentID, strParent)
Dim Rs, SQL, HtmlString
Set Rs = Server.CreateObject("adodb.recordset")
If ParentID <> 0 And Len(strParent) <> 0 Then
SQL = "select sortid,sortname from [NC_shopsort] where sortid in(" & strParent & ")"
Rs.Open SQL, Conn, 1, 1
If Not (Rs.EOF And Rs.bof) Then
Do While Not Rs.EOF
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & Rs(0) & "/Shoping_Indate_Desc_1.html'>" & Rs(1) & "</a>→"
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
End If
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & sortid & "/Shoping_Indate_Desc_1.html'>" & SortName & "</a>"
NowStation = HtmlString
End Function
'*************************************************************
'函数作用:搜索栏目的信息统计
'*************************************************************
Private Function NowStation1(sortid, SortName, SoftNum, strParent)
Dim Rs, SQL, HtmlString
Set Rs = Server.CreateObject("adodb.recordset")
If Len(strParent) <> 0 Then
SQL = "select sortid,sortname,SoftNum from [NC_shopsort] where sortid in(" & strParent & ")"
Rs.Open SQL, Conn, 1, 1
End If
HtmlString = HtmlString & "<B> “<FONT color=red>" & SortName & "</FONT>”的供应信息共 " & SoftNum & " 条 </B>"
NowStation1 = HtmlString
Rs.Close
Set Rs = Nothing
End Function
'*************************************************************
'函数作用:大类信息分类
'*************************************************************
Private Function SoftShoping1(sortid, ParentID, Child)
Dim Rs, SQL, HtmlString, SortName, ShopingName, i, mm
Set Rs = Server.CreateObject("adodb.recordset")
HtmlString = DownsysClass.TempSet(18)
SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_ShopSort where depth=0 order by rootid"
Rs.Open SQL, Conn, 1, 1
If Rs.EOF And Rs.bof Then
HtmlString = HtmlString & "<p align=center>还没有任何分类!</p>"
Else
Do While Not Rs.EOF
if not Rs.eof then
HtmlString = HtmlString & DownsysClass.TempSet(2)
If CStr(Rs("sortid")) = CStr(sortid) Then
ShopingName = "<td><A href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & Rs("sortid") & "/Shoping_indate_Desc_1.html' class=ShowLink><B><FONT color=ffffff>" & Rs("sortname") & "</font></B></a></td>"
SortName = "<td><A href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & Rs("sortid") & "/Shoping_indate_Desc_1.html'' class=ShowLink><B><FONT color=ffffff>" & Rs("sortname") & "</font></B></a></td>"
Else
ShopingName = "<td><A href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & Rs("sortid") & "/Shoping_indate_Desc_1.html' title='" & Rs("Readme") & "'><FONT color=ffffff>" & Rs("sortname") & "</font></a></td>"
SortName = "<td><A href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & Rs("sortid") & "/Shoping_indate_Desc_1.html' title='" & Rs("Readme") & "'><FONT color=ffffff>" & Rs("sortname") & "</font></a></td>"
End If
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
HtmlString = Replace(HtmlString, "{$SoftNum}", Rs("SoftNum"))
Rs.movenext
else
HtmlString = HtmlString & DownsysClass.TempSet(2)
ShopingName = "<TD align=middle width=56><IMG src=""" & DownsysClass.SetupDir & "images/shop/menu_img.gif""></TD>"
SortName = "<TD align=middle width=56><IMG src=""" & DownsysClass.SetupDir & "images/shop/menu_img.gif""></TD>"
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
end if
HtmlString = HtmlString & DownsysClass.TempSet(2)
ShopingName = "<TD align=middle width=56><IMG src=""" & DownsysClass.SetupDir & "images/shop/menu_img.gif""></TD>"
SortName = "<TD align=middle width=56><IMG src=""" & DownsysClass.SetupDir & "images/shop/menu_img.gif""></TD>"
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
Loop
End If
HtmlString = HtmlString & "</table>"
Rs.Close
Set Rs = Nothing
SoftShoping1 = HtmlString
End Function
'*************************************************************
'函数作用:信息分类
'*************************************************************
Private Function SoftShoping(sortid, ParentID, Child)
Dim Rs, SQL, HtmlString, SortName, ShopingName, i, mm
Set Rs = Server.CreateObject("adodb.recordset")
HtmlString = DownsysClass.TempSet(1)
If sortid = "" Then
SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_ShopSort where depth=0 order by rootid"
Else
If Child = 0 Then
SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_ShopSort where Parentid=" & ParentID & " order by orders"
Else
SQL = "SELECT sortid,sortname,rootid,Child,SoftNum,Readme FROM NC_ShopSort where Parentid=" & sortid & " order by orders"
End If
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -