1,前台页面

<!--#include file="data.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>东莞市长庆自动化设备有限公司</title>
<style type="text/css">
<!--
body {
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
}
.c4 {
 border: 1px solid #CCCCCC;
}
.cr {
 color: #666666;
}
-->
</style>
</head>

<body>
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="4" align="center" valign="middle"><!--#include file="top.asp"--></td>
  </tr>
  <tr>
    <td width="8" height="13" align="center" valign="top">&nbsp;</td>
    <td width="199" rowspan="2" align="center" valign="top" background="img/lf_0.jpg"><!--#include file="left.asp"--></td>
    <td width="7" align="center" valign="top"></td>
    <td width="788" align="center" valign="top">
    <!--<img src="img/cp.jpg" width="788" height="41">-->
     <div style="width:788px; height:41px; background:url(images/right_top_bg.jpg) no-repeat; text-align:left; text-indent:35px; height:41px; line-height:41px; font-size:13px; font-weight:bold; color:#666666;">产品中心</div>
    </td>
  </tr>
  <tr>
    <td width="8" height="416" align="center" valign="top"></td>
    <td width="7" align="center" valign="top"></td>
    <td width="788" align="left" valign="top" background="img/bg.jpg"><table width="96%" border="0" align="left" cellpadding="0" cellspacing="0">
      <tr>
        <td height="10" colspan="2"></td>
      </tr>
      <tr>
        <td width="11">&nbsp;</td>
        <td  alt="" align="left" valign="top" class="infotitle"><%     lb =request("lb")
    'if not IsNumeric(id) then response.End()
       set rs=server.CreateObject("ADODB.RecordSet")
    if lb<>"" then
    sql="select * from cp where lb="&request("lb")&" order by id desc" '定义SQL语句     
    else
     sql="select * from  cp where lb in (select id from lb where version=1) order by id "
    end if
    rs.PageSize = 9'每页记录数
    rs.CursorLocation = 3
    rs.open  sql,conn,0,2,1
   
    pre = true
       last = true
       page = trim(Request("page"))'变量是跳转页面时的值
    if len(page) = 0 then
    intpage = 1
    pre = false
    else
    if cint(page) =< 1 then
       intpage = 1
       pre = false
       else
       if cint(page) >= rs.PageCount then
       intpage = rs.PageCount
       last = false
       else
       intpage = cint(page)
       end if
       end if
       end if
       if not rs.eof then
       rs.AbsolutePage = intpage
       end if  
%>
            </style>
            <script language="JavaScript" type="text/javascript">
function ow(obj) {
    URL=obj.href;
    window.open(URL,'','');
    return false;
}
                                </script>
            <table width="100%" cellpadding="2" cellspacing="2">
              <tr>
                <%
 temp1 =1
 for i=1 to rs.PageSize  
 if rs.EOF or rs.BOF then exit for  

%>
                <td class="my"><table width="100%" cellpadding="2" cellspacing="0" >
                    <tr>
                      <td height="12" align="center"><%if rs("pic")<>"" then %>
                          <table border="0" cellpadding="1" cellspacing="1" class="c4">
                            <tr>
                              <td align="center" valign="middle"><a href="products_show.asp?id=<%=rs("id")%>" target="_blank"></a><a href="products_show.asp?id=<%=rs("id")%>" target="_blank"><img src="<%=rs("pic")%>" alt="1" width="180" height="160" border="0" class="pic" /></a></td>
                            </tr>
                        </table>
                        <a href="products_show.asp?id=<%=rs("id")%>" target="_blank"></a>
                          <%end if%></td>
                    </tr>
                    <tr>
                      <td height="13" align="center">&nbsp;<%=rs("name")%></td>
                    </tr>
                </table></td>
                <%
      if temp1 mod 3 = 0 then
     %>
              </tr>
              <%
      end if
   'response.Write rs("id")
   temp1 = temp1 + 1
   rs.movenext
   next
  %>
            </table>
          <table width="99%" cellpadding="0" cellspacing="0">
              <tr>
                <%
     if rs.pagecount > 0 then
    %>
                <td width="13%" height="37" align="center" ><div align="left" >&nbsp;当前页<%=intpage%>/<%=rs.PageCount%> </div></td>
                <%else%>
                <td width="41%" align="left" valign="bottom"><div align="left">当前页0/0 </div></td>
                <%end if%>
                <td width="46%" align="right" ><a href="?page=1&amp;lb=<%=lb%>" class="me">首页</a>|
                  <%if pre then%>
                    <a href="?page=<%=intpage -1%>&amp;lb=<%=lb%>" class="me">上页</a>|
                  <%
     end if
     if last then
   %>
                    <a href="?page=<%=intpage +1%>&amp;lb=<%=lb%>" class="me">下页</a> |
                  <%end if%>
                    <a href="?page=<%=rs.PageCount%>&amp;lb=<%=lb%>" class="me">尾页</a>|转到第
                  <select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
                      <%
     for i = 1 to rs.PageCount
      if i = intpage then%>
                      <option value="?page=<%=i%>&amp;lb=<%=lb%>" selected="selected"><%=i%> </option>
                      <%else%>
                      <option value="?page=<%=i%>&amp;lb=<%=lb%>"><%=i%> </option>
                      <%
    end if
    next
      %>
                    </select>
                  页</td>
              </tr>
            </table>
          <%
rs.close
set rs = nothing


%>
        </td>
      </tr>
      <tr>
        <td height="15">&nbsp;</td>
        <td height="15">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="4" align="center" valign="top">&nbsp;</td>
    <td height="4" align="center" valign="top"><img src="img/lfbg.jpg" width="199" height="4"></td>
    <td align="center" valign="top"></td>
    <td width="788"  height="4"align="center" valign="top"><img src="img/bg-1.jpg" width="788" height="4"></td>
  </tr>
  <tr valign="top">
    <td colspan="4" align="center"><!--#include file="foot.asp"--></td>
  </tr>
</table>
</body>
</html>
2,后台产品类别修改

 posted on 2010-11-03 08:57  ddxgc  阅读(152)  评论(0编辑  收藏  举报