⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product2.jsp~28~

📁 jsp数据库开发实例精粹全书原代码 无解压缩密码 包括 书店
💻 JSP~28~
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*"%>
<%@ page import="zhaobiao.db.*,zhaobiao.date.*"%>
<%

  long page1=1;
  if(request.getParameter("page1")!=null)
    page1 = Long.parseLong(request.getParameter("page1").trim());
  long typeid=1;
  if(request.getParameter("typeid")!=null)
    typeid=Long.parseLong(request.getParameter("typeid").trim());

  long pagemax=5;
  long count;

ProductManager productm=new ProductManager();
Basic basic=new Basic();
count=productm.getProductListCount(typeid);
Type type=new Type();
type=basic.getType(typeid);
Vector list=new Vector();
list=productm.getProductList(page1,pagemax,typeid);
productm.freeCon();

%>

<html>
<head>
<title>xxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
<script language="JavaScript">
<!--
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table width="776" border="0" cellspacing="0" cellpadding="0" height="103">

  <tr>
      <td height="65"> <a href="index.jsp"><img src="images/zhaobiao_01.jpg" width="777" height="89" align="absbottom" border="0"></a></td>
  </tr>
  </table>
  <a href="product1.jsp">产品信息</a> <a href="project1.jsp">项目信息</a> <a href="maker1.jsp">厂商信息</a><br>
<table width="774" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="center">
      <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
        <tr bgcolor="0092B8">
          <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#FFFFFF">
              <tr align="center">
                <td>
                    <table width="100%" border="0" cellspacing="1" cellpadding="0">
                      <tr align="center" bgcolor="E1D1B7">
                        <td height="25" align="center" colspan="13"><b><a href="product1.jsp">产品信息</a>--
                    <%=type.getType_name()%></b></td>
                      </tr>
                      <tr bgcolor="F6F2E6" align="center">
                        <td height="25" width="15%" align="left">
                          <p>下属产品(所有项目下此类别产品)</p>
                        </td>
                        <td colspan="4" align="left">
                <%

                 if(list!=null)
                 {
                   for(int i=0;i<list.size();i++)
                   {
                     Product pd=new Product();
                     pd=(Product)list.get(i);
%>

  <%=i+1%>.<a href="product3.jsp?pdid=<%=pd.getProduct_id()%>"><%=pd.getProduct_name()%></a><br>
                          <br>

        <%}}
%>                    </td>
                      </tr>
                    </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr align="right">
    <td colspan="2"><a href="#" onClick="MM_openBrWindow('send_pop.shtml','','width=300,height=250')"><br>
      <br>
      </a> </td>
  </tr>
</table>
<form method="POST" action="search1.jsp">
  关键字:
  <input type="text" name="keys">
  <select name="searchid">
  <option selected value=0>所有</option>
    <option value=1>项目</option>
    <option value=2>厂商</option>
    <option value=3>产品</option>
  </select>
  <input type="submit" name="submit" value="搜索">
</form>
    <table width="774" border="0" cellspacing="0" cellpadding="0">
                    <form method="post" action="product2.jsp?typeid=<%=typeid%>">
  <tr align="center" valign="top">
    <td height="20"><a href="product2.jsp?typeid=<%=typeid%>&page1=1">首 页</a>
<%if(page1>=2){%>
<a href="product1.jsp?typeid=<%=typeid%>&page1=<%=page1-1%>">上一页<img src="images/aleft.gif" width="18" height="16" border="0" align="absbottom"></a>
     <%}else{%>上一页<img src="images/aleft.gif" width="18" height="16" border="0" align="absbottom">
     <%}%>
     第<input type="text" name="page1" size="2" value="<%=page1%>" onkeydown="if(event.keyCode==13)this.form.submit()">页
<%if(page1<(count/pagemax+1)){%>
<img src="images/aright.gif" width="18" height="16" border="0" align="absbottom">
<a href="product2.jsp?typeid=<%=typeid%>&page1=<%=(page1+1)%>">下一页 </a>
<%}else{%><img src="images/aright.gif" width="18" height="16" border="0" align="absbottom">下一页
<%}%>
<a href="product2.jsp?typeid=<%=typeid%>&page1=<%=count/pagemax+1%>">最后一页</u></td>
  </tr>
  </form>
</table>
<p>&nbsp; </p>
</center>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -