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

📄 user.jsp

📁 图书管理系统
💻 JSP
字号:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="fuguo.yy1.dto.BookCategory,fuguo.yy1.bo.BookCategoryBO"%>
<%@ page import="fuguo.yy1.dto.User"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>登录成功</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
  </head>
  
  <body>
  <center>
    <%
		User user=(User)session.getAttribute("USER");
		if(user==null){		
	%>
			您还没有登录,无权查看该页面!<br>
			请先<a href="<%=path%>/user/userLogin.jsp">登录</a>
			<%}else{%>
			<TABLE align="center" border="0" cellpadding="5" cellspacing="0" width="90%">
				
				<TR>
					<TD colspan="4"><font color="blue" size="10"><i><b>在线图书</b></i></font></td>
				</tr>
				<tr>
					<TD colspan="4" valign="top" bgcolor="blue"></td>
				</tr>					
				<TR height="25px"  bgcolor="#cccccc">
					<TD width="25%" align="right">欢迎您,</TD>
					<TD width="25%" align="left"><%=user.getUserName() %></TD>
					<TD width="25%" align="left">今天是<%=new Date().toLocaleString() %></TD>
					<TD width="25%" align="right"><A href="<%=path%>/user/userOut.jsp">退出登录</A></TD>
				</TR>
				<tr>
					<TD colspan="4" valign="top" bgcolor="blue"></td>
				</tr>	
				<TR height="30px">
					<td colspan="4"></td>
				</TR>
				<%
				ArrayList categoryList=(ArrayList)BookCategoryBO.bookCategorys();
				if(categoryList.size()>0 && categoryList!=null){
				%>	
				<TR height="20px">
					<td colspan="4"><b><i>图书查询</i></b></td>
				</TR>
				<tr>
					<TD colspan="4" valign="top" bgcolor="#cccccc"></td>
				</tr>	
				<form action="<%=path %>/user/searchBook.do" method="post">
				<tr height="30">
					<TD align="right" width="30%">图书名称</td>
					<TD align="left"><INPUT type="text" name="bookName"> </td>
					<TD colspan="2">
						若没输则显示所有
					</td>
				</tr>
				<tr height="30">
					<TD align="right">图书类别</td>
					<TD  align="left">
						<select name="bookCategoryId">
						<option value="0">----全 部 图 书 类 别----</option>
						<%
						Iterator it=categoryList.iterator();
						while(it.hasNext()){
							BookCategory bookCategory=(BookCategory)it.next();
						%>
						<option value="<%=bookCategory.getBookCategoryId() %>"><%=bookCategory.getCategoryName() %></option>
						<%}%></select>
					</td>
					<TD colspan="2">请您选择图书类别</td>
				</tr>
				<tr height="30">
					<TD colspan="2" align="center"><input type="submit" value="查询"></td>
					<TD colspan="2" ></td>
				</tr>					
				</form>
			<%}else{%>
				<tr>
					<TD colspan="4" align="center" ><font color="red">目前该网站还没有任何图书和图书类别</font></td>
				</tr>	
			</TABLE>
			<%}
		}%>
    </center>
  </body>
</html>

⌨️ 快捷键说明

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