www.pudn.com > liberSystem.rar > book_edit.jsp, change:2012-05-30,size:2587b


<%@page import="com.ccl.service.BookService"%> 
<%@page import="com.ccl.service.BookTypeService"%> 
<%@page import="com.ccl.domin.*"%> 
<%@ 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_add.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 on_submit(){ 
		book_add.submit(); 
	} 
	</script> 
	<% 
		String id=request.getParameter("id"); 
	if(id!=null) 
	{ 
		Book b=new BookService().getBookByID(Integer.valueOf(id)); 
		request.setAttribute("b", b); 
	} 
	%> 
  </head> 
  <body style="text-align: center;"> 
  <div class="box"> 
  	<form action="book_update" method="post" name="book_add"> 
	  <table border="1"> 
	  <tr> 
	  	<th colspan="2">修改图书信息</th> 
	  </tr> 
	  <tr> 
	  	<td>图书名称</td> 
	  	<td><input type="text" name="bookName" value="${b.bookName }"> 
	  		<input type="hidden" name="id" value="${b.id }"> 
	  	</td> 
	  </tr> 
	   <tr> 
	  	<td>作者</td> 
	  	<td><input type="text" name="author" value="${b.author }"></td> 
	  </tr> 
	   <tr> 
	  	<td>出版社</td> 
	  	<td><input type="text" name="publisher" value="${b.publisher }"></td> 
	  </tr> 
	   <tr> 
	  	<td>价格</td> 
	  	<td><input type="text" name="price" value="${b.price }"></td> 
	  </tr> 
	   <tr> 
	  	<td>类型*</td> 
	  	<% 
	  		List<Object> lists=new BookTypeService().booktype_list(); 
	  	request.setAttribute("lists", lists); 
	  	%> 
	  	<td><select name="type"> 
	  	<c:forEach items="${lists }" var="l"> 
	  		<option value="${l.id }" ${l.id==b.type?'selected=selected':'' } >${l.name }</option> 
	  	</c:forEach> 
	  	</select> </td> 
	   <tr> 
	  	<td colspan="2" class="box_bottom"> 
	  		<input type="button" value="提交" onclick="on_submit()"> 
	  		<input type="button" value="返回" onclick="javascript:history.go(-1)"> 
	  	</td> 
	  </tr> 
	  </table> 
	  </form> 
  </div> 
  </body> 
</html>