📄 products.asp
字号:
<%@ Language=VBScript%>
<%
Response.Buffer=false
Response.Expires=0
%>
<!-- #include file="dsnroot.asp" -->
<!-- #include file="links.asp" -->
<%
set cn=Server.CreateObject("ADODB.Connection")
cn.Open mycnstr
set rs=server.CreateObject("ADODB.Recordset")
menu="11112111"
id=Request.QueryString ("id")
pageno=Request.QueryString ("pageno")
if id="" then
id=0
else
id=cint(id)
end if
if id=0 then
title="最新产品"
end if
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
flag=cint(trim(Request.Form ("select")))
qtxt=trim(Request.Form ("qtxt"))
if flag=0 then
qtxt=" (name like '%"+qtxt+"%' or keyword1 like '%"+qtxt+"%')"
else
qtxt=" pid="&flag&" and (name like '%"+qtxt+"%' or keyword1 like '%"+qtxt+"%')"
end if
q=1
else
q=0
end if
%>
<!-- #include file="design.asp" -->
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#66cc00" width="1"></td>
<td width="190" valign="top" background="images/group/left_p_group.jpg" style="background-repeat: no-repeat; background-position: bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/group/left_top_p.jpg" width="190" height="45"></td>
</tr>
</table>
<table width="180" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td><img src="images/products/tp_products.jpg" width="180" height="39"></td>
</tr>
<tr>
<td background="images/group/left_nav_bg.jpg">
<table width="78%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" height="6"></td>
</tr>
<tr>
<td width="20" class="font3">※</td>
<td><a href="<%=linkproducts%>" class="anews2"><font <%if id=0 and q=0 then Response.Write ("color=#FF9900") else Response.Write ("color=#000000") %>>最新产品</font></a></td>
</tr>
</table>
<%sqltext="select id,name from danwei where enable=1 and pid=6 order by pl"
rs.Open sqltext,cn,1,1
do while not rs.EOF
if id=rs("id") then
fontcolor="#ff9900"
title=trim(rs("name"))
else
fontcolor="#000000"
end if
%>
<table width="78%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" height="6"></td>
</tr>
<tr>
<td width="20" class="font3">※</td>
<td><a href="<%=linkproducts%>?id=<%=rs("id")%>" class="anews2"><font color="<%=fontcolor%>"><%=trim(rs("name"))%></font></a></td>
</tr>
</table>
<%rs.MoveNext
loop
rs.Close %>
<table width="78%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="2" height="6"></td>
</tr>
<tr>
<td width="20" class="font3">※</td>
<td><a href="products_price.asp" class="anews2"><font color="#000000">产品价格表</font></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/group/left_nav_bot.jpg" width="180" height="89"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="50">
<tr>
<td> </td>
</tr>
</table>
</td>
<td background="images/line_v.gif" width="1"></td>
<td valign="top" background="images/bot_bg.jpg" style="background-repeat: repeat-x; background-position: bottom">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/products/products_p.jpg" width="585" height="130"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td background="images/group/line3.gif" style="background-repeat: no-repeat; background-position: bottom" height="36" align="center"><%=title%></td>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> </td>
</tr>
</table>
<%
if q=0 then
if id=0 then
sqltext="select id,name,picflag from cdanwei where enable=1 and ppid=6 and dateenable=1 order by creatdate desc"
else
sqltext="select id,name,picflag from cdanwei where enable=1 and ppid=6 and pid="&id&" order by pl desc"
end if
else
sqltext="select id,name,picflag from cdanwei where enable=1 and ppid=6 and"+qtxt+" order by creatdate desc"
end if
'Response.Write sqltext
'Response.End
rs.Open sqltext,cn,1,1
listcs=9
rs.PageSize=listcs
if pageno="" then
pageno=1
else
pageno=cint(pageno)
end if
m=0
if rs.PageCount>0 then rs.AbsolutePage=pageno
if not rs.EOF and m<listcs then
colzs=3
rowzs=3
for i=1 to rowzs
if not rs.EOF then
%>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<%for j=1 to colzs
if not rs.EOF and m<listcs then %>
<td align="left">
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#339900" height="1"></td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#339900" width="1"></td>
<td width="158" height="100">
<%if rs("picflag")=1 then%>
<a href="<%=linkproducstdetail%>?id=<%=rs("id")%>&pid=<%=id%>" class="anews2" target=_blank><img src="./admin/jpg.asp?id=<%=rs("id")%>&tabname=cdanwei" width="158" height="90" border=0></a>
<%else%>
<%end if%>
</td>
<td bgcolor="#339900" width="1"></td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#339900" width="1"></td>
<td width="158"><img src="images/new_products_t_top_p.gif" width="158" height="9"></td>
<td bgcolor="#339900" width="1"></td>
</tr>
</table>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#339900" width="1"></td>
<td width="158" bgcolor="#006600" height="13" align="center"><a href="<%=linkproducstdetail%>?id=<%=rs("id")%>&pid=<%=id%>" class="anews2" target=_blank><font color="#FFFFFF"><%=trim(rs("name"))%></font></a></td>
<td bgcolor="#339900" width="1"></td>
</tr>
</table>
</td>
<%rs.MoveNext
m=m+1
else%>
<td class="font1" width=160> </td>
<%end if
next%>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr height=20><td> </td></tr>
</table>
<%end if
next
end if%>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr height=40>
<td> </td>
</tr>
<tr>
<td>
<%if q=0 then%>
<%if pageno>1 then%>
<a href="<%=linkproducts%>?pageno=<%=pageno-1%>&id=<%=id%>"><img src="images/arrow_pre.gif" width="55" height="12" border="0"></a>
<%end if%>
<%if pageno<rs.PageCount then%>
<a href="<%=linkproducts%>?pageno=<%=pageno+1%>&id=<%=id%>"><img src="images/arrow_next.gif" width="55" height="12" border="0"></a>
<%end if%>
<%end if%>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<%rs.Close %>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="50"> </td>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td background="images/line_h.gif" height="1"></td>
</tr>
<tr>
<td height="30" align="right"><a href="#top"><img src="images/group/bt_top.gif" width="50" height="18" border="0"></a></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</td>
<td bgcolor="#66cc00" width="1"></td>
</tr>
</table>
<!-- #include file="end.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -