proDel.jsp
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:1k
源码类别:

Applet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=GB2312"%>
  2. <%@ page import="java.sql.*"%>
  3. <% request.setCharacterEncoding("GB2312");%>
  4. <jsp:useBean id="productinfoBean" class="MyFly.Bean.productinfoBean" scope="request"/>
  5. <jsp:useBean id="file_Bean" class="MyFly.Bean.file_Bean" scope="request"/>
  6. <%
  7.     String index=request.getParameter("index").replace(',', '#');
  8. String proType=request.getParameter("proType");
  9. String proNum=(String)request.getParameter("proNum");
  10. productinfoBean.getNew(index);
  11. String max=productinfoBean.getMaxPicture();
  12. String min=productinfoBean.getMinPicture();
  13. if(productinfoBean.delete(index) == 0)
  14. {
  15.     out.println("<Script language=JavaScript>alert('删除失败');javascript:history.back();</Script>");
  16. }
  17. else
  18. {
  19.     String str=request.getRealPath("/");
  20.         str+="\XKB\product_image";
  21.     file_Bean.setPathName(str);
  22. file_Bean.delFile(max);
  23. file_Bean.delFile(min);
  24. String url="proView.jsp?proType="+proType+"&pageNum=1&proNum="+proNum;
  25.     response.sendRedirect(url);
  26. }
  27. %>
  28. </body>