<%@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">
<%
String id="";
String email="";
String tel="";
String booksum="";
String bookdate="";
String bookroomtype="";
String roomtype="";
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);
roomtype=request.getParameter("bookroomtype");
byte g[]=roomtype.getBytes("ISO-8859-1");
roomtype=new String(g);
int i;
Hashtable ht=null;
Vector vect = new Vector();
String token="";
try
{
InitialContext ctx = new InitialContext();
Object ref = ctx.lookup("hotel");
hotelHome home = (hotelHome)PortableRemoteObject.narrow(ref, hotelHome.class);
hotel createbookuser=home.create();
vect=createbookuser.LHotelRoomNO(bookdate,roomtype);
}
catch(Exception ex)
{
System.out.println("ex is "+ex);
}
%>
<%
if(vect.size()!=0)
{
for(i=0;i< vect.size();i++)
{
ht=(Hashtable)vect.elementAt(i);
%>
<form action="book_success1.jsp">
<input type="hidden" name="id" value="<%=id%>">
<input type="hidden" name="email" value="<%=email%>">
<input type="hidden" name="tel" value="<%=tel%>">
<input type="hidden" name="booksum" value="<%=booksum%>">
<input type="hidden" name="bookdate" value="<%=bookdate%>">
<input type="hidden" name="bookroomtype" value="<%=bookroomtype%>">
<input type="hidden" name="roomtype" value="<%=roomtype%>">
<input type="hidden" name="oldsum" value="<%=ht.get("a")%>">
<input type="submit" value="确认预订">
</form>
<%
}
}
%>
</body>
</html>