|
|
|
@ -21,7 +21,7 @@ session.setAttribute("url", request.getRequestURI());
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
|
|
|
|
|
<link rel="icon" href="./images/airplane.ico">
|
|
|
|
|
<title>机票预订系统</title>
|
|
|
|
|
<title>机票推荐系统</title>
|
|
|
|
|
<link href="css/bootstrap.min.css" rel="stylesheet">
|
|
|
|
|
<link href="css/common.css" rel="stylesheet">
|
|
|
|
|
<link href="css/corptravel.css" rel="stylesheet">
|
|
|
|
@ -31,15 +31,17 @@ session.setAttribute("url", request.getRequestURI());
|
|
|
|
|
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
|
|
|
|
|
<script src="js/bootstrap.min.js"></script>
|
|
|
|
|
|
|
|
|
|
<%! String user_name,seat;
|
|
|
|
|
/*Date date = new Date();
|
|
|
|
|
<%!
|
|
|
|
|
String user_name,seat;
|
|
|
|
|
Date date = new Date();
|
|
|
|
|
//设置要获取到什么样的时间
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
//获取String类型的时间
|
|
|
|
|
String todaydate = sdf.format(date);*/
|
|
|
|
|
String todaydate = sdf.format(date);
|
|
|
|
|
|
|
|
|
|
//也可以用这个
|
|
|
|
|
// String datetime = tempDate.format(new Date(System.currentTimeMillis()));
|
|
|
|
|
String todaydate="2019-12-01";
|
|
|
|
|
//String todaydate="2019-12-01";
|
|
|
|
|
//注意原本的设定是每天的机票都是不同的,因此数据库中要有每天不同的机票,这里为了方便,就设置了一个固定的时间
|
|
|
|
|
%>
|
|
|
|
|
|
|
|
|
@ -99,8 +101,8 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
class="icon-bar"></span> <span class="icon-bar"></span> <span
|
|
|
|
|
class="icon-bar"></span>
|
|
|
|
|
</button>
|
|
|
|
|
<a class=" " href="index.jsp"><img src="images/newlogo.png"
|
|
|
|
|
width="350" height="70" alt="系统LOGO" class="pull-left mar-right-30"
|
|
|
|
|
<a class=" " href="index.jsp"><img src="images/newlogo11.png"
|
|
|
|
|
width="420" height="84" alt="系统LOGO" class="pull-left mar-right-30"
|
|
|
|
|
style="margin-left: -15px;"></a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -123,16 +125,16 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
<div class="container"
|
|
|
|
|
style="position: relative; margin-left: 650px; width: auto;">
|
|
|
|
|
<form class="form-inline" action="/air_ticket_book/search" method="post">
|
|
|
|
|
<div class="form-group mar-left-10" >
|
|
|
|
|
<div class="form-group" style="left:0%"><!-- mar-left-10 -->
|
|
|
|
|
<label for="" >出发城市</label>
|
|
|
|
|
<input name="departure" type="text" class="form-control"
|
|
|
|
|
style="width: 85px;" value="" placeholder="出发城市">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="form-group" style="margin-left:2%">
|
|
|
|
|
<label for=""> 到达城市</label> <input name="destination" type="text" class="form-control"
|
|
|
|
|
style="width: 85px;" value="" placeholder="到达城市">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<div class="form-group" style="margin-left:2%">
|
|
|
|
|
<label for=""> 出发日期</label>
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input name="departureYear" type="text" class="form-control"
|
|
|
|
@ -151,7 +153,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<button type="submit" class="btn btn-warning mar-left-10"
|
|
|
|
|
style= "font-size:18px; border:#FFFFFF; color:#414582; background-color:#FFFFFF;">搜索</button>
|
|
|
|
|
style= "font-size:18px; border:#FFFFFF; color:#414582; background-color:#FFFFFF;margin-left: 5%">搜索</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -159,7 +161,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 列表开始 -->
|
|
|
|
|
<div class="container mar-bottom-30 " style="margin-left: 50px;">
|
|
|
|
|
<div class="container mar-bottom-30 " style="margin-left: 0%;width:65%">
|
|
|
|
|
<div class="hangbanlist">
|
|
|
|
|
<div>
|
|
|
|
|
<%
|
|
|
|
@ -176,8 +178,13 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
String s_t=res.getString(6);
|
|
|
|
|
String a_t=res.getString(7);
|
|
|
|
|
String f_p=res.getString(8);
|
|
|
|
|
String f_d=res.getString(9);
|
|
|
|
|
String f_delay=res.getString(10);
|
|
|
|
|
String f_food=res.getString(11);
|
|
|
|
|
String f_wide=res.getString(12);
|
|
|
|
|
|
|
|
|
|
String sql2="select sum(t_b) from ticket where f_n='"+f_i+"' and t_d='"+todaydate+"'";
|
|
|
|
|
|
|
|
|
|
db_conn conn2=new db_conn();
|
|
|
|
|
ResultSet res2=conn2.executeQuery(sql2);
|
|
|
|
|
if(res2.next()) seat=res2.getString(1);
|
|
|
|
@ -188,19 +195,31 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
<!-- 表头 -->
|
|
|
|
|
<ul class="list-inline bor-bottom-solid-1 ">
|
|
|
|
|
<li class="w-percentage-25" style="font-size:26px;color:#414582;"> <strong><%=f_i %></strong></li>
|
|
|
|
|
|
|
|
|
|
<li class="w20 time " ><strong><%=s_p %></strong> </li>
|
|
|
|
|
<li class="text-right" style= "color:#414582;"><%=s_a %></li>
|
|
|
|
|
<li class="">—</li>
|
|
|
|
|
<li class="w20 time " ><strong><%=a_p %></strong> </li>
|
|
|
|
|
<li class="w150" style= "color:#414582;"><%=a_a %></li>
|
|
|
|
|
|
|
|
|
|
<li class="time w100"><strong><%=s_t %></strong></li>
|
|
|
|
|
<li class="">—</li>
|
|
|
|
|
<li class="time w80"><strong><%=a_t %></strong></li>
|
|
|
|
|
<!-- order.jsp?flight_id=<%=f_i %> -->
|
|
|
|
|
<%
|
|
|
|
|
db_conn conn3=new db_conn();
|
|
|
|
|
String a_code="";//出发地机场三字码
|
|
|
|
|
String d_code="";//到达地机场三字码
|
|
|
|
|
String sql3="SELECT code FROM codetoname WHERE airportname = '"+a_a+"'";
|
|
|
|
|
String sql4="SELECT code FROM codetoname WHERE airportname = '"+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="+f_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 ='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 ='error_login.jsp?flight_id=<%=f_i %>';">订票</button></li><%} %>
|
|
|
|
@ -212,10 +231,11 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
<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">¥<%=f_p %></span></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <li class="w-percentage-25">今日剩余座位数:<%=seat %></li> -->
|
|
|
|
|
<li class="w-percentage-15">价格:<span class="rmb">¥<%=f_p %></span></li>
|
|
|
|
|
<li class="w-percentage-15">延误率:<span class=""><%=f_delay %></span></li>
|
|
|
|
|
<li class="w-percentage-15">餐食:<span class=""><%=f_food %></span></li>
|
|
|
|
|
<li class="w-percentage-15">座位宽度:<span class=""><%=f_wide %></span></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -231,6 +251,7 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="chat-container">
|
|
|
|
|
<div id="chat-history"></div>
|
|
|
|
|
<div class="input-area">
|
|
|
|
@ -239,8 +260,10 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 添加JavaScript文件引用 -->
|
|
|
|
|
|
|
|
|
|
<script src="js/script.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|