proView.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:7k
源码类别:
Applet
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="java.sql.*,java.lang.*"%>
- <jsp:useBean id="useclassBeans" class="MyFly.Bean.useclassBeans" scope="request"/>
- <jsp:useBean id="useclassBean" class="MyFly.Bean.useclassBean" scope="request"/>
- <jsp:useBean id="characterclassBean" class="MyFly.Bean.characterclassBean" scope="request"/>
- <jsp:useBean id="characterclassBeans" class="MyFly.Bean.characterclassBeans" scope="request"/>
- <jsp:useBean id="productinfoBeans" class="MyFly.Bean.productinfoBeans" scope="request"/>
- <script language="javascript">
- function fun(type, id)
- {
- window.location.href="proView.jsp?proType="+type+"&proNum="+id+"&pageNum=1";
- }
- </script>
- <%
- String Type="";
- String pageSize="15";
- String proType=(String)request.getParameter("proType"); //(子类)类别
- String pageNum=(String)request.getParameter("pageNum"); //取得想要显示的页
- String proNum=(String)request.getParameter("proNum"); // 取得类别编号
- productinfoBeans.setProType(proType);
- productinfoBeans.setProNum(proNum);
- productinfoBeans.setPageSize(Integer.parseInt(pageSize));
- productinfoBeans.init();
- int pageCount=productinfoBeans.getPageCount();
- int cur;
- if(pageNum == null || pageNum.equals(""))
- {
- cur=1;
- }
- else
- {
- cur=Integer.parseInt(pageNum);//取得要显示的页
- }
- if(cur < 1)
- {
- cur = 1;
- }
- if(cur > pageCount)
- {
- cur = pageCount;
- }
- productinfoBeans.setPageNum(String.valueOf(cur));
- productinfoBeans.getQuery();
- int num=productinfoBeans.getItems();
- %>
- <STYLE type=text/css>
- BODY {
- BACKGROUND: #799ae1; FONT: 9pt 宋体; MARGIN: 0px
- }
- TABLE {
- BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px
- }
- TD {
- FONT: 12px 宋体
- }
- IMG {
- BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: bottom
- }
- A {
- COLOR: #000000; FONT: 12px 宋体; TEXT-DECORATION: none
- }
- A:hover {
- COLOR: #428eff; TEXT-DECORATION: underline
- }
- .sec_menu {
- BACKGROUND: #d6dff7; BORDER-BOTTOM: white 1px solid; BORDER-LEFT: white 1px solid; BORDER-RIGHT: white 1px solid; OVERFLOW: hidden
- }
- .menu_title {
- }
- .menu_title SPAN {
- COLOR: #215dc6; FONT-WEIGHT: bold; LEFT: 8px; POSITION: relative; TOP: 2px
- }
- .menu_title2 {
- }
- .menu_title2 SPAN {
- COLOR: #428eff; FONT-WEIGHT: bold; LEFT: 8px; POSITION: relative; TOP: 2px
- }
- </STYLE>
- <script language="javascript" src="../js/column.js"></script>
- <html>
- <head>
- <title产品性质类别管理</title>
- <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
- </head>
- <body>
- <table width="595" height="2%" border="0" align="center" cellpadding="0" cellspacing="0">
- <tr>
- <td height="26" align="center">产品管理</td>
- </tr>
- </table>
- <table width="651" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
- <tr valign="middle" bgcolor="#799ae1">
- <td height="27" align="center">按类别查看</td>
- <td colspan="3" align="center"> (use)子类别:
- <select name="useclassID" onChange="fun('useType', useclassID.options[useclassID.options.selectedIndex].value)">
- <option value="all">------</option>
- <%
- useclassBeans.getQuery("-1");
- for(int i=0; i<useclassBeans.getItems(); i++)
- {
- %>
- <option value=<%=useclassBeans.getUseclassID(i)%>><%=useclassBeans.getUseclassName(i)%></option>
- <%
- }
- %>
- </select>
- </td>
- <td colspan="3" align="center">(chara) 主类别:
- <select name="characterID" onChange="fun('characterType', characterID.options[characterID.options.selectedIndex].value)">
- <option value="all">------</option>
- <%
- characterclassBeans.getQuery("-1");
- for(int i=0; i<characterclassBeans.getItems(); i++)
- {
- %>
- <option value=<%=characterclassBeans.getCharacterID(i)%>><%=characterclassBeans.getCharacterName(i)%></option>
- <%
- }
- %>
- </select> </td>
- </tr>
- <tr valign="middle" bgcolor="#799ae1">
- <td width="118" height="27" align="center"><font color="#FFFFFF">产品编号</font></td>
- <td width="90" align="center"><font color="#FFFFFF">产品名称</font></td>
- <td width="91" align="center"><font color="#FFFFFF">所属主类别</font></td>
- <td width="76" align="center"><font color="#FFFFFF">子类类别</font></td>
- <td width="117" align="center"><font color="#FFFFFF">添加日期</font></td>
- <td width="73" align="center"><font color="#FFFFFF">编辑</font></td>
- <td width="70" align="center"><font color="#FFFFFF">删除</font></td>
- </tr>
- <%
- for(int i=0; i<num; i++)
- {
- %>
- <tr>
- <td height="28" align="center"> <a href=# onClick="javascript:window.open('viewPro.jsp?index=<%=productinfoBeans.getProductID(i).replace('#',',')%>','','width=650,height=400,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><font color="#FF0000"><%=productinfoBeans.getProductID(i)%></font></a></td>
- <td align="center"> <%=productinfoBeans.getProductName(i)%></td>
- <td align="center">
- <%
- if(characterclassBean.getNew(productinfoBeans.getCharacterID(i)))
- {
- out.println(characterclassBean.getCharacterName());
- }
- else
- {
- out.print("-----");
- }
- %>
- </td>
- <td align="center">
- <%
- if(useclassBean.getNew(productinfoBeans.getUseclassID(i)))
- {
- out.println(useclassBean.getUseclassName());
- }
- else
- {
- out.print("-----");
- }
- %>
- </td>
- <td align="center"> <%=productinfoBeans.getShangData(i)%></td>
- <td width="73" align="center"><a href="editProInfo.jsp?index=<%=productinfoBeans.getProductID(i).replace('#',',')%>&proType=<%=proType%>&proNum=<%=proNum%>"><img src="../images/admin/edit.gif" alt="" width="19" height="18" border="0"></a></td>
- <td width="70" align="center"><a href="proDel.jsp?index=<%=productinfoBeans.getProductID(i).replace('#',',')%>&proType=<%=proType%>&proNum=<%=proNum%>"><img src="../images/admin/del.gif" alt="" width="16" height="16" border="0"></a></td>
- </tr>
- <%
- }
- %>
- <tr valign="middle" bgcolor="#799ae1">
- <td width="118" height="27" align="center"><font color="#FFFFFF"><a href="proView.jsp?proType=<%=proType%>&pageNum=1&proNum=<%=Integer.parseInt(proNum)%>">首页</a> </font></td>
- <td width="90" align="center"><font color="#FFFFFF"><a href="proView.jsp?proType=<%=proType%>&pageNum=<%=cur-1%>&proNum=<%=Integer.parseInt(proNum)%>">上一页</a> </font></td>
- <td width="91" align="center"><font color="#FFFFFF"> <a href="proView.jsp?proType=<%=proType%>&pageNum=<%=cur+1%>&proNum=<%=Integer.parseInt(proNum)%>">下一页</a></font></td>
- <td width="76" align="center"><font color="#FFFFFF"><a href="proView.jsp?proType=<%=proType%>&pageNum=<%=pageCount%>&proNum=<%=Integer.parseInt(proNum)%>">尾页</a></font></td>
- <td colspan="3" align="center"><font color="#FFFFFF">页次:<STRONG><FONT
- color=red><%=cur%></FONT>/<%=pageCount%></STRONG>页 <B>5</B>个产品/页</font></td>
- </tr>
- </table>
- </body>
- </html>