📄 create_shopwarecls.asp
字号:
HtmlTempStr = Replace(HtmlTempStr, "{$Adcolumn(0)}", DownloadClass_Ads.ScriptFixedAds(7))
Set Rs = Nothing
NewFolderPath = Server.MapPath(DownsysClass.SetupDir & "Shopware/Catalog" & sortid)
Set objFSO = Server.CreateObject(DownsysClass.Script_FSO)
If Not objFSO.FolderExists(NewFolderPath) Then
objFSO.CreateFolder (NewFolderPath)
End If
objFSO.Close
Set objFSO = Nothing
Set FSO = Server.CreateObject("ADODB.STREAM")
CreateHtml = Server.MapPath(DownsysClass.SetupDir & "Shopware/Catalog" & sortid & "/" & softid & ".html")
With FSO
.Open
.Charset = "GB2312"
.WriteText HtmlTempStr
.SaveToFile CreateHtml,2
.Close
End With
Set FSO = Nothing
End Sub
'*************************************************************
'函数作用:删除信息
'*************************************************************
Public Sub DelShopInfo(softid)
Dim FilePath
Set NC_Admin = New Check
NC_Admin.Check
Set Rs = Server.CreateObject("adodb.recordset")
SQL = "select * from NC_ShopInfo where softid = " & softid
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
Response.Write "Sorry!还没有找到任何信息!"
Exit Sub
Else
sortid = Rs("sortid")
End If
If CInt(DownsysClass.Setting(5)) = 0 Then
FilePath = Server.MapPath(DownsysClass.SetupDir & "Shopware/Catalog" & sortid & "/" & softid & ".html")
Set FSO = Server.CreateObject(DownsysClass.Script_FSO)
If FSO.FileExists(FilePath) Then
FSO.DeleteFile FilePath
End If
Set FSO = Nothing
End If
End Sub
'*************************************************************
'函数作用:当前位置
'*************************************************************
Private Function NowStation(sortid, SortName, ParentID, strParent)
Dim Rs
Dim SQL
Dim 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
If CInt(DownsysClass.Setting(5)) = 0 Then
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Shoping/Catalog" & Rs(0) & "/Shoping_Indate_Desc_1.html'>" & Rs(1) & "</a>→"
Else
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Shoping.asp?sortid=" & Rs(0) & "'>" & Rs(1) & "</a>→"
End If
Rs.movenext
Loop
End If
Rs.Close
Set Rs = Nothing
End If
If CInt(DownsysClass.Setting(5)) = 0 Then
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Shoping/Catalog" & sortid & "/Shoping_Indate_Desc_1.html'>" & SortName & "</a>"
Else
HtmlString = HtmlString & "<a href='" & DownsysClass.SetupDir & "Shoping.asp?sortid=" & sortid & "'>" & SortName & "</a>"
End If
NowStation = HtmlString
End Function
'*************************************************************
'函数作用:下载服务器
'*************************************************************
Private Function DownLoadUrl(softid)
Dim Rs, Rss
Dim SQL
Dim HtmlString
Set Rs = Server.CreateObject("ADODB.Recordset")
Set Rss = Server.CreateObject("ADODB.Recordset")
SQL = "select * from NC_SoftSite where SoftID=" & softid
Rs.Open SQL, Conn, 1, 1
If Rs.bof And Rs.EOF Then
HtmlString = "还没有添加通讯方式!"
Else
Do While Not Rs.EOF
If Rs("serverid") = 0 Then
HtmlString = HtmlString & " <img src='" & DownsysClass.SetupDir & "images/download.gif' border=0> <a href='" & DownsysClass.SetupDir & "down.asp?id=" & Rs("id") & "&downid=" & Rs("serverid") & "'>" & Trim(Rs("SiteName")) & "</a><BR>"
Else
SQL = "select * from NC_ServerSite where depth = 1 And rootid = " & Rs("serverid") & " order by orders"
Rss.Open SQL, Conn, 1, 1
If Rss.bof And Rss.EOF Then
HtmlString = HtmlString & "还没有添加下载服务器!"
Else
Do While Not Rss.EOF
HtmlString = HtmlString & " <img src='" & DownsysClass.SetupDir & "images/download.gif' border=0> <a href='" & DownsysClass.SetupDir & "down.asp?id=" & Rs("id") & "&downid=" & Rss("serverid") & "'>" & Trim(Rss("ServerName")) & "</a><BR>"
Rss.movenext
Loop
End If
Rss.Close
End If
Rs.movenext
Loop
End If
Rs.Close
Set Rss = Nothing
Set Rs = Nothing
DownLoadUrl = HtmlString
End Function
'*************************************************************
'函数作用:留言询价信息
'*************************************************************
Private Function SoftEssayInfo(softid)
Dim Rss
Dim SQL
Dim HtmlString
Set Rss = Server.CreateObject("ADODB.Recordset")
SQL = "select top " & CInt(DownsysClass.TempSet(5)) & " * from NC_SoftEssay where softid=" & softid & " order by ID desc"
Rss.Open SQL, Conn, 1, 1
If Rss.bof And Rss.EOF Then
HtmlString = ""
Else
Do While Not Rss.EOF
HtmlString = HtmlString & "用户名:" & Rss("username") & " 参与时间:" & Rss("postime") & "<BR>"
HtmlString = HtmlString & " · " & DownsysClass.gotTopic(Rss("content"), CInt(DownsysClass.TempSet(6))) & "<BR>"
Rss.movenext
Loop
End If
Rss.Close
Set Rss = Nothing
SoftEssayInfo = HtmlString
End Function
'*************************************************************
'函数作用:相关产品
'*************************************************************
Private Function GetKeySoftware(Keys, keyid)
Dim Rss, SQL, HtmlString, SoftName, SoftTime, username
Set Rss = Server.CreateObject("adodb.recordset")
SQL = "select top " & CInt(DownsysClass.TempSet(8)) & " SoftID,sortid,SoftName,SoftVer,softimg,softTime,Hits,SoftTime,islock,username from NC_ShopInfo where userName like '%" & Keys & "%' and SoftID <> " & keyid & " and islock = 0 "
Rss.Open SQL, Conn, 1, 1
If Not (Rss.EOF And Rss.bof) Then
Do While Not Rss.EOF
for i = 1 to 2
if not Rss.eof then
HtmlString = HtmlString & DownsysClass.TempSet(10)
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "<td><TABLE cellSpacing=0 cellPadding=0 width=98% border=0> <TBODY><TR><TD width=20% height=64 align=middle><TABLE class=picstyle cellSpacing=0 cellPadding=0 width=64 border=0><TBODY><TR><TD align=middle height=64><A class=M href='" & DownsysClass.SetupDir & "Shopware/Catalog" & Rss(1) & "/" & Rss(0) & ".html' target=_blank><IMG src=" & Rss(4) & " onload='javascript:if(this.height>this.width){this.height=154}else{this.width=210}' border=0 ></A></TD></TR></TBODY></TABLE> </TD></TR></TBODY></TABLE></td>"
Else
SoftName = "<A HREF='" & DownsysClass.SetupDir & "Shopware.asp?id=" & Rss(0) & "'>" & DownsysClass.gotTopic(Rss(2) & " " & Rss(3), CInt(DownsysClass.TempSet(9))) & "</A>"
End If
'SoftTime = Month(Rss("SoftTime")) & "/" & Day(Rss("SoftTime"))
'HtmlString = Replace(HtmlString, "{$SoftHits}", Rss("Hits"))
'HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
Rss.movenext
else
HtmlString = HtmlString & DownsysClass.TempSet(10)
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "</TR><td></td>"
Else
SoftName = "</TR><td></td>"
End If
'SoftTime = Month(Rss("SoftTime")) & "/" & Day(Rss("SoftTime"))
'HtmlString = Replace(HtmlString, "{$SoftHits}", Rss("Hits"))
'HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
end if
next
HtmlString = HtmlString & DownsysClass.TempSet(10)
If CInt(DownsysClass.Setting(5)) = 0 Then
SoftName = "</tr><tr><td height=1 align=center ></td></tr><tr >"
Else
SoftName = "</tr><tr><td height=1 align=center ></td></tr><tr >"
End If
'SoftTime = Month(Rss("SoftTime")) & "/" & Day(Rss("SoftTime"))
'HtmlString = Replace(HtmlString, "{$SoftHits}", Rss("Hits"))
'HtmlString = Replace(HtmlString, "{$SoftTime}", SoftTime)
HtmlString = Replace(HtmlString, "{$SoftName}", SoftName)
Loop
End If
Rss.Close
Set Rss = Nothing
GetKeySoftware = HtmlString
End Function
'*************************************************************
'函数作用:相关文章
'*************************************************************
Private Function GetKeyArticle(Keys)
Dim Rss, SQL, HtmlString, Topic, InfoTime
Set Rss = Server.CreateObject("adodb.recordset")
SQL = "select top " & CInt(DownsysClass.TempSet(8)) & " id,classid,title,Hits,InfoTime,islock from NC_Article where title like '%" & Left((Keys), 4) & "%' and islock = 0"
Rss.Open SQL, Conn, 1, 1
If Not (Rss.EOF And Rss.bof) Then
Do While Not Rss.EOF
HtmlString = HtmlString & DownsysClass.TempSet(11)
If CInt(DownsysClass.Setting(5)) = 0 Then
Topic = "<A HREF='" & DownsysClass.SetupDir & "Article/Catalog" & Rss("classid") & "/" & Rss("id") & ".html' >" & DownsysClass.gotTopic(Rss("title"), CInt(DownsysClass.TempSet(9))) & "</A>"
Else
Topic = "<A HREF='" & DownsysClass.SetupDir & "Article.asp?id=" & Rss("id") & "' >" & DownsysClass.gotTopic(Rss("title"), CInt(DownsysClass.tempset(9))) & "</A>"
End If
'InfoTime = Month(Rss("InfoTime")) & "/" & Day(Rss("InfoTime"))
'HtmlString = Replace(HtmlString, "{$Hits}", Rss("Hits"))
'HtmlString = Replace(HtmlString, "{$InfoTime}", InfoTime)
HtmlString = Replace(HtmlString, "{$Topic}", Topic)
Rss.movenext
Loop
End If
Rss.Close
Set Rss = Nothing
GetKeyArticle = HtmlString
End Function
'搜索下拉框选择项目(整体分类部分:供应、求购)
Private Function sousuo()
Dim SoftType
Dim HtmlShowPage
Dim ii
HtmlShowPage = HtmlShowPage &" <select name=""action""> "
HtmlShowPage = HtmlShowPage &" <option value=""soft"" selected>全部信息</option>"
SoftType = Split(DownsysClass.Setting(35), ",")
For ii = 0 To UBound(SoftType)
HtmlShowPage = HtmlShowPage & "<option value=""soft"& ii &""">" & Trim(SoftType(ii)) & "</option>"
Next
HtmlShowPage = HtmlShowPage & "<option value=""info"">文章搜索</option></SELECT>"
sousuo = HtmlShowPage
End Function
'*************************************************************
'函数作用:大类信息分类
'*************************************************************
Private Function SoftShoping1(sortid1, 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(20)
If CStr(Rs("sortid")) = CStr(sortid1) 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(20)
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(20)
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(sortid1, ParentID, Child)
Dim Rs, SQL, HtmlString, SortName, ShopingName, i, mm
Set Rs = Server.CreateObject("adodb.recordset")
HtmlString = DownsysClass.TempSet(19)
If sortid1 = "" 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=" & sortid1 & " order by orders"
End If
End If
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
for i = 1 to 2
if not Rs.eof then
HtmlString = HtmlString & DownsysClass.TempSet(20)
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=red>" & 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=red>" & 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") & "'>" & Rs("sortname") & "</a></td>"
SortName = "<td><A href='" & DownsysClass.SetupDir & "Shoping"& ii &"/Catalog" & Rs("sortid") & "/Shoping_indate_Desc_1.html' title='" & Rs("Readme") & "'>" & Rs("sortname") & "</a></td>"
End If
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
HtmlString = Replace(HtmlString, "{$SoftNum}", Rs("SoftNum"))
Rs.movenext
else
HtmlString = HtmlString & DownsysClass.TempSet(20)
ShopingName = "<br>"
SortName = "<br>"
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
end if
next
HtmlString = HtmlString & DownsysClass.TempSet(20)
ShopingName = "</tr><tr><td height=1 align=center ></td></tr><tr >"
SortName = "</tr><tr><td height=1 align=center ></td></tr><tr >"
HtmlString = Replace(HtmlString, "{$SortName}", SortName)
Loop
End If
HtmlString = HtmlString & "</table>"
Rs.Close
Set Rs = Nothing
SoftShoping = HtmlString
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -