?? look_by_user.jsp
字號:
<%@ page language="java" contentType="text/html;charset=gb2312"%>
<%@ page import="java.sql.*"%>
<jsp:useBean id="search" class="com.db.Common"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>查看信息</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/mm_lodging1.css" type="text/css">
</head>
<%
request.setCharacterEncoding("gb2312");
if(session.getAttribute("isLogin")==null)
{
%>
<jsp:forward page="../login/login.html"/>
<%
}
String train_serial=request.getParameter("train_serial");
%>
<body text=#003300 vLink=#002200 leftMargin=0 topMargin=0>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr width="600">
<td><img src="../image/16.gif"></td>
</tr>
</table>
<table cellSpacing=0 cellPadding=0 width=600 align="center" bgcolor="#033D7C">
<TBODY>
<tr width="600" bgcolor="#a4c2c2">
<td height="36" colspan="3" id="navigation" class="navText" align="center"><a href="../user/index.jsp">首頁</a>
<a href="../user/inf_edit.jsp">控制面板</a> <a href="../common/exit.jsp">退出</a> </td>
</tr>
</TBODY>
</table>
<form name="search" method="post" action="../user/do_search.jsp">
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="700" bgcolor="#ebebeb"><span class="style2">搜索車次:</span>
關鍵字:<input type="text" name="keywords">
<input type="submit" value="Search">
</table>
</form>
<table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
<tr>
<td width="600" align="center" bgcolor="#cccccc">
硬座票量
</td>
<td width="600" align="center" bgcolor="#cccccc">
軟座票量
</td>
<td width="600" align="center" bgcolor="#cccccc">
硬臥票量
</td>
<td width="600" align="center" bgcolor="#cccccc">
軟臥票量
</td>
</tr>
</table>
<table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
<%
ResultSet rs=search.getResultSetBySql("select * from traininf where train_serial='"+train_serial+"'");
int stations_num=0;
int h_s_num=0;
int s_s_num=0;
int h_r_num=0;
int s_r_num=0;
if(rs.next())
{
%>
<tr>
<%
stations_num=rs.getInt(5);
h_s_num=rs.getInt(7);
s_s_num=rs.getInt(8);
h_r_num=rs.getInt(9);
s_r_num=rs.getInt(10);
%>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=h_s_num%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=s_s_num%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=h_r_num%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=s_r_num%>
</td>
</tr>
<%
}
%>
</table>
<%
ResultSet rs_stations=search.getResultSetByTable(""+train_serial+"_stations_inf");
ResultSet rs_start_time=search.getResultSetByTable(""+train_serial+"_start_time");
ResultSet rs_to_time=search.getResultSetByTable(""+train_serial+"_to_time");
ResultSet rs_hs_price=search.getResultSetByTable(""+train_serial+"_hard_seat_price");
ResultSet rs_ss_price=search.getResultSetByTable(""+train_serial+"_soft_seat_price");
ResultSet rs_hr_price=search.getResultSetByTable(""+train_serial+"_hard_recumbency_price");
ResultSet rs_sr_price=search.getResultSetByTable(""+train_serial+"_soft_recumbency_price");
String[] stations=new String[stations_num];
String[] start_time=new String[stations_num-1];
String[] to_time=new String[stations_num-1];
float[] hs_price=new float[stations_num-1];
float[] ss_price=new float[stations_num-1];
float[] hr_price=new float[stations_num-1];
float[] sr_price=new float[stations_num-1];
if(rs_stations!=null&&rs_stations.next())
{
for(int i=1;i<=stations_num;i++)
{
stations[i-1]=rs_stations.getString(i+1);
}
}
if(rs_start_time!=null&&rs_start_time.next())
{
for(int i=1;i<stations_num;i++)
{
start_time[i-1]=rs_start_time.getString(i+1);
}
}
if(rs_to_time!=null&&rs_to_time.next())
{
for(int i=1;i<stations_num;i++)
{
to_time[i-1]=rs_to_time.getString(i+1);
}
}
if(rs_hs_price!=null&&rs_hs_price.next())
{
for(int i=1;i<stations_num;i++)
{
hs_price[i-1]=rs_hs_price.getFloat(i+1);
}
}
if(rs_ss_price!=null&&rs_ss_price.next())
{
for(int i=1;i<stations_num;i++)
{
ss_price[i-1]=rs_ss_price.getFloat(i+1);
}
}
if(rs_hr_price!=null&&rs_hr_price.next())
{
for(int i=1;i<stations_num;i++)
{
hr_price[i-1]=rs_hr_price.getFloat(i+1);
}
}
if(rs_sr_price!=null&&rs_sr_price.next())
{
for(int i=1;i<stations_num;i++)
{
sr_price[i-1]=rs_sr_price.getFloat(i+1);
}
}
%>
<br>
<table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
<tr>
<td width="600" align="center" bgcolor="#cccccc">
站點
</td>
<td width="600" align="center" bgcolor="#cccccc">
發車時間
</td>
<td width="600" align="center" bgcolor="#cccccc">
到達時間
</td>
</tr>
<tr>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
</tr>
<tr>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=stations[0]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=start_time[0]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
---
</td>
</tr>
<tr>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
</tr>
<%
for(int i=1;i<=stations_num-2;i++)
{
%>
<tr>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=stations[i]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=start_time[i]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=to_time[i-1]%>
</td>
</tr>
<tr>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
</tr>
<%
}
%>
<tr>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=stations[stations_num-1]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
---
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=to_time[stations_num-2]%>
</td>
</tr>
</table>
<br>
<table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
<tr>
<td width="600" align="center" bgcolor="#cccccc">
相鄰站點
</td>
<td width="600" align="center" bgcolor="#cccccc">
硬座價格
</td>
<td width="600" align="center" bgcolor="#cccccc">
軟座價格
</td>
<td width="600" align="center" bgcolor="#cccccc">
硬臥價格
</td>
<td width="600" align="center" bgcolor="#cccccc">
軟臥價格
</td>
</tr>
<%
for(int i=1;i<stations_num;i++)
{
%>
<tr>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=stations[i-1]%>--<%=stations[i]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=hs_price[i-1]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=ss_price[i-1]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=hr_price[i-1]%>
</td>
<td width="600" align="center" bgcolor="#EBEBEB">
<%=sr_price[i-1]%>
</td>
</tr>
<tr>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
<td width="600" align="center" bgcolor="#cccccc" height="3">
</td>
</tr>
<%
}
%>
</table>
<table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
<tr>
<td width="600" align="center" bgcolor="#EBEBEB">
<a href="../ticket/order.jsp?train_serial=<%=train_serial%>">訂購</a>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -