<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<title><%=webname%>--商品报价单</title>
<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" class=table-zuoyou bgcolor="#FFFFFF" >
<TR>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="center"  width="85%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B><%= webname %>商品报价单</B>  </td>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="center"  width="15%"><%= date %></td>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="center"  width="5%"><input type="button" name="Submit4" value="打 印" onClick="javascript:window.print()">   </td>
</TR></table>
<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" class=table-zuoyou bgcolor="#FFFFFF" >
<TR>
<td BGCOLOR=#ffffff HEIGHT="1"  ALIGN="center"  > </td>
  </td>
</TR></table>
<TABLE cellSpacing=0 cellPadding=0 width="980" BORDER="1" bordercolor="#E0E0E0" align="center" bgcolor="#FFFFFF" >
				  <tr><TD width="26%"  height="25" align=center ><B>商品名称</B></TD><TD width="15%" align=center ><B>品牌</B></TD>
                      <TD width="10%" align=center ><B>市场价</B></TD> <TD width="10%" align=center ><B>网店价</B></TD><TD  width="39%"  height="25" align=center ><B>简介</B></TD></tr>
                  </table>

      <%
		Const MaxPerPage=20
   				dim totalPut   
   				dim CurrentPage
   				dim TotalPages
   				dim j
   				dim sql
    			if Not isempty(SafeRequest("page",1)) then
      				currentPage=Cint(SafeRequest("page",1))
   				else
      				currentPage=1
   				end if 
						
		 set rs=server.CreateObject("adodb.recordset")
		  rs.open "select id,prename,name,company,intro,introduce,stock,predate,productdate,pretype,type,viewnum,price,price1,price2,price3,other,grade,discount,pic,brand,amount from product where stock >= 1 order by  name desc",conn,1,1
		  
			if rs.eof And rs.bof then
       				Response.Write "<p align='center' class='contents'> 您还没有添加新闻！</p>"
   				else
	  				totalPut=rs.recordcount

      				if currentpage<1 then
          				currentpage=1
      				end if

      				if (currentpage-1)*MaxPerPage>totalput then
	   					if (totalPut mod MaxPerPage)=0 then
	     					currentpage= totalPut \ MaxPerPage
	   					else
	      					currentpage= totalPut \ MaxPerPage + 1
	   					end if
      				end if

       				if currentPage=1 then
            			showContent
            			showpage totalput,MaxPerPage,"baojiaprint.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookbrand
            				bookbrand=rs.bookbrand
            				showContent
             				showpage totalput,MaxPerPage,"baojiaprint.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"baojiaprint.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0
	  					

   				
			
     do while not rs.eof%>
      
<TABLE width="980" cellSpacing=0 cellPadding=0 width="100%" BORDER="1" bordercolor="#E0E0E0"  align="center" bgcolor="#FFFFFF" >
                  <TBODY>
				 <tr ><TD width="26%" style="word-wrap:break-word;word-break:break-all">&nbsp;<A  HREF=product.asp?id=<%=rs("id")%> TARGET=_blank title=<%=trim(rs("name"))%>><%=trim(rs("name"))%> 
			</A></TD><TD width="15%" align=left style="word-wrap:break-word;word-break:break-all">&nbsp;<a href=sundxbrand.asp?brandName=<% = rs("brand") %>><font color="#333333"> 
                 <%=trim(rs("brand"))%>
                  </font></a></TD>
                      <TD width="10%" align=left style="word-wrap:break-word;word-break:break-all">&nbsp;<%=trim(rs("price1"))%>&nbsp;元</TD><TD width="10%" align=left style="word-wrap:break-word;word-break:break-all">&nbsp;<%
		If rs("amount") = 0 or LngUserID=0 or Lnggrpid = 4 Then %><FONT COLOR=#930000><%=trim(rs("price2"))%></FONT>元
           <% Else %>
               <FONT COLOR=#C40000><%=Round(trim(rs("price2")*LngDiscount),2)%></FONT>元 <%end if%></TD><TD width="39%" style="word-wrap:break-word;word-break:break-all">&nbsp;<A  HREF=product.asp?id=<%=rs("id")%> TARGET=_blank title=<%=trim(rs("name"))%>><%=trim(rs("introduce"))%></A></TD> 
                      </tr>
					
                    </TBODY> 
                </TABLE>
       
      <%i=i+1
			if i>=MaxPerPage then Exit Do
			rs.movenext
		  loop
		  rs.close
		  set rs=nothing%><tr><td colspan="3"><%  
				End Sub   
  
				Function showpage(totalnumber,maxperpage,filename)  
  				Dim n
  				
				If totalnumber Mod maxperpage=0 Then  
					n= totalnumber \ maxperpage  
				Else
					n= totalnumber \ maxperpage+1  
				End If %>
				
				<form method=Post action= <% = filename %>>
				<p align='center'> 
				<%
				If CurrentPage<2 Then  %>
				<FONT COLOR=#333333>首 页 上一页
				<%
				Else   %>
				<a href=<% = filename %>?page=1><FONT COLOR=#333333>首 页</a>
				<a href=<% = filename %>?page=<% = CurrentPage-1 %>><FONT COLOR=#333333>上一页</a>
				<%
				End If	
				If n-currentpage<1 Then  %>
				<FONT COLOR=#333333>下一页 末 页
				<%
				Else   %>
				<a href=<% = filename %>?page=<% = (CurrentPage+1) %>><FONT COLOR=#333333>下一页</a>
				<a href=<% = filename %>?page=<% = n %>><FONT COLOR=#333333>末 页</a>
				<%
				End If  %>
					<FONT COLOR=#333333>第 <b><% = CurrentPage %></b> <FONT COLOR=#333333>页 共 <b><% = n %></b> 页
				共&nbsp;<b><% = totalnumber %></b>&nbsp;条新闻　每页 <b><% = maxperpage %></b> 条新闻
				转到第：<input type='text' name='page' size=2 maxlength=10 class=smallInput value=<% = currentpage %>>
				页</font><input type='submit'  class='contents' value='跳转' name='cndok'></form>
				<%
				End Function  
			%> 
   <TABLE width="980" BORDER="0"  CELLSPACING="0" CELLPADDING="0"  align="center" BGCOLOR=#ffffff>
<TR>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="left"  width="30%">地址:<%= address %></td>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="left"  width="20%">网址:<%= weburl %></td>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="left"  width="15%">电话:<%= tel %></td>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="left"  width="20%">Email:<%= webemail %></td>
<td BGCOLOR=#ffffff HEIGHT="40"  ALIGN="left"  width="10%"><strong>QQ</strong>:<%= qq %></td>
</TR></table>
