⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 一个在线售票系统
💻 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"/>
     <%
  }  
  %>
  <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">&nbsp;&nbsp;<a href="../system_admin/index.jsp">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="../user/admin_by_s_admin.jsp">用户管理</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="../admin/admin_by_s_admin.jsp">管理员管理</a>&nbsp;&nbsp;
      &nbsp;&nbsp;&nbsp;<a href="../admin/add_by_s.jsp">添加管理员</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../system_admin/inf_edit.jsp">控制面板</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="../train/1stProcess_add_by_s.jsp">添加列车路线</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../common/exit.jsp">退出</a>&nbsp;&nbsp;</td>
        </tr>
       </TBODY>
    </table>
    <form name="search" method="post" action="../system_admin/do_search.jsp">
  <table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
     <tr>
      <td width="600" bgcolor="#ebebeb"><span class="style2">搜索:</span>分类
          <select name="search_type">
              <option value="车次">车次</option>
              
              <option value="用户">用户</option>
        </select>
        关键字:<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>
         <td width="600" align="center" bgcolor="#cccccc">
          里程
         </td>
         <td width="600" align="center" bgcolor="#cccccc">
          查看
         </td>
       </tr>
    </table>
    <%
       ResultSet rs=search.getResultSetBySql("select * from traininf");
       if(rs!=null&&rs.next())
       {
          %>
          <table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
             
          <%
          do
          {
             %>
             <tr>
               <td width="600" align="center" bgcolor="#EBEBEB">
                  <%=rs.getString(1)%>
               </td>
               <td width="600" align="center" bgcolor="#EBEBEB">
                  <%=rs.getString(2)%>
               </td>
               <td width="600" align="center" bgcolor="#EBEBEB">
                  <%=rs.getString(3)%>
               </td>
               <td width="600" align="center" bgcolor="#EBEBEB">
                  <%=rs.getString(4)%>
               </td>
               <td width="600" align="center" bgcolor="#EBEBEB">
                  <%=rs.getInt(6)%>
               </td>
               <td width="600" align="center" bgcolor="#EBEBEB" height="25">
                  <a href="../train/look_by_s.jsp?train_serial=<%=rs.getString(1)%>">查看</a>
               </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>
               <td width="600" align="center" bgcolor="#cccccc" height="3">
               </td>
             </tr>
             <%
          }
          while(rs.next());
          %>
          </table>
          <%
       }
       else
       {
          %>
          <table cellSpacing=0 cellPadding=0 width=600 align="center" align="center">
             <tr>
               <td width="600" align="center" bgcolor="#EBEBEB">
               该系统没有添加任何列车线路
               </td>
             </tr>
          </table>
          <% 
       }
    %>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -