<%@ Language=VBScript%>
<%
Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="dsn_root.asp" -->
<!-- #include file="func.inc.asp" -->
<%
menu = "products"
menu_name = "产品展示"
baseclass = "101"
pageno = toInt(Request.QueryString("pageno"), 1, "")
classcode = toInt(Request.QueryString("classcode"), 0, "")
set cn = Server.CreateObject("adodb.Connection")
set rs = Server.CreateObject("adodb.Recordset")
cn.Open mycnstr
classcode = Request.QueryString("classcode")
pageno = toInt(Request.QueryString("pageno"), 1, "")
if not isnumeric(classcode) then classcode = ""
if classcode="" then
sql="select top 1 classcode,classname from product_class where parentcode='" & baseclass & "' order by sortnum"
else
sql="select classcode,classname from product_class where classcode='" & classcode & "' and parentcode='" & baseclass & "'"
end if
rs.Open sql,cn,0,1,1
if not rs.EOF then
classcode=rs(0)
classname=trim(rs(1))
else
Response.Redirect "default.asp"
end if
rs.Close
%>
<!-- #include file="begin.asp" -->
<table width="798" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><img src="images/<%=menu%>/banner_778_<%=classcode%>.jpg" width="798" height="158"></td>
</tr>
</table>
<table width="798" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="2" width="10" background="images/show_1.jpg"> </td>
<td width="188" height="100%" align="center" valign="top" background="images/bg_title_4.gif">
<!-- #include file="left_product.asp" -->
</td>
<td rowspan="2" width="14" align="center" valign="top" bgcolor="#FFFFFF"> </td>
<td rowspan="2" align="left" valign="top" bgcolor="#FFFFFF">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right"><img src="images/icon_2.gif" width="9" height="9"> <span class="font4">位置:</span><a href="default.asp" class="a02">首页</a>
<span class="font1">></span> <a href="<%=menu%>.asp" class="a02"><%=menu_name%></a> <span class="font1"><font color="#666666">></font></span>
<a href="<%=menu%>.asp?classcode=<%=classcode%>" class="a02"><%=classname%></a> </td>
</tr>
</table>
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="38"><img src="images/icon_1.gif" width="38" height="26"></td>
<td width="120" align="center" class="font5"><%=classname%></td>
<td background="images/bg_title_2.gif"> </td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25"> </td>
</tr>
</table>
<%
sql="select prono,title,picflag,content from product where classcode='" & classcode & "' and state='1' order by sortnum desc"
rs.Open sql,cn,1,1,1
pagesize = 2
rs.PageSize=pagesize
pagecount = rs.PageCount
reccount = rs.RecordCount
pageno = toInt(pageno,1, pagecount)
if pageno > 1 then rs.AbsolutePage = pageno
i=1
do while not rs.EOF and i<=pagesize
%>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
if rs("picflag") = "1" then
%>
<td width="25%"><a href="products_display.asp?prono=<%=rs("prono")%>" target="_blank"><img src="admin/pic_display.asp?code=product&keyno=<%=rs("prono")%>" width="103" height="93" border="0" style="border:1px solid #000000;"></a></td>
<%
else
%>
<td width="25%" style="padding-left:30px;">暂无图片</td>
<%
Response.Write ""
end if
%>
<td valign="top">
<table width="165" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" height="14" align="center" bgcolor="#cc0000"><img src="images/products/arrow_1.gif" width="4" height="6"></td>
<td bgcolor="#cc0000"><font color="#FFFFFF"><%=rs("title")%></font></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="font2"><%=left(rs("content"), 50)%>...</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="products_display.asp?prono=<%=rs("prono")%>" class="a11" target="_blank"><font color="#666666">详细信息 >></font></a></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30"> </td>
</tr>
</table>
<%
i = i + 1
rs.MoveNext
loop
rs.Close
%>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22" align="right">
<%=getPageStr(menu & ".asp?classcode=" & classcode, pageno, pagecount)%>
</td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5" background="images/line_point3.gif"></td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
</td>
<td rowspan="2" width="10" background="images/show_2.jpg"> </td>
</tr>
<tr>
<td align="center" valign="bottom" background="images/bg_title_4.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="20">
<td></td>
</tr>
<tr>
<td><img src="images/picture_bottom.gif" width="188" height="168"></td>
</tr>
</table>
</td>
</tr>
</table>
</table>
<!-- #include file="end.asp" -->
这是products.asp的所有代码,求大家指点