www.pudn.com > Hotel.rar > roominfo2_jsp.java


package org.apache.jsp; 
 
import javax.servlet.*; 
import javax.servlet.http.*; 
import javax.servlet.jsp.*; 
import java.sql.*; 
import myhotel.MyConn; 
import codechange.Codechange; 
 
public final class roominfo2_jsp extends org.apache.jasper.runtime.HttpJspBase 
    implements org.apache.jasper.runtime.JspSourceDependent { 
 
  private static java.util.List _jspx_dependants; 
 
  public Object getDependants() { 
    return _jspx_dependants; 
  } 
 
  public void _jspService(HttpServletRequest request, HttpServletResponse response) 
        throws java.io.IOException, ServletException { 
 
    JspFactory _jspxFactory = null; 
    PageContext pageContext = null; 
    HttpSession session = null; 
    ServletContext application = null; 
    ServletConfig config = null; 
    JspWriter out = null; 
    Object page = this; 
    JspWriter _jspx_out = null; 
    PageContext _jspx_page_context = null; 
 
 
    try { 
      _jspxFactory = JspFactory.getDefaultFactory(); 
      response.setContentType("text/html; charset=gb2312"); 
      pageContext = _jspxFactory.getPageContext(this, request, response, 
      			"", true, 8192, true); 
      _jspx_page_context = pageContext; 
      application = pageContext.getServletContext(); 
      config = pageContext.getServletConfig(); 
      session = pageContext.getSession(); 
      out = pageContext.getOut(); 
      _jspx_out = out; 
 
      out.write("\r\n"); 
      out.write("\r\n"); 
      out.write("\r\n"); 
      out.write("\r\n"); 
      out.write("\r\n"); 
      out.write("\r\n"); 
      out.write("\r\n"); 
      out.write("房间详细情况2\r\n"); 
 
Codechange code=new Codechange(); 
String name=request.getParameter("name"); 
String sex=request.getParameter("sex"); 
 
String class1=request.getParameter("class1"); 
 
 
String r=request.getParameter("r"); 
String l=request.getParameter("l"); 
String o=request.getParameter("o"); 
String z=request.getParameter("z"); 
 
if(class1==null) class1=""; 
class1.replaceAll(" ",""); 
 
if(r==null) r=""; 
if(l==null) l=""; 
if(o==null) o=""; 
if(z==null) z="";  
 
boolean  front1=false; 
boolean  front=false; 
 
 
 
 
 
 
String sql="select room.roomcode,freebed ,roomstate from room,roomstate,roomclass where (room.classno=roomclass.classno and room.roomcode=roomstate.roomcode and class='"+code.toGB(class1)+"' and("; 
 
if(class1.length()==0||class1.compareTo("selected")==0) 
{ 
 
out.println("
请选择房间类型"); out.write("\r\n"); out.write("
\r\n"); out.write("\r\n"); out.write("
\r\n"); } else { front1=true; if(r.length()==0&&l.length()==0&&o.length()==0&&z.length()==0) { out.println("
请选择房间状态"); out.write("\r\n"); out.write("
\r\n"); out.write("\r\n"); out.write("
\r\n"); } else { if(r.length()!=0) { sql+="roomstate='"+code.toGB(r)+"'"; front=true;} if(l!=null) { if(front==false) { sql+="roomstate='"+code.toGB(l)+"'"; } else{sql+="or roomstate='"+code.toGB(l)+"'"; } front=true; } if(o!=null) { if(front==false) { sql+="roomstate='"+code.toGB(o)+"'"; } else{sql+="or roomstate='"+code.toGB(o)+"'"; } front=true; } if(z!=null) { if(front==false) { sql+="roomstate='"+code.toGB(z)+"'"; } else{sql+="or roomstate='"+code.toGB(z)+"'"; } front=true; } sql+="));"; out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("
\r\n"); out.write(" \r\n"); out.write("
\r\n"); out.write(" \r\n"); out.write("
\r\n"); out.write("\r\n"); out.write("\r\n"); out.write(" \r\n"); out.write(" \r\n"); out.write(" \r\n"); out.write(" \r\n"); out.write("\r\n"); out.write(" \r\n"); out.write("\r\n"); out.write(" \t\t"); MyConn conn=new MyConn(); ResultSet rs=conn.executeQuery(sql); while(rs.next()){ out.write("\r\n"); out.write(" \t\t\t\t\r\n"); out.write(" \t\t\t\r\n"); out.write(" \t\t\t\t \r\n"); out.write(" \t\t\t\t \r\n"); out.write(" \t\t\t\t \r\n"); out.write(" \t\t\t\r\n"); out.write(" \r\n"); out.write(" \r\n"); out.write(" "); } conn.close(); out.write("\r\n"); out.write("
房号
房态
可租床位
"); out.print(rs.getObject(1)); out.write(""); out.print(rs.getObject(2)); out.write(""); out.print(rs.getObject(3)); out.write("
\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write("\r\n"); out.write(" 请选择要登记的房号 :
\r\n"); out.write(" \r\n"); out.write(" \r\n"); out.write(" "); } } out.write("\r\n"); out.write("
\r\n"); out.write("\r\n"); out.write(""); } catch (Throwable t) { if (!(t instanceof SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) out.clearBuffer(); if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); } } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); } } }