📄 maketrade.asp
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>生成求购一级分类</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #E4EDF9;
}
body,td,th {
font-size: 12px;
}
-->
</style>
</head>
<body>
<%
data_path="../../../" 'ACC连接数据库路径,对SQL无效
dir="no"
numid="no"
%>
<!--#include file="../../../conn/conn.asp"-->
<!--#include file="../../../inc/filesystem.asp"-->
<!--#include file="../../../inc/safe.asp"-->
<!--#include file="../../../inc/classcount.asp"-->
<!--#include file="../index/temp_inc.asp"-->
<!--#include file="../makerole.asp"-->
<%
'过滤内容中出现的html代码,引用时用 “RemoveHTML(调用内容)”
Function RemoveHTML(strHTML)
Dim objRegExp, Match, Matches
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
'取闭合的<>
objRegExp.Pattern = "<.+?>"
'进行匹配
Set Matches = objRegExp.Execute(strHTML)
' 遍历匹配集合,并替换掉匹配的项目
For Each Match in Matches
strHtml=Replace(strHTML,Match.Value,"")
Next
RemoveHTML=strHTML
Set objRegExp = Nothing
End Function
'定义结束。
'读取模板
Set rs1=Server.CreateObject("adodb.recordSet")
rs1.Open ("select seller_sort from Websen_worldec_Temp where yx_selected=1"),conn,1,1
If rs1.Eof Then
Response.Write("<br><br> <font color=red>对不起!该模版不存在!</font><a href='#' onclick='javascript:window.close();'>关闭</a>")
Response.End()
End If
If Not rs1.Eof Then
pencat=rs1("seller_sort")
rs1.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"),conn,1,1
End If
If not rs.Eof Then
rs.Pagesize=MaxPerPage
mpage=rs.Pagecount '得到总页数
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 "<b>已生成/要生成的一级分类:<font color=#FF0000>"¤tPage-1&"</font>/<font color=#FF0000><b>"&mpage&"</b></font>个"
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If mpage<currentPage Then
Response.Write ",完成时间"&Now()&"</b> "
Else
HOPE_type=HOPE_type&"<script src='"&HOPE_InstallDir&"autokind/autokind.js'></script><input type='text' id='installurltr' style='display:none; width:12;height:1' value="&HOPE_InstallDir&"autokind/seller_2.asp>"
HOPE_type=HOPE_type&"<div id='yabock'><div class='mulur'><a href='"&HOPE_InstallDir&"index.html' class='la'>网站首页</a> > <a href='"&HOPE_InstallDir&"seller/index.html' class='la'>求购信息</a> > "&sortname&"</div> <div class='fenli'><div class='yoleft'><img src='#HOPE_InstallDir#images/indexpoint.gif' width='5' height='9' /> 按<strong>分类</strong>筛选:</div><div class='yorift'><table width='600' border='0' cellspacing='0' cellpadding='0'><tr>"
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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'查询出属于第一类的二级分类下的所含小分类的总数
Set thirrs=Server.CreateObject("ADODB.Recordset")
thirsql="SELECT COUNT(*)AS thircount FROM Websen_Class_3 WHERE typeid="&rstype("typeid")
thirrs.Open thirsql,conn,1,1
If thirrs.Eof Then
seCount_sale=""
End If
If not thirrs.Eof Then
If thirrs("thircount")<=0 Then
seCount_sale="<font color:#000000>(0)</font>"
Else
seCount_sale="<font color:#000000>("&thirrs("thircount")&")</font>"
End If
thirrs.close
End If
'^^^^^^^^^^^^^^^^^^^^^^^^^ end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
HOPE_type=HOPE_type&" <td height=10 valign=top>"
HOPE_type=HOPE_type&"<A href="""&sortid&"-"&rstype("typeid")&".html"" class=M onclick='AjaxSearchtr("&rstype("typeid")&")'>"&rstype("typename")&"</A> "&seCount_sale&" "
HOPE_type=HOPE_type&" </td> "
If j mod 5 = 0 Then
HOPE_type=HOPE_type&"</tr><tr>"
End If
j=j+1
rstype.Movenext
Loop
Set rstype=Nothing
End If
HOPE_type=HOPE_type&"</tr></table></div></div></div>"
'获取替换标签的内容^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
msg_per_page=10
If Request("all")="all" Then
Set rs=Server.CreateObject("adodb.recordset")
rs.Open ("select Websen_info.*,Websen_corporation.id,Websen_corporation.msn,Websen_corporation.flag as corflag,Websen_corporation.qymc,Websen_corporation.tm,Websen_corporation.[user],Websen_corporation.country,Websen_corporation.sf,Websen_corporation.city,Websen_corporation.web,Websen_corporation.url,Websen_corporation.gradeid,Websen_corporation.trust_score from Websen_Info,Websen_corporation where Websen_info.sortid="&sortid&" and Websen_info.type='买' and Websen_corporation.id=Websen_info.gsid and Websen_info.flag=1 order by Websen_corporation.trust_score 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
%>
<!--#include file="../../../inc/headpage_html.asp"-->
<%
'HOPE_body用于显示页面的主题分类信息^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
HOPE_body=HOPE_body&"<SCRIPT language=javascript>function killErrors(){return true;}window.onerror = killErrors;</SCRIPT>"
If rs.Eof Then
HOPE_body=HOPE_body&"<br><br><div align='center'>暂无求购信息</div><br>"
Else
i=1
HOPE_body=HOPE_body&"<script type='text/javascript' src='"&HOPE_InstallDir&"autokind/showmsgrole.js'></script><script language='vbscript'>sub AjaxSearchmsg() end sub </script><input type='text' id='installurlmsg' style='display:none; width:12;height:1' value='"&HOPE_InstallDir&"autokind/showmsgrole.asp'/>"
do while not rs.Eof and rowcount > 0
HOPE_body=HOPE_body&"<TABLE width='100%' height=85 border=0 align=center cellPadding=0 cellSpacing=0>"&vbCrlf
HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
HOPE_body=HOPE_body&"<TR ID=compareColor"&i&""
If icolor=0 Then
HOPE_body=HOPE_body&" bgColor=#ffffff"
Else
HOPE_body=HOPE_body&" bgColor=#F9F9F9"
End If
HOPE_body=HOPE_body&">"
HOPE_body=HOPE_body&"<TD align=middle width='5%' class='peyen'>"&vbCrlf
HOPE_body=HOPE_body&"<TABLE height=64 cellSpacing=0 cellPadding=0 width=64 border=0>"&vbCrlf
HOPE_body=HOPE_body&"<TBODY>"&vbCrlf
HOPE_body=HOPE_body&"<TR>"&vbCrlf
HOPE_body=HOPE_body&"<TD align=middle>"&vbCrlf
'处理产品图片^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If rs("draw")<>"" Then
HOPE_body=HOPE_body&"<A class=s href="&HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html target=_blank>"
HOPE_body=HOPE_body&"<IMG src='"&HOPE_InstallDir&"Vipcom/"&rs("user")&"/"&rs("draw")&"' width='100' height='100' border=0> </A>"
Else
HOPE_body=HOPE_body&"<div class='bick_photo'>无图</div>"
End If
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
HOPE_body=HOPE_body&"</TD>"&vbCrlf
HOPE_body=HOPE_body&"</TR>"&vbCrlf
HOPE_body=HOPE_body&"</TBODY>"&vbCrlf
HOPE_body=HOPE_body&"</TABLE></TD>"&vbCrlf
HOPE_body=HOPE_body&"<TD width='3%' class='peyen'> </TD>"&vbCrlf
HOPE_body=HOPE_body&"<TD width='40%' valign='top' style=' line-height:160%; padding-top: 12px' class='peyen'><A href="&HOPE_InstallDir&"seller/offerdetail/"&rs("sortid")&"-"&rs("typeid")&"-"&rs("typeid_2")&"-"&rs("info_id")&".html target=_blank class=b>"&Left(rs("showname"),20)&"</A> <FONT color=#000000>["&rs("dateandtime")&"]</FONT> <BR>[摘要] <span style=' font-size: 12px'>"&Left(RemoveHTML(rs("content")),40)&" </span><BR>"&vbCrlf
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&"<a href='http://"&rs("user")&"."&WebUrl1&"' target=_blank class=s>"&rs("qymc")&"</A>"
Else
HOPE_body=HOPE_body&"<A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/' target=_blank class=s>"&rs("qymc")&"</A>"
End If
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Else
HOPE_body=HOPE_body&"<A href='"&HOPE_InstallDir&"vipcom/"&rs("user")&"/' target=_blank class=s>"&rs("qymc")&"</A>"
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
rsmp1.close
end if
HOPE_body=HOPE_body&"<br><a href='#HOPE_InstallDir#member/getprice/message.asp?info_id="&rs("info_id")&"' target='_blank'><img src='#HOPE_InstallDir#images/wansen_xj.gif' width='69' height='21' border='0' /></a> <a href='#HOPE_InstallDir#Vipcom/"&rs("user")&"/Contact.htm' target='_blank'><img src='#HOPE_InstallDir#images/wansen_lx.gif' width='69' height='21' border='0' /></a></TD>"&vbCrlf
HOPE_body=HOPE_body&"<TD width=""15%"" style=' padding-left: 60px' class='peyen'><img border=""0"" src=""../../UploadFile/vipgrade/"&FileFlag&""" width=20></td>"
HOPE_body=HOPE_body&"<TD width=""13%"" align=center style="" padding-right: 10px"" class='peyen'>"&vbCrlf
HOPE_body=HOPE_body&"<img src=""../../images/trust.gif"" width=22 height=14 border=0><br>"&rs("trust_score")&"<br> "
HOPE_body=HOPE_body&"</TD>"&vbCrlf
HOPE_body=HOPE_body&"<TD align=middle width='10%' valign='top' class='peyen'>"&vbCrlf
HOPE_body=HOPE_body&"<div align=center style='padding-top: 15px'>"&vbCrlf
If rs("tm")<>"" then
HOPE_body=HOPE_body&"<a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin="&rs("tm")&"Site=www.websen.net&Menu=yes><img border=0 SRC=#HOPE_InstallDir#images/anlineqt.gif alt=点击这里给我发消息></a><BR><BR>"
End if
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -