www.pudn.com > liberSystem.rar > book_list_find.jsp, change:2012-06-06,size:3209b


<%@page import="com.ccl.util.PublicUtil"%> 
<%@page import="com.ccl.service.BookTypeService"%> 
<%@page import="com.ccl.service.BookService"%> 
<%@page import="com.ccl.domin.Book"%> 
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> 
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<% 
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>My JSP 'admin_list.jsp' starting page</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="css/main.css"> 
	<script type="text/javascript"> 
	function _confim(){ 
		var flag=confirm("您真的要删除此项数据吗?"); 
		return flag 
	} 
	</script> 
  </head> 
  <body> 
  	    <div class="box"> 
  	    <form action="book_find" method="post" name="form3"> 
  	    你想查询的书: 
  	    <select name="keytype"> 
  	    	<option value="0">图书名称</option> 
  	    	<option value="1">图书作者</option> 
  	    </select> 
  	    <input type="text" name="key"  size="4" maxlength="30" > 
  	    图书类型: 
  	    <% 
	  		List<Object> lists=new BookTypeService().booktype_list(); 
	  	request.setAttribute("listsa", lists); 
	  	%> 
	  	<select name="type"> 
	  	<option value="0">所有类型</option> 
		  	<c:forEach items="${listsa }" var="d"> 
		  		<option value="${d.id }">${d.name }</option> 
		  	</c:forEach> 
	  	</select>  
  	    	<input type="submit" value="查询"/> 
  	    	</form> 
    	<table border="1"> 
    	 
    		<tr> 
    			<th colspan="15">图书信息列表</th> 
    		</tr> 
    		<tr> 
    			<td>编号</td> 
    			<td>图书名称</td> 
    			<td>作者</td> 
    			<td>出版社</td> 
    			<td>价格(元)</td> 
    			<td>入馆时间</td> 
    			<td>图书类型</td> 
    			<td>管理员</td> 
    			 
    			<td>现存数量</td> 
    			<td>操作</td> 
    		</tr> 
    		<c:forEach items="${books}" var="l">  
	    		<tr> 
	    			<td>${l.id }</td> 
	    			<td>${l.bookName }</td> 
	    			<td>${l.author}</td> 
	    			<td>${l.publisher }</td> 
	    			<td>${l.price}</td> 
	    			<td>${l.inTime}</td> 
	    			<td> 
	    			<% 
	    			Book b=(Book)pageContext.getAttribute("l"); 
	    				out.print(PublicUtil.getBookTypeByID(b.getType()).getName()); 
	    			%> 
	    			</td> 
	    			<td> 
	    			<%=PublicUtil.getOperatorById(b.getOperator()).getName() %> 
	    			</td> 
	    			<td> 
	    			<% 
	    			out.print(PublicUtil.bookShu(b.getId())); 
	    			%> 
	    			</td> 
	    			<td><span><a href="book_edit.jsp?id=${l.id }">修改</a>|<a href="book_del?id=${l.id}" onclick="return _confim()">删除</a></span></td> 
	    			<td> 
	    			 
	    		</tr> 
    		</c:forEach> 
    	</table> 
    </div> 
  </body> 
</html>