<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@page import="wanggsx.ejb.*"%>
<%@page import="javax.naming.*"%>
<%@page import="javax.rmi.PortableRemoteObject"%>
<%@ page contentType = "text/html;charset=gb2312"%>
<html>
<head>
<title></title>
</head>
<body bgcolor="#00FF00">
<table height="600" width="985" cellpadding="0" cellspacing="0">
<tr height="100"><td width="141"><img src="images/1.jpg" width="141" height="100"></td><td width="140"><img src="images/8.jpg" width="140" height="100"></td><td width="141"><img src="images/13.jpg" width="141" height="100"></td><td width="140"><img src="images/14.jpg" width="140" height="100"></td><td width="141"><img src="images/19.jpg" width="141" height="100"></td><td width="140"><img src="images/27.jpg" width="140" height="100"></td><td><img src="images/28.jpg" width="142" height="100"></td></tr>
<tr height="100"><td width="141"><img src="images/39.jpg" width="141" height="100"></td><td width="140"><img src="images/38.jpg" width="140" height="100"></td><td width="141"><img src="images/60.jpg" width="141" height="100"></td><td width="140"><img src="images/73.jpg" width="140" height="100"></td><td width="141"><img src="images/74.jpg" width="141" height="100"></td><td width="140"><img src="images/75.jpg" width="140" height="100"></td><td><img src="images/78.jpg" width="142" height="100"></td></tr>
<tr height="100"><td width="141"><img src="images/76.jpg" width="141" height="100"></td><td width="140"><img src="images/79.jpg" width="140" height="100"></td><td colspan="3" rowspan="2" height="200" width="422">
<%
String id="";
String email="";
String tel="";
String booksum="";
String bookdate="";
String bookroomtype="";
id=request.getParameter("id");
byte a[]=id.getBytes("ISO-8859-1");
id=new String(a);
email=request.getParameter("email");
byte b[]=email.getBytes("ISO-8859-1");
email=new String(b);
tel=request.getParameter("tel");
byte c[]=tel.getBytes("ISO-8859-1");
tel=new String(c);
booksum=request.getParameter("booksum");
byte d[]=booksum.getBytes("ISO-8859-1");
booksum=new String(d);
bookroomtype=request.getParameter("bookroomtype");
byte e[]=bookroomtype.getBytes("ISO-8859-1");
bookroomtype=new String(e);
bookdate=request.getParameter("bookdate");
byte f[]=bookdate.getBytes("ISO-8859-1");
bookdate=new String(f);
int i;
Hashtable ht=null;
Vector vect = new Vector();
String token="";
int flag1=0;
try
{
InitialContext ctx = new InitialContext();
Object ref = ctx.lookup("hotel");
hotelHome home = (hotelHome)PortableRemoteObject.narrow(ref, hotelHome.class);
hotel createbookuser=home.create();
flag1=createbookuser.CHotelBookUser(id,email,tel,booksum,bookroomtype,bookdate);
vect=createbookuser.LHotelBookUser(id);
}
catch(Exception ex)
{
System.out.println("ex is "+ex);
}
%>
<table height="200" width="422" bordercolor="#FF00FF" border="1" bgcolor="#00FF00">
<tr><th colspan="2">
<%
if(flag1==1)
{
%>
<p>恭喜预订成功!请记住您的订单号:<%=id%></p>
</th></tr>
<%
}else{
%>
<tr><th>你的预订失败。请检查您输入的信息是否正确!</th></tr>
</table>
<%
}
if(vect.size()!=0)
{
for(i=0;i< vect.size();i++)
{
ht=(Hashtable)vect.elementAt(i);
%>
<tr><th>订单密码</th><td><%=ht.get("a")%></td></tr>
<tr><th>电子邮箱</th><td><%=ht.get("b")%></td></tr>
<tr><th>手机号码</th><td><%=ht.get("c")%></td></tr>
<tr><th>房间数量</th><td><%=ht.get("d")%></td></tr>
<tr><th>房间类型</th><td><%=ht.get("e")%></td></tr>
<tr><th>入住日期</th><td><%=ht.get("f")%></td></tr>
<tr><td colspan="2" bgcolor="#0099FF"><input type="button" name="back" id="back" value="返回上一页" onClick="javascript:history.go(-1)"> <a href="0.jsp"><font color="#FFFF00" size="+1">返回主页</font></a>
</td></tr>
</table>
<%
}
}
%>
</td><td width="140"><img src="images/88.jpg" width="140" height="100"></td><td><img src="images/89.jpg" width="142" height="100"></td></tr>
<tr height="100"><td width="141"><img src="images/100.jpg" width="141" height="100"></td><td width="140"><img src="images/130.jpg" width="140" height="100"></td><td width="140"><img src="images/40.jpg" width="140" height="100"></td><td><img src="images/2.jpg" width="142" height="100"></td></tr>
<tr height="100"><td width="141"><img src="images/22.jpg" width="141" height="100"></td><td width="140"><img src="images/23.jpg" width="140" height="100"></td><td width="141"><img src="images/25.jpg" width="141" height="100"></td><td width="140"><img src="images/29.jpg" width="140" height="100"></td><td width="141"><img src="images/30.jpg" width="141" height="100"></td><td width="140"><img src="images/31.jpg" width="140" height="100"></td><td><img src="images/32.jpg" width="142" height="100"></td></tr>
<tr height="100"><td width="141"><img src="images/33.jpg" width="141" height="100"></td><td width="140"><img src="images/34.jpg" width="140" height="100"></td><td width="141"><img src="images/35.jpg" width="141" height="100"></td><td width="140"><img src="images/36.jpg" width="140" height="100"></td><td width="141"><img src="images/45.jpg" width="141" height="100"></td><td width="140"><img src="images/44.jpg" width="140" height="100"></td><td><img src="images/49.jpg" width="142" height="100"></td></tr>
</table>
</body>
</html>