<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<%
webtitle="报价中心"
webkeywords="报价中心"
webdescription="报价中心|"&webname
%>

<!--#include file="include/header.asp"--> 
<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" class=table-zuoyou bgcolor="#FFFFFF" >
<TR>
<td  HEIGHT="25"  ALIGN="center" class=table-xia width="90%"><font color=#333333><B><FONT COLOR=#333333>报价单</FONT></B></font>  </td>
<td  HEIGHT="25"  ALIGN="center" class=table-xia width="10%"><a href=baojiaprint.asp ><FONT COLOR=#333333>打印格式</FONT></a></td>
</TR></table>
<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" class=table-zuoyou bgcolor="#FFFFFF" >
				  <tr><TD width="26%"  height="25" align=center class=table-youxia><B><FONT COLOR=#333333>商品名称</FONT></B></TD><TD width="15%" align=center class=table-youxia><B><FONT COLOR=#333333>品牌</FONT></B></TD>
                      <TD width="10%" align=center class=table-youxia><B><FONT COLOR=#333333>市场价</FONT></B></TD> <TD width="10%" align=center class=table-youxia><B><FONT COLOR=#333333>网店价</FONT></B></TD><TD  width="33%"  height="25" align=center class=table-youxia><B><FONT COLOR=#333333>简介</FONT></B></TD><TD width="6%" align=center class=table-xia><B><FONT COLOR=#333333>购买</FONT></B></TD></tr>
                  </table>
<TABLE width="980" BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" class=table-zuoyou bgcolor="#FFFFFF" >
<TR><TD HEIGHT="200" VALIGN="TOP">
      <%          	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,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,"baojia.asp"
       				else
          				if (currentPage-1)*MaxPerPage<totalPut then
            				rs.move  (currentPage-1)*MaxPerPage
            				dim bookbrand
            				bookbrand=rs.bookbrand
            				showContent
             				showpage totalput,MaxPerPage,"baojia.asp"
        				else
	        				currentPage=1
           					showContent
           					showpage totalput,MaxPerPage,"baojia.asp"
	      				end if
	   				end if
   				   				end if

   				sub showContent
       			dim i
	   			i=0
	  						

   				
			
     do while not rs.eof%>
      <TABLE WIDTH="100%" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">
		<TR> 
          <TD >
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 HEIGHT="25">
                  <TBODY>
				 <tr><TD width="26%" class=table-youxia style="word-wrap:break-word;word-break:break-all">&nbsp;<A  HREF=product.asp?id=<%=rs("id")%> TARGET=_blank title=<%=trim(rs("name"))%>><FONT COLOR=#333333><%=trim(rs("name"))%> </FONT>
			</A></TD><TD width="15%" align=left class=table-youxia 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 class=table-youxia style="word-wrap:break-word;word-break:break-all">&nbsp;<FONT COLOR=red><%=trim(rs("price1"))%>元</FONT></TD><TD width="10%" align=left class=table-youxia 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="33%" class=table-youxia style="word-wrap:break-word;word-break:break-all">&nbsp;<A  HREF=product.asp?id=<%=rs("id")%> TARGET=_blank title=<%=trim(rs("name"))%>><FONT COLOR=#333333><%=trim(rs("introduce"))%></FONT></A></TD> 
                      <TD width="6%" align="center" class=table-xia style="word-wrap:break-word;word-break:break-all"><% if rs("stock") > 1 then %><a href="shopcart.asp?ProdId=<% =trim(rs("id")) %>" target="_blank"><FONT COLOR=#333333>购买</FONT></a>&nbsp;<% if alipay =1 then %><a href="alishopcart.asp?ProdId=<% = rs("id") %>" target="_blank"><img src=skin/skin<%=skin%>/default/alipay.gif align=absmiddle border=0></a> <% Else %>&nbsp;<% end if %>
                 
					<% else %>
					<font color="#333333">缺货</font><% end if %></td></tr>
					
                  </TBODY>
                </TABLE>
         </td>
        </TR>
      </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  
			%> </td></tr></TABLE>
    </TD>
  </TR>
</TABLE>
<!--#include file="include/footer.asp"--> 
