生成一级分类

<% data_path="../../../" 'ACC连接数据库路径，对SQL无效 dir="no" numid="no" %> <% Set rs=Server.CreateObject("adodb.recordSet") rs.Open ("select productshow_sort from Websen_worldec_Temp where yx_selected=1"),conn,1,1 If rs.Eof Then Response.Write("
对不起！该模版不存在！ 关闭") Response.End() End If If Not rs.Eof Then pencat=rs("productshow_sort") rs.Close End If If Request("page")<>"" Then If Cint(Request("page"))<1 Then currentPage=1 Else currentPage=Cint(Request("page")) End If Else currentPage=1 End If If Request("page2")<>"" Then If Cint(Request("page2"))<1 Then currentPage2=1 Else currentPage2=Cint(Request("page2")) End If Else currentPage2=1 End If MaxPerPage=1 If Request("all")="all" Then Set rs=Server.CreateObject("adodb.recordSet") rs.Open ("select * from Websen_class_1 order by sortID desc"),conn,1,1 End If If not rs.Eof Then rs.pagesize=MaxPerPage mpage=rs.pagecount '得到总条数 If currentPage>mpage Then Response.Write "
生成完毕完成时间："&now()&"" Response.End End If rs.move (currentPage-1)*MaxPerPage If mpage>=currentPage Then sortid=rs("sortid") sortname=rs("sort") End If End If rs.Close If sortid="" Then sortid=0 End If Response.Write "已生成/要生成的1级分类:"¤tPage-1&"/"&mpage&"个" '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If mpage " Else '商品比较标签#HOPE_BJ(typeid)#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ '参数：typeid----1 为横向分单元格显示；0--为纵向分行显示 Function HOPE_BJ(typeid) If typeid<=0 Then typeid=0 Else typeid=1 End If strs="" strs="
" HOPE_BJ=strs End Function '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ '^^查处属于第一类的所有二级分类^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HOPE_type=HOPE_type&"

" HOPE_Type=HOPE_Type&"

网站首页 > 产品信息 > "&sortname&"
按类目选择
" sqltype="select * from Websen_class_2 where sortid="&sortid&"" Set rstype=Server.CreateObject("adodb.recordSet") rstype.Open sqltype,conn,1,1 If Not rstype.Eof Then j=1 do while not rstype.Eof '^^^^^^^^^^^^^^^^^^^^^^^^^ start ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ '查询出属于第一类的二级分类下的所含小分类的总数 secCount=0 Set sesers=Server.CreateObject("adodb.recordSet") sesesql="select count(*) as totalse from Websen_Class_3 where typeid="&rstype("typeid") sesers.Open sesesql,conn,1,1 If not sesers.Eof Then If sesers("totalse")>0 Then secCount=""&sesers("totalse")&"" Else secCount=0 End If End If '^^^^^^^^^^^^^^^^^^^^^^^^^ end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HOPE_Type=HOPE_Type&"
" HOPE_Type=HOPE_Type&" "&rstype("typename")&" ("&secCount&")" HOPE_type=HOPE_type&" " If j mod 5 = 0 Then HOPE_Type=HOPE_Type&"
" End If rstype.movenext j=j+1 loop End If HOPE_Type=HOPE_Type&"

" '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ msg_per_page=15 If Request("all")="all" Then sql="select Websen_productshow.id,Websen_productshow.sortid,Websen_productshow.Cpmc,Websen_productshow.typeid,Websen_productshow.xxsm,Websen_productshow.Cpcd,Websen_productshow.typeid_2,Websen_productshow.idate,Websen_productshow.picture,Websen_corporation.qymc,Websen_corporation.[user],Websen_corporation.flag as cflag,Websen_corporation.Address,Websen_corporation.msn,Websen_corporation.gradeid,Websen_corporation.tm,Websen_corporation.Phone,Websen_corporation.mobile,Websen_corporation.trust_score from Websen_productshow,Websen_corporation where Websen_productshow.sortid="&sortid&" and Websen_productshow.flag=1 and Websen_corporation.id=Websen_productshow.gsid order by Websen_corporation.trust_score desc" Set rs= Server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,1,1 End If If not rs.Eof Then totalrec=RS.RecordCount '总记录条数 rs.Pagesize=msg_per_page '每页数 mpage2=rs.Pagecount '总页数 rowcount=msg_per_page rs.Move (currentPage2-1)*MaxPerPage If mpage2>=currentPage2 Then tttid=currentPage2 End If End If %> <% If rs.Eof Then HOPE_body=HOPE_body&"

暂无该类的产品信息

" Else jjcom=1 i=1 HOPE_body=HOPE_body&"
" do while not rs.Eof and rowcount > 0 jjcom = jjcom + 1 If jjcom mod 2 =0 Then colors="#FFFFFF" Else colors="#F6F6F6" End If HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"

" If rs("picture")<>"../../UploadFile/nopicture.gif" or rs("picture")<>"" Then HOPE_body=HOPE_body&"

"&VbCrLf Else HOPE_body=HOPE_body&" 无图" End If HOPE_body=HOPE_body&"

"&VbCrLf HOPE_body=HOPE_body&"

"&VbCrLf HOPE_body=HOPE_body&""&rs("Cpmc")&" ["&year(rs("idate"))&"-"&month(rs("idate"))&"-"&day(rs("idate"))&"]
"&Left(rs("xxsm"),40)&"......
" '--是否使用的名片页------------------------------------------------------------ set rsmp=server.CreateObject("adodb.recordset") sqlmp="select * from Websen_vipgrade where roleid="&rs("gradeid") rsmp.open sqlmp,conn,1,1 if not rsmp.eof then if instr(rsmp("rolelist"),"qw")>0 then If is2weburl=1 Then HOPE_body=HOPE_body&" "&rs("qymc")&""&VbCrLf Else HOPE_body=HOPE_body&" "&rs("qymc")&""&VbCrLf End If Else HOPE_body=HOPE_body&" "&rs("qymc")&""&VbCrLf End If rsmp.close end if set rsmp1=server.CreateObject("adodb.recordset") sqlmp1="select * from Websen_vipgrade where roleid="&rs("gradeid") rsmp1.open sqlmp1,conn,1,1 FileFlag=rsmp1("FileFlag") if not rsmp1.eof then if instr(rsmp1("rolelist"),"qw")>0 then '用于二级域名处理^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If is2weburl=1 Then HOPE_body=HOPE_body&"
该会员所有供应信息 查看该会员企业网站" Else HOPE_body=HOPE_body&"该会员所有供应信息 查看该会员企业网站" End If end if rsmp1.close end if '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HOPE_body=HOPE_body&"
"&vbCrlf HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"

"&vbCrlf HOPE_body=HOPE_body&"
"&rs("trust_score")&"
" HOPE_body=HOPE_body&"
"&vbCrlf HOPE_body=HOPE_body&"

"&rs("Cpcd")&"

" If rs("tm")<>"" then HOPE_body=HOPE_body&"" End if HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"

" i=i+1 icolor=icolor+1 If icolor>1 Then icolor=0 rowcount=rowcount-1 rs.Movenext loop End If '进行分页处理^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HOPE_body=HOPE_body&"
"&vbCrlf HOPE_body=HOPE_body&"

"&vbCrlf HOPE_body=HOPE_body&"
"&vbCrlf HOPE_body=HOPE_body&"
请选择要比较的项
" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&"

" '************** 分页开始 *************** If not (rs.Eof and rs.bof) Then gopage=currentpage2 totalpage=mpage2 blockPage=Int((gopage-1)/10)*10+1 If LCase(Request.ServerVariables("HTTPS")) = "off" Then strTemp = "http://" Else strTemp = "https://" End If strTemp = strTemp & CheckStr(Request.ServerVariables("SERVER_NAME")) If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & CheckStr(Request.ServerVariables("SERVER_PORT")) strTemp = strTemp & CheckStr(Request.ServerVariables("URL")) lenstrTemp=len(strTemp)+1 If instr(left(linkfile,lenstrTemp),"?")>0 Then i=1 Do Until i > 10 or blockPage > mpage2 If blockPage=int(gopage) Then HOPE_body=HOPE_body&""&blockPage&"" Else HOPE_body=HOPE_body&" "&blockPage&" " End If blockPage=blockPage+1 i = i + 1 Loop HOPE_body=HOPE_body&" 直接到第 " HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&" 页
" Else i=1 Do Until i > 10 or blockPage > mpage2 If blockPage=int(gopage) Then HOPE_body=HOPE_body&""&blockPage&"" Else HOPE_body=HOPE_body&" "&blockPage&" " End If blockPage=blockPage+1 i = i + 1 Loop HOPE_body=HOPE_body&" 直接到第 " HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&" 页
" End If Startinfo=((gopage-1)*msg_per_page)+1 Endinfo=gopage*msg_per_page If Endinfo>totalrec Then Endinfo=totalrec End If HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"
想让您的信息也被搜索到吗？立即免费发布

" HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&" | " HOPE_body=HOPE_body&" | " HOPE_body=HOPE_body&" | " HOPE_body=HOPE_body&" |

" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"

" HOPE_body=HOPE_body&"
"&vbCrlf HOPE_body=HOPE_body&"

"&vbCrlf HOPE_Title=sortname '页面标题 HOPE_TradeGo="首页 > 产品库 > "&HOPE_Title '属于该行业的推荐的网盛通会员的产品^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Set rstjy=Server.CreateObject("ADODB.Recordset") sqltjy="select top 15 Websen_productshow.id,Websen_productshow.sortid,Websen_productshow.typeid,Websen_productshow.typeid_2,Websen_productshow.Cpmc from Websen_productshow,Websen_corporation where Websen_productshow.GsID=Websen_corporation.id and Websen_corporation.Tjbz like '%0%' and Websen_productshow.flag=1 and Websen_productshow.sortid="&sortid&" and Websen_productshow.typeid=0 and Websen_productshow.typeid_2=0 and Websen_corporation.flag=1 order by Websen_corporation.trust_score desc" rstjy.Open sqltjy,conn,1,1 If rstjy.Eof Then tjcompany="暂无" End If If Not rstjy.Eof Then tjcompany="" End If If Not rstjy.Eof Then tji=1 tjcompany="" Do While Not rstjy.Eof tjcompany=tjcompany&" ．"&rstjy("cpmc")&"
" If tji=15 Then Exit Do tji=tji+1 rstjy.Movenext Loop rstjy.Close End If HOPE_TjCom=tjcompany '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pencat=Hope_HtmlResult(pencat) '进行静态页面的生成^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Set fso = YXFSO If mpage2>1 Then If Cint(Request("page2"))<1 Then Set fout = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"productshow/trade/"&sortid&".html")) fout.Write pencat&"
" fout.Close End If '生成分页页面^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Set fout = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"productshow/trade/"&sortid&"-p"&tttid&".html")) fout.Write pencat&"
" fout.Close '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ else Set sort_save = fso.CreateTextFile(Server.Mappath(HOPE_InstallDir&"productshow/trade/"&sortid&".html")) sort_save.Write pencat&"
" sort_save.Close End If Set fso = nothing '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If currentPage2 已生成*页/此类共*页:"¤tPage2&"/共"&mpage2&"页，" Response.Write "" Else Response.Write "" End If End If Set rs=nothing conn.Close Set conn=nothing %>