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

📄 detailroom2.jsp

📁 本源码
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	background-image: url(picture/background.JPG);
}
-->
</style></head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="200" border="1" align="center">
    <tr>
      <td>
	  <%
		  //String sex1=(String)session.getAttribute("sex");
		  //out.println(sex1);%>
	  
	  <%
							 	
			String sex1=request.getParameter("sex1"); 
			//out.println(sex1);
			//boolean key=false;

			try
			{
				Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
				String url="jdbc:odbc:lazy";
				String user="sa";
				String password="111";
				ResultSet rs=null;
				String deusername="";
				Connection con=DriverManager.getConnection(url,user,password);
				Statement stmt=con.createStatement();
					
				String condition="";

				condition=condition+"SELECT * FROM roomstate WHERE (roomcode ='"+sex1+"')";
				rs=stmt.executeQuery(condition);
				
				out.print("<TR>");
					out.print("<TD width=100>"+"房号");
					out.print("<TD width=100>"+"状态");
				out.print("</TR>");
				

				while(rs.next())
				{

					String roomcode1=rs.getString("roomcode");
					String roomstate1=rs.getString("roomstate");

						out.print("<TR>");
						out.print("<TD>"+roomcode1+"</TD>");
						out.print("<TD>"+roomstate1+"</TD>");
						out.print("</TR>");
						
				}
				
				stmt.close();
				con.close();
			
			}
			catch(SQLException e1)
			{
				out.print("SQL异常!");
			}
			%></td>
    </tr>
  </table>
</form>
<table width="375" border="1" align="center">
  <tr>
    <td><form id="form2" name="form2" method="post" action="detailroom2_room.jsp">
      <label></label>
	  	<input name="name2" type="hidden" id="name2" value=<%=sex1%>/>
        <%
			//String sex2=sex1;
			//out.print(sex1);
			%>
        <label>
        <input type="submit" name="Submit" value="房间配置" />
        </label>
    </form>
    </td>
    <td><form id="form3" name="form3" method="post" action="detailroom2_guests.jsp">
      <label>
	  <input name="name3" type="hidden" id="name3" value=<%=sex1%>/>
      <%
							 	
			String sex3=sex1; 


			%>
      <input type="submit" name="Submit2" value="客人情况" />
</label>
            </form>
    </td>
    <td><form id="form4" name="form4" method="post" action="register_2.jsp">
      <label>
	   <input name="name4" type="hidden" id="name4" value=<%=sex1%>/>
      <%
							 	
			String sex4=sex1; 


			%>
      <input type="submit" name="Submit3" value="入住登记" />
</label>
            </form>
    </td>
    <td><form id="form5" name="form5" method="post" action="">
      <label></label>
        <a href="index.htm">返回</a>
    </form>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

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