<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%dim id
id=request.QueryString("id")
if not isinteger(id) then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
end if
set rs_shjia=server.CreateObject("adodb.recordset")
strshjia="select * from shjia where flag<>1 and shjiaid="&id
rs_shjia.open strshjia,conn,1,1
if rs_shjia.bof and rs_shjia.eof then
response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>"
end if
%>
<title><%=rs_shjia("name")%></title>
<link href="../image/css.css" rel="stylesheet" type="text/css">
<body class="body666">
<!--#include file="top.asp" -->
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td style="padding-left:2px"><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="171" style="border-top:1px solid #FFB71D;padding-left:5px"><font color="#B21C00">北京时间:</font><script language=javascript> 
　　today=new Date(); 
　　function date(){ 
　　this.length=date.arguments.length 
　　for(var i=0;i<this.length;i++) 
　　this[i+1]=date.arguments } 
　　var d=new date("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); 
　　document.write( "<font color=#B21C00 style=’font-size:9pt;font-family: 宋体’>", 
　　today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日","</font>" );</script>
</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="28"><img src="images/menu_06.gif" width="28" height="23"></td>
<td bgcolor="#FFB71D" style="padding-left:20px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font color="#B21C00" style="font-size:14px"><b><%=left(rs_shjia("name"),12)%>产品库</b></font></td>
<td><iframe src="marqueenews.asp" frameborder="0" scrolling="no" height="18" width="250"></iframe></td>
<td align="right"><font color="#FFFFFF"><b>更多...</b></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="180" valign="top" style="padding-left:2px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#F9FCB9" style="padding:8px"><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFB71D"><!--#include file="fenlei.asp" --></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#F9FCB9" style="padding:8px"><table style="border:1px solid #C68700" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FFB71D"><!--#include file="gouwucheinfo.asp"--></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td valign="top" style="padding-left:2px"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2"></td>
</tr>
<tr><td><%set rs_shp=server.createobject("adodb.recordset")
if request("nclassid")="" then
rs_shp.open "select * from price_shjia where shjiaid="&id&" order by updatetime desc",conn,1,1
else
rs_shp.open "select * from price_shjia where shjiaid="&id&" and nclassid="&request("nclassid")&" order by updatetime desc",conn,1,1
end if
if rs_shp.recordcount=0 then%>
<table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align=center>暂时没有添加商品</td>
</tr>
</table>
<%else
if request("nclassid")<>"" then%>
<table style="background-color:#F9FCB9;height:20;width:100%;border:1px solid #C68700">
<tr><td width="20"><img src="images/adminleft.gif" width="20" height="20"></td>
<td><font color="#B21C00" style="font-size:14px"><b>
<%set rs=server.createobject("adodb.recordset")
rs.open"select * from shop_nclass where nclassid="&rs_shp("nclassid")&"",conn,1,1%><%=rs("nclass")%>
<%rs.close
set rs=nothing%>所有产品</b></font></td>
</tr>
</table>
<%end if
rs_shp.PageSize =10 '每页记录条数
iCount=rs_shp.RecordCount '记录总数
iPageSize=rs_shp.PageSize
maxpage=rs_shp.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs_shp.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
For i=1 To x
money=split(rs_shp("money"),"|")%>
<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td width="80" align="center" valign="top">
<table onMouseOver="this.style.backgroundColor='#FF4FAE'" onMouseOut="this.style.backgroundColor=''" cellspacing=1 cellpadding=2 bgcolor=#e1e1e1 border=0>
<tr>
<td bgcolor=#ffffff align=center><a href=price.asp?id=<%=rs_shjia("shjiaid")%>&book_id=<%=rs_shp("book_id")%>><img src="../<%=trim(rs_shp("pic"))%>"width=120 border=0 height=80></a></td>
</tr>
</table></td>
<td valign="top" style='PADDING-TOP: 10px'><a href=price.asp?id=<%=rs_shjia("shjiaid")%>&book_id=<%=rs_shp("book_id")%> class="14"><font color="#666666"><b><%=trim(rs_shp("bookname"))%></b></font></a><br><%=replace(rs_shp("hid"),"|","<br>")%></td>
<td width="20%" align="center" valign="top">报价：<font color=red>￥<%=money(0)%></font><br>
<%if Request.Cookies("godbook")("reglx")=2 then%>同行报价<%end if%><%if Request.Cookies("godbook")("reglx")=2 then%><font color="#FF0000">￥<%=money(1)%></font><br><%end if%><a href="../uindex/index.asp?action=goumai&id=<%=rs_shp("bookid")%>&from=<%=rs_shjia("name")%>">购买产品</a> <a href="#">加入收藏</a> </td>
</tr>
</table>
<%rs_shp.movenext
next
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs_shp.close
set rs_shp=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=center height=35>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首 页 " & vbCrLf)
Response.Write ("上一页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下一页 " & vbCrLf)
Response.Write ("尾 页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾 页</A> " & vbCrLf)
end if
Response.Write(" 页次：" & page & "/" & pageCount & "页" &vbCrLf)
Response.Write(" 共有" & iCount & "种商品" &vbCrLf)
Response.Write(" 转到" & "<INPUT CLASS=wenbenkuang TYEP=TEXT NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页"& vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub%></td></tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>