📄 co.asp
字号:
rs3.close
end if
cpsearch=cpsearch&"</select>"&_
"<INPUT type=submit value=查看 name=Submit22>"&_
"</TD>"&_
"</TR>"&_
"</TBODY>"&_
"</FORM>"&_
"</TABLE>"
else
cpsearch="<TABLE cellSpacing=0 cellPadding=5 width=""100%"" align=center border=0>"&_
"<FORM name=form action='' method=post>"&_
"<TBODY><TR><TD bgColor=#d7fff9>"&_
"<FONT color=#cc0000><STRONG>按系列查看产品:</STRONG></FONT>"&_
"<select name=bigclassid onChange='changeselect1(document.form.bigclassid.options[document.form.bigclassid.selectedIndex].value)' size=1>"&_
"<option selected value=''>--请选择产品大类--</option>"
set rs7=server.CreateObject("adodb.recordset")
sql7="select * from Yixiang_productclass where gsid="&id
rs7.open sql7,conn,1,1
if not rs7.eof then
do while not rs7.eof
cpsearch=cpsearch&"<option value='"&rs7("bigclassid")&"'>"&rs7("bigclassname")&"</option>"&chr(13)+chr(10)
rs7.movenext
loop
rs7.close
end if
cpsearch=cpsearch&"</select>"&_
"<select name=smallclassid>"&_
"<option selected value=''>--请选择产品小类--</option>"&_
"</select><INPUT type=submit value='查看' name=Submit22></TD>"&_
"</TR></TBODY></FORM></TABLE>"
end if
'response.write cpsearch
'产品搜索结束=====================================================================
end function
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
public function cpzs()
'产品展示开始=====================================================================
dim cpsz
bigclassid=replace_text(request("bigclassid"))
smallclassid=replace_text(request("smallclassid"))
sqlp="select * from wygkcn_productshow where gsid="&id&" and flag=1"
if Chkrequest(bigclassid) then sqlp=sqlp&" and bigclassid="&bigclassid&""
sqlp=sqlp&" order by id desc"
Set rsp= Server.CreateObject("ADODB.Recordset")
rsp.open sqlp,conn,1,1
msg_per_page=1 '定义每页显示记录条数
%>
<%
rsp.pagesize=msg_per_page '定义分页记录集每页显示记录数
if not (rsp.eof and rsp.bof) then
totalrec=rsp.RecordCount'总记录条数
if rsp.recordcount mod msg_per_page=0 then'计算总页数,recordcount:数据的总记录数
n=rsp.recordcount\msg_per_page'n:总页数
else
n=rsp.recordcount\msg_per_page+1
end if
currentpage=request("page")'currentpage:当前页
If currentpage <> "" then
currentpage = cint(currentpage)
if currentpage < 1 then
currentpage = 1
end if
if err.number <> 0 then '错误处理
err.clear
currentpage=1
end if
else
currentpage=1
End if
if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then
currentPage=1
end if
rsp.absolutepage=currentpage'absolutepage:设置指针指向某页开头
rowcount=rsp.pagesize'pagesize:设置每一页的数据记录数
end if
if rsp.eof or rsp.bof then
cpzs="<TABLE cellSpacing=0 cellPadding=0 width=""100%"" align=center border=0>"&_
"<TR><TD><FONT class=M color=silver><BR><BR>"&_
"<CENTER>该会员目前尚未发布任何的产品信息! <BR><BR><BR><BR></CENTER></TD>"&_
"<TR></TR></TBODY></TABLE>"
else
cpzs="<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>"&_
"<TBODY>"&_
"<TR>"&_
"<TD bgColor=#d1d1d1><IMG height=1 src=image/shim.gif width=1></TD>"&_
"</TR>"&_
"</TBODY>"&_
"</TABLE>"
Dim t
t=1
i=0
cpzs=cpzs&"<table width=""100%"" ><tr>"
do while not rsp.eof and rowcount > 0
cpzs=cpzs&"<td width=""25%"" align=center valign=top><DIV style=PADDING-TOP: 10px></DIV>"&_
"<TABLE width=""100%"" border=0 align=center cellSpacing=1>"&_
"<TBODY>"
if icolor=0 then
color="bgColor=#ffffff"
else
color="bgColor=#ffffff"
end if
cpzs=cpzs&"<TR "& color &">"&_
"<TD width=15% align=center>"&_
"<TABLE height=64 cellSpacing=0 cellPadding=0 width=64 border=0>"&_
"<TBODY>"&_
"<TR>"&_
"<TD align=middle>"
if rsp("picture")<>"nopicture.gif" then
cpzs=cpzs&"<A href="&HOPE_InstallDir&""&weburl&"productshow/offerdetail/"&rsp("sortid")&"-"&rsp("typeid")&"-"&rsp("typeid_2")&"-"&rsp("id")&".html target=_blank><IMG src=/Vipcom/"&rsp("picture")&" border=0 width=100 height=85></A>"
else
cpzs=cpzs&"<FONT class=C color=#cecfce>无图</FONT>"
end if
cpzs=cpzs&"</TD>"&_
"</TR>"&_
"</TBODY>"&_
"</TABLE>"&_
"<table width=""100%"" border=""0"" cellspacing=0 cellpadding=0>"&_
"<tr>"&_
"<td width=""4%""> </td>"&_
"<td width=""96%"" class=""lh13 s"">"&_
"<A href="""&HOPE_InstallDir&""&weburl&"productshow/offerdetail/"&rsp("sortid")&"-"&rsp("typeid")&"-"&rsp("typeid_2")&"-"&rsp("id")&".html target=_blank>"&_
"<B>"&rsp("cpmc")&"</B><BR>"&_
"<FONT color=#666666>发表时间:"&rsp("idate")&_
"</A></td>"&_
"</tr>"&_
"</table>"&_
"</TD>"
cpzs=cpzs&"</TR></TBODY></TABLE></td>"
if tm<>"" then
t=t+1
end if
icolor=icolor+1
if icolor>1 then icolor=0
rowcount=rowcount-1
rsp.movenext
i=i+1
if i mod 4=0 then cpzs=cpzs&"</tr><tr><td colspan=4><hr size=""1"" noshade=""noshade""></td></tr><tr>"
loop
cpzs=cpzs&"</table>"
cpzs=cpzs&"<TABLE cellSpacing=0 cellPadding=4 width=""100%"" border=0>"&_
"<TBODY>"&_
"<TR bgcolor=#f0f0f0>" &_
"<td align=center class=s>"
Pages("index.asp?MemberId="&user&"&bigclassid="&bigclassid&"&smallclassid="&smallclassid&"")
cpzs=cpzs&"</td>"&_
"</TR>"&_
"</TBODY>"&_
"</TABLE>"
end if
'产品结束开始=====================================================================
end function
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Function Pages(LinkFile)
if not (rsp.eof and rsp.bof) then
gopage=currentpage
totalpage=n
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
cpzs=cpzs&"<span disabled>前10页</span> "
Else
cpzs=cpzs&"<a href=" & LinkFile & "&page="&blockPage-10&">前10页</a> "
End If
i=1
Do Until i > 10 or blockPage > n
If blockPage=int(gopage) Then
cpzs=cpzs&"<font color=#FF0000><b>"&blockPage&"</b></font>"
Else
cpzs=cpzs&"<a href=" & LinkFile & "&page="&blockPage&">"&blockPage&"</a>"
End If
blockPage=blockPage+1
i = i + 1
Loop
if blockPage > totalpage Then
cpzs=cpzs&" <span disabled>后10页"
Else
cpzs=cpzs&" <a href=" & LinkFile & "&page="&blockPage&">后10页</a><span disabled>"
End If
cpzs=cpzs&" 直接到第 "&_
"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
for i=1 to totalpage
if i=gopage then
ch="selected"
else
ch=""
end if
cpzs=cpzs&"<option value='" & LinkFile & "&page=" & i & "' "& ch &">"&i&"</option>"
next
cpzs=cpzs&"</select>"
cpzs=cpzs&" 页<Br><Br>"
else
if blockPage = 1 Then
cpzs=cpzs&"<span disabled>【←前10页</span> "
Else
cpzs=cpzs&"<span disabled>【</span><a href=" & LinkFile & "?page="&blockPage-10&">←前10页</a> "
End If
i=1
Do Until i > 10 or blockPage > n
If blockPage=int(gopage) Then
cpzs=cpzs&"<font color=#FF0000>[<b>"&blockPage&"</b>]</font>"
Else
cpzs=cpzs&"<a href=" & LinkFile & "?page="&blockPage&">["&blockPage&"]</a> "
End If
blockPage=blockPage+1
i = i + 1
Loop
if blockPage > totalpage Then
cpzs=cpzs&" <span disabled>后10页→】"&_
El
cpzs=cpzs&" <a href=" & LinkFile & "?page="&blockPage&">后10页→</a><span disabled>】"
End If
cpzs=cpzs&" 直接到第 "&_
"<select onchange=if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}>"
for i=1 to totalpage
if i=gopage then
ch="selected"
else
ch=""
end if
cpzs=cpzs&"<option value='" & LinkFile & "&page=" & i & "' "& ch &">"&i&"</option>"
next
cpzs=cpzs&"</select>"
cpzs=cpzs&" 页<Br><Br>"
End If
Startinfo=((gopage-1)*msg_per_page)+1
Endinfo=gopage*msg_per_page
if Endinfo>totalrec then Endinfo=totalrec
cpzs=cpzs&" 共 "&totalrec&" 条信息 当前显示第 "&Startinfo&" - "&Endinfo&" 条 每页 "&msg_per_page&" 条信息 共 "&n&" 页"
end if
End Function
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
public function cp_list_fun()
'产品展示不分页=====================================================================
dim cp_list '参数1: 调用条数
'参数2: 调用标题长度,以字符为单位,超过部分将不会显示。
'参数3:排序方法,为1按发表时间,为2按点击数,为3按回复数。
'参数4: 是否推荐,为1调用所有产品,为2调用推荐产品。
'参数5: 产品分类, 为1则调用所有分类的分类
'参数6: 是否显示图片 为1显示图片,2不显示
'参数7: 显示信息 1为显示发表时间 2 显示点击数
sqlp="select top 12 id,picture,cpmc,idate from wygkcn_productshow where gsid="&session("id")&" and flag=1"
sqlp=sqlp&" order by id desc"
Set rsp= Server.CreateObject("ADODB.Recordset")
rsp.open sqlp,conn,1,1
if not rsp.eof then
cp_list=cp_list&"<table width=""100%"" border=0 bgcolor=#ffffff><tr>"
dim cpi
cpi=0
do while not rsp.eof
cp_list=cp_list&"<td align=center width=""25%"" style=line-height:25px;><table width=""100%""><tr><td align=center><img src="&weburl&"picture\"&rsp("picture")&" width=""100"" height=""75""></td></tr><tr><td align=center><p class=s><a href= >"&rsp("cpmc")&"</a></p></td></tr></table></td>"
rsp.movenext
cpi=cpi+1
if cpi mod 4=0 then cp_list=cp_list&"</tr><tr><td colspan=4><hr size=""1"" noshade=""noshade""></td></tr></tr>"
loop
cp_list=cp_list&"</tr></table>"
end if
cp_list_fun=cp_list
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -