生成专项商机分类

<% data_path="../../../" 'ACC连接数据库路径，对SQL无效 dir="no" numid="no" %> <% Set rs=Server.CreateObject("adodb.recordSet") rs.Open ("select vipinfo_index1 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("vipinfo_index1") rs.Close Set rs=Nothing 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 if Request("other")="SendTo" then Sql2="Where typeid="&Trim(Request("TypeID"))&"" Sql="select * from Websen_vipinfo_Class "&Sql2&" order by typeID desc" Else Sql="select * from Websen_vipinfo_Class order by typeID desc" End if Set rs=Server.CreateObject("adodb.recordSet") rs.Open Sql,conn,1,1 If Not rs.Eof Then rs.Pagesize=MaxPerPage mpage=rs.Pagecount '得到总页数 rs.Move (currentPage-1)*MaxPerPage If mpage>=currentPage Then ttid=rs("typeID") ttname=rs("type") End If End If rs.Close End If If ttid="" Then ttid=0 End If Response.Write "已生成/要生成的二级分类:"¤tPage-1&"/"&mpage&"个" If mpage " Else msg_per_page=10 If Request("all")="all" Then Set rs=Server.CreateObject("adodb.recordSet") rs.Open ("select vipinfo_id,viptype,vipshowname,vipperiod,vippricetems,country,dateandtime from Websen_vipinfo where viptype="&Cint(ttid)&" order by vipinfo_ID desc"),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&"
此类暂无专项商机信息
"&vbCrlf Else Do While Not rs.Eof And rowcount > 0 HOPE_body=HOPE_body&"

"&vbCrlf HOPE_body=HOPE_body&""&vbCrlf Else HOPE_body=HOPE_body&"#f6f6f6'"">"&vbCrlf End If HOPE_body=HOPE_body&"
["&ttname&"]"&rs("vipshowname")&" "&vbCrlf HOPE_body=HOPE_body&" "&rs("dateandtime")&" "&vbCrlf HOPE_body=HOPE_body&" | "&rs("vipperiod")&" "&vbCrlf HOPE_body=HOPE_body&" | "&rs("vippricetems")&" "&vbCrlf HOPE_body=HOPE_body&" | "&rs("country")&" "&vbCrlf HOPE_body=HOPE_body&"

"&vbCrlf 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&"
"&vbCrlf HOPE_body=HOPE_body&"

"&vbCrlf HOPE_body=HOPE_body&"

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

"&vbCrlf 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 If blockPage = 1 Then HOPE_body=HOPE_body&"【←前10页 " Else HOPE_body=HOPE_body&"【←前10页 " End If 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 If blockPage > totalpage Then HOPE_body=HOPE_body&" 后10页→】" Else HOPE_body=HOPE_body&" 后10页→】" End If HOPE_body=HOPE_body&" 直接到第 " HOPE_body=HOPE_body&"
" HOPE_body=HOPE_body&" 页
" Else If blockPage = 1 Then HOPE_body=HOPE_body&"【←前10页 " Else HOPE_body=HOPE_body&"【←前10页 " End If 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 If blockPage > totalpage Then HOPE_body=HOPE_body&" 后10页→】" Else HOPE_body=HOPE_body&" 后10页→】" End If 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 HOPE_body=HOPE_body&" 共 "&totalrec&" 条信息 当前显示第 "&Startinfo&" - "&Endinfo&" 条 每页 "&msg_per_page&" 条信息 共 "&mpage2&" 页" End If HOPE_body=HOPE_body&"
"&vbCrlf HOPE_body=HOPE_body&"

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

"&vbCrlf HOPE_body=HOPE_body&"

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

"&vbCrlf '专项商机类别大栏目显示^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HOPE_dh=HOPE_dh&"

"&vbCrlf HOPE_dh=HOPE_dh&"
"&vbCrlf Set rsdh=Server.CreateObject("adodb.recordSet") dhsql="select * from Websen_vipinfo_Class order by typeID desc" rsdh.Open dhsql,conn,1,1 If Not rsdh.Eof Then Do While Not rsdh.Eof HOPE_dh=HOPE_dh&"
"&rsdh("type")&" "&vbCrlf rsdh.MoveNext Loop rsdh.Close End If HOPE_dh=HOPE_dh&" | "&vbCrlf HOPE_dh=HOPE_dh&" | "&vbCrlf HOPE_dh=HOPE_dh&"
"&vbCrlf HOPE_dh=HOPE_dh&"

"&vbCrlf '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ HOPE_Title=ttname '网页标题头 HOPE_VipInfoAll="("&zxshangji_all&")" '专项商机总数 HOPE_SortDate=listcount_vipinfo_tade_html '此类今日更新数 HOPE_TotalRec=listcount_vipinfo_html '此类专项商机数 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&"vipinfo/"&ttid&".html") ) fout.Write pencat fout.Close End If Set fout = fso.CreateTextFile(Server.MapPath(HOPE_InstallDir&"vipinfo/"&ttid&"-p"&tttid&".html")) fout.Write pencat fout.Close Else Set sort_save = fso.CreateTextFile(Server.MapPath(HOPE_InstallDir&"vipinfo/"&ttid&".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 conn.Close Set conn=Nothing %>