|
|
|
@ -1,13 +1,15 @@
|
|
|
|
|
<%@page import="javabean.flight"%>
|
|
|
|
|
<%@page import="java.util.ArrayList"%>
|
|
|
|
|
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
|
|
|
<%@page contentType="text/html; charset=UTF-8" import="java.util.Date"%>
|
|
|
|
|
<%@page contentType="text/html; charset=UTF-8" import="java.text.SimpleDateFormat"%>
|
|
|
|
|
<%@page import="javabean.db_conn"%>
|
|
|
|
|
<%@page import="java.sql.ResultSet"%>
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>机票预订系统</title>
|
|
|
|
|
<title>机票推荐系统</title>
|
|
|
|
|
<link href="/air_ticket_book/default/css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
<link href="/air_ticket_book/default/css/common.css" rel="stylesheet">
|
|
|
|
|
<link href="/air_ticket_book/default/css/corptravel.css" rel="stylesheet">
|
|
|
|
@ -20,7 +22,13 @@
|
|
|
|
|
<%! db_conn conn2=new db_conn();
|
|
|
|
|
String seat;
|
|
|
|
|
String user_name;
|
|
|
|
|
String todaydate="2019-12-01";%>
|
|
|
|
|
Date date = new Date();
|
|
|
|
|
//设置要获取到什么样的时间
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
//获取String类型的时间
|
|
|
|
|
String todaydate = sdf.format(date);
|
|
|
|
|
|
|
|
|
|
%>
|
|
|
|
|
</head>
|
|
|
|
|
<body class="bg-body">
|
|
|
|
|
<!-- header -->
|
|
|
|
@ -41,7 +49,6 @@
|
|
|
|
|
<ul class="nav navbar-nav nav-top-small" style="margin-left: -15px;">
|
|
|
|
|
<li class="dropdown">
|
|
|
|
|
<%
|
|
|
|
|
String todaydate="2019-12-01";
|
|
|
|
|
if(session.getAttribute("user_id")!=null){
|
|
|
|
|
db_conn conn2=new db_conn();
|
|
|
|
|
String sql2="select * from p_inf where p_tel='"+session.getAttribute("user_id")+"'";
|
|
|
|
@ -79,8 +86,8 @@
|
|
|
|
|
class="icon-bar"></span> <span class="icon-bar"></span> <span
|
|
|
|
|
class="icon-bar"></span>
|
|
|
|
|
</button>
|
|
|
|
|
<a class=" " href="/air_ticket_book/default/index.jsp"><img src="/air_ticket_book/default/images/newlogo.png"
|
|
|
|
|
width="350" height="70" alt="系统LOGO" class="pull-left mar-right-30"
|
|
|
|
|
<a class=" " href="/air_ticket_book/default/index.jsp"><img src="/air_ticket_book/default/images/newlogo11.png"
|
|
|
|
|
width="420" height="84" alt="系统LOGO" class="pull-left mar-right-30"
|
|
|
|
|
style="margin-left: -15px;"></a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -157,10 +164,22 @@
|
|
|
|
|
<li class="time w100"><strong><%=flight_info.getF_s_t() %></strong></li>
|
|
|
|
|
<li class="">—</li>
|
|
|
|
|
<li class="time w80"><strong><%=flight_info.getF_a_t() %></strong></li>
|
|
|
|
|
|
|
|
|
|
<%
|
|
|
|
|
db_conn conn3=new db_conn();
|
|
|
|
|
String a_code="";//出发地机场三字码
|
|
|
|
|
String d_code="";//到达地机场三字码
|
|
|
|
|
String sql3="SELECT code FROM codetoname WHERE airportname = '"+flight_info.getF_a_a()+"'";
|
|
|
|
|
String sql4="SELECT code FROM codetoname WHERE airportname = '"+flight_info.getF_s_a()+"'";
|
|
|
|
|
ResultSet res3=conn3.executeQuery(sql3);
|
|
|
|
|
if(res3.next()) a_code=res3.getString(1);
|
|
|
|
|
ResultSet res4=conn3.executeQuery(sql4);
|
|
|
|
|
if(res4.next()) d_code=res4.getString(1);
|
|
|
|
|
String Domainname="https://flights.ctrip.com/";
|
|
|
|
|
Domainname+="online/list/oneway-"+d_code+"-"+a_code+"?_=1&depdate="+flight_info.getF_d()+"&containstax=1";
|
|
|
|
|
%>
|
|
|
|
|
<%if(session.getAttribute("user_id")!=null){ %>
|
|
|
|
|
<li class="pull-right "><button type="button" style= "border:#000000;color:#FFFFFF;background-color:#414582;"
|
|
|
|
|
class="btn btn-danger btn-sm" onClick="window.location.href ='default/order.jsp?flight_id=<%=f_i%>';">订票</button></li><%} %>
|
|
|
|
|
class="btn btn-danger btn-sm" onClick="window.location.href ='<%= Domainname%>';">订票</button></li><%} %>
|
|
|
|
|
<%if(session.getAttribute("user_id")==null){ %>
|
|
|
|
|
<li class="pull-right "><button type="button" style= "border:#000000;color:#FFFFFF;background-color:#414582;"
|
|
|
|
|
class="btn btn-danger btn-sm" onClick="window.location.href ='default/error_login.jsp?flight_id=<%=f_i%>';">订票</button></li><%} %>
|
|
|
|
@ -171,8 +190,10 @@
|
|
|
|
|
<div class="collapse" id="collapseExample" style="display: block;">
|
|
|
|
|
<div class="hangbanlist-body " style="background-color: #f4f6f7;">
|
|
|
|
|
<ul class="list-inline">
|
|
|
|
|
<li class="w-percentage-25">今日剩余座位数:<%=seat %></li>
|
|
|
|
|
<li class="w-percentage-25">价格:<span class="rmb">¥<%=flight_info.getF_p() %></span></li>
|
|
|
|
|
<li class="w-percentage-15">价格:<span class="rmb">¥<%=flight_info.getF_p() %></span></li>
|
|
|
|
|
<li class="w-percentage-15">延误率:<span class=""><%=flight_info.getF_delay() %></span></li>
|
|
|
|
|
<li class="w-percentage-15">餐食:<span class=""><%=flight_info.getF_food() %></span></li>
|
|
|
|
|
<li class="w-percentage-15">座位宽度:<span class=""><%=flight_info.getF_wide() %></span></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|