4/26

地铁系统3:

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="Data.*"  %>
<%@page import= "java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<title>地铁查询</title>
<link rel="stylesheet" href="layui-v2.6.8\layui\css\layui.css">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<div style="width: 100%; font-family: 隶书; text-align: center; font-size: 18pt;">北京地铁查询</div>
<form class="layui-form" action="RouteServlet?method=select" method="post">
  <div class="layui-form-item">
    <label class="layui-form-label">查询线路</label>
    <div class="layui-input-block">
      <input type="text" name="name" required lay-verify="required" placeholder="请输入线路号,如1号线输入1" autocomplete="off" class="layui-input">
      
    </div>
    <br>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" check=>立即查询</button>
       <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="Data.*"  %>
<%@page import="Dao.*"  %>
<%@page import= "java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div style="width: 100%; font-family: 隶书; text-align: center; font-size: 18pt;">北京地铁查询</div>
<a href="RouteServlet?method=findno1">1号线</a>
<a href="RouteServlet?method=findno2">2号线</a>
<a href="RouteServlet?method=findno1">3号线</a>
</body>
</html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>

<table align="center">
    <tr>
            <th>名称</th>
            <th>站数</th>
            <th>换站</th>
            <td>线路</td>

        </tr>
        <c:forEach items="${list}" var="route">
            <tr>
                <td><c:out value="${route.name}"/></td>
                <td><c:out value="${route.number}"/></td>
                <th><c:out value="${route.nearline}"/></td>
                <th><c:out value="${route.xianlu}"/></td>
            </tr>
        </c:forEach>
        </table>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="Data.*"  %>
<%@page import="Dao.*"  %>
<%@page import= "java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>       
                      <%
                      List<route> list=(List<route>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh",
                                "5;URL=index.html");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="index.html">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>线路信息</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>线路名称</b></td>
                                <td><b>站点</b></td>
                            </tr>
                       <%
                          for(route route:list){                         
                  %>
                          <tr align="center">
                          <td><%=route.getName() %></td>
                          <td><%=route.getSite() %></td>
                  </tr>                  
                  <%}                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br><br>
                  请点击 <a href="index.html">这里回到上一个页面</a>!<br></font>
                 </tr>
                 <%} %>
</body>
</html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>

<table align="center">
    <tr>
            <th>名称</th>
            <th>线路</th>
            <th>换站</th>
            <td>线路</td>

        </tr>
        <c:forEach items="${list}" var="route">
            <tr>
                <td><c:out value="${route.name}"/></td>
                <td><c:out value="${route.number}"/></td>
                <th><c:out value="${route.nearline}"/></td>
                <th><c:out value="${route.xianlu}"/></td>
            </tr>
        </c:forEach>
        </table>
</body>
</html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>

<table align="center">
    <tr>
            <th>名称</th>
            <th>线路</th>
            <th>换站</th>
            <td>线路</td>

        </tr>
        <c:forEach items="${list}" var="route">
            <tr>
                <td><c:out value="${route.name}"/></td>
                <td><c:out value="${route.number}"/></td>
                <th><c:out value="${route.nearline}"/></td>
                <th><c:out value="${route.xianlu}"/></td>
            </tr>
        </c:forEach>
        </table>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="Data.*"  %>
<%@page import="Dao.*"  %>
<%@page import= "java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>       
                      <%
                      List<site> list=(List<site>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh",
                                "5;URL=index.html");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="index.html">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>线路信息</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>站点名称</b></td>
                                <td><b>经历线路</b></td>
                            </tr>
                       <%
                          for(site site:list){                         
                  %>
                          <tr align="center">
                          <td><%=site.getName() %></td>
                          <td><%=site.getRoute() %></td>
                  </tr>                  
                  <%}                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br><br>
                  请点击 <a href="index.html">这里回到上一个页面</a>!<br></font>
                 </tr>
                 <%} %>
</body>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@page import="Data.*"  %>
<%@page import="Dao.*"  %>
<%@page import= "java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>地铁查询</title>
<link rel="stylesheet" href="layui-v2.6.8\layui\css\layui.css">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<div style="width: 100%; font-family: 隶书; text-align: center; font-size: 18pt;">北京地铁查询</div>
<form class="layui-form" action="SiteServlet?method=select" method="post">
  <div class="layui-form-item">
    <label class="layui-form-label">查询站点</label>
    <div class="layui-input-block">
      <input type="text" name="name" required  lay-verify="required" placeholder="请输入站点名称,如:故宫" autocomplete="off" class="layui-input">
      
    </div>
    <br>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo" check=>立即查询</button>
       <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
</body>
</html>

 

posted @ 2022-04-26 19:24  _Pi  阅读(84)  评论(0)    收藏  举报