📄 guest.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import="java.sql.*"%>
<%String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'guest.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<jsp:useBean id="roomNO" scope="session" class="db.DBCon" />
<body background="images/kite.gif">
<style type="text/css">
<!--
.STYLE11_right {
color: #010066;
font-weight: bold;
font-size: 12pt;
}
.STYLE22_right {
font-size: 10pt;
color: #0A0095;
}
.STYLE33_right {font-size: 9pt}
.top_border {
border: 1px solid #000000;
line-height: 20px;
font-size: 12px;
}
.top_border a:link { color: #000000; text-decoration: none; font-size: 12px; }
.top_border a:visited { color: #000000; text-decoration: none; font-size: 12px; }
.top_border a:hover { color: #000000; text-decoration: underline; font-size: 12px; }
.top_border a:active { color: #000000; text-decoration: none; font-size: 12px; }
.top_top2 a:link { color: #000000; text-decoration: none; font-size: 12px; }
.top_top2 a:visited { color: #000000; text-decoration: none; font-size: 12px; }
.top_top2 a:hover { color: #000000; text-decoration: underline; font-size: 12px; }
.top_top2 a:active { color: #000000; text-decoration: none; font-size: 12px; }
.top_top {
font-family: "宋体";
font-size: 9pt;
color: #090094;
text-decoration: none;
}
.top_top a:link { color: #090094; text-decoration: none;}
.top_top a:visited { color: #090094; text-decoration: none;}
.top_top a:hover { color: #FF0000; text-decoration: underline;}
.top_top a:active { color: #090094; text-decoration: none;}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.class1{
BORDER-LEFT: #999999 1PX SOLID;
BORDER-RIGHT: #999999 1PX SOLID;
BORDER-TOP: #999999 1PX SOLID;
BORDER-BOTTOM: #999999 1PX SOLID;
line-height:120%;
font-size:15;
}
.class2{
BORDER-LEFT: #999999 ;
BORDER-RIGHT: #999999 ;
BORDER-TOP: #999999 ;
BORDER-BOTTOM: #999999 1PX SOLID ;
line-height:110%;
font-size:15;
background-color:pink;
}
-->
</style>
<%String roomno = request.getParameter("fname");
String sql="SELECT guests.name, guests.sex, guests.age, countrycodes.country, guests.arridate, guests.leftdate, guests.remarks "+
" FROM countrycodes, room, guests "+
" WHERE (((countrycodes.countryno)=[guests].[countryno]) AND ((room.roomcode)=[guests].[roomcode]) AND ((room.roomno)='"+roomno+"'));";
ResultSet rs = null;
rs = roomNO.excuteQuery(sql);
if (rs.next()) {
%>
<TABLE align="center" width="700px" class="class1" cellpadding="0" cellspacing="0" border="0">
<TR>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 房间 </FONT></P></TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 客人 </FONT></P>
</TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 性别 </FONT></P>
</TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 年龄 </FONT></P>
</TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 国家 </FONT></P></TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 抵达日期 </FONT></P></TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 拟走日期 </FONT></P></TD>
<TD class="class2">
<P align="center">
<FONT color="#154500"> 备注</FONT>
</P></TD>
</TR>
<%do {
%>
<TR>
<TD>
<P align="center">
<%=roomno%></P>
</TD>
<TD>
<P align="center"><%=rs.getString(1)%></P>
</TD><DIV align="center"><%
String sex_temp=rs.getString(2);
%></DIV><TD>
<P align="center"><%=sex_temp%></P>
</TD>
<TD>
<P align="center"><%=rs.getString(3)%></P>
</TD>
<TD>
<P align="center"><%=rs.getString(4)%></P>
</TD>
<TD>
<P align="center"><%=rs.getString(5)%></P>
</TD>
<TD>
<P align="center"><%=rs.getString(6)%></P>
</TD>
<TD>
<P align="center"><%=rs.getString(7)%></P>
</TD>
</TR>
<%}while (rs.next());
%>
</TABLE>
<%
rs.close();
roomNO.close();
} else
out.println("<div align='center'><font color='red' face='楷体_gb2312' size='5'>此房间还未住进客人!</div>");
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -