picringnext.jsp
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:1k
源码类别:

手机WAP编程

开发平台:

Java

  1. <%@ page contentType="text/vnd.wap.wml" language="java" import="java.sql.*"%>
  2. <?xml version="1.0" encoding="gb2312"?>
  3. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head> <meta forua="true" http-equiv="Cache-Control" content="max-age=0;charset=gb2312"/> </head>
  4. <card id ="picring" title="picring">
  5. <p>
  6. <b>请选择相应型号</b><br/>
  7. <do type="prev" name="Prev" label="Back"><prev/></do>
  8. <%Class.forName("org.gjt.mm.mysql.Driver").newInstance();     String url ="jdbc:mysql://localhost/picring?user=nangua&password=2003herald&useUnicode=true&characterEncoding=8859_1";     Connection con= DriverManager.getConnection(url);     Statement statement=con.createStatement();     String temp=request.getParameter("big");     ResultSet rs=statement.executeQuery("select flag from bigclass where id="+temp);
  9.     if(rs.next()){%><%=rs.getString("flag")%><br/><%}rs.close();
  10.     rs=statement.executeQuery("select id,classname from smallclass where parentid="+temp);     int i=0;
  11.     while(rs.next()){i=1; %>
  12. <%String code=rs.getString("id");%>
  13. <a href="picringlast.jsp?big=<%=temp%>&amp;small=<%=code%>"><%=rs.getString("classname")%></a><br/>
  14. <%}rs.close();%>
  15. <%if(i==0){String paget="picringlast.jsp?big="+temp;response.sendRedirect(paget);}%>
  16. <br/><a href="http://herald.seu.edu.cn/ewap/index.wml">返回主页</a><br/>
  17. </p>
  18. </card> </wml>