📄 book_info.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@page import="c18.util.ConvertUtil"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/defaultpage.css" type="text/css">
<link rel="stylesheet" href="css/book_category.css" type="text/css">
<script LANGUAGE="javascript" src="js/book_category.js"></script>
<title>图书信息</title>
<script type="text/javascript">
<!--
//登陆
function loginsub(){
if(document.all.loginform.lloginName.value == ""){
alert('请输入登陆账号!');
document.all.loginform.lloginName.focus();
return false;
}
if(document.all.loginform.lpassword.value == ""){
alert('请输入密码!');
document.all.loginform.lpassword.focus();
return false;
}
document.all.loginform.pagename.value="/book_add";
document.all.loginform.action="loginsub.do";
document.all.loginform.submit();
}
//退出
function logoutsub(){
document.all.loginform.pagename.value="/main";
document.all.loginform.action="logout.do";
document.all.loginform.submit();
}
//去注册页面
function registersub(){
document.all.loginform.pagename.value="/register";
document.all.loginform.action="register.do";
document.all.loginform.submit();
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="4" bgcolor="#e6e6ff">
<div align="center">
<!-- 包括页面上端 -->
<jsp:include flush="true" page="top.jsp?top=2"/>
<!-- 图书菜单 -->
<jsp:include flush="true" page="book_menu.jsp"/>
<table border="0" cellPadding="0" cellSpacing="0" width="740"
height="25" valign="top" background="images/m_local_bk.jpg">
<tr>
<td width="20"></td>
<td><font class="font12">当前位置:<html:link forward="/main">图书</html:link>/图书信息</font></td>
</tr>
</table>
<table border="0" cellPadding="0" cellSpacing="0" width="740" height="5">
<tr>
<td></td>
</tr>
</table>
<table border="0" cellPadding="0" cellSpacing="0" width="740"
valign="top">
<tr>
<td width="180" valign="top">
<table border="0" width="180" cellPadding="0" cellSpacing="0"
valign="top">
<tr height="5">
<td></td>
</tr>
<tr>
<td width="100%">
<!-- 登陆部分页面 -->
<jsp:include flush="true" page="login.jsp"/>
</td>
</tr>
<tr height="10">
<td></td>
</tr>
<tr>
<td width="100%">
<!-- 图书查询部分页面 -->
<jsp:include flush="true" page="book_query.jsp"/>
</td>
</tr>
<tr height="10">
<td></td>
</tr>
<!-- 借阅管理部分 -->
<jsp:include flush="true" page="borrow_select.jsp"/>
<tr>
<td width="100%"></td>
</tr>
<tr height="10">
<td></td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</td>
<td width="5"></td>
<td width="5"></td>
<td width="550" valign="top">
<table border="0" cellPadding="0" cellSpacing="0" width="100%"
valign="top">
<tr height="5">
<td></td>
</tr>
<tr>
<td>
<table border="0" cellPadding="0" cellSpacing="0" width="100%" bgcolor="#9a9afe">
<tr>
<td colspan="3">
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
<td width="137"><img border="0" src="images/b_center_menu_1.jpg" WIDTH="137" HEIGHT="25"></td>
<td width="137" background="images/b_center_menu_0.jpg"></td>
<td width="137" background="images/b_center_menu_0.jpg"></td>
<td width="137" background="images/b_center_menu_0.jpg"></td>
<td width="2"><img border="0" src="images/b_center_menu_5.jpg" WIDTH="2" HEIGHT="25"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="2" background="images/b_center_edit_left.jpg"></td>
<td width="544">
<table border="0" cellPadding="0" cellSpacing="0">
<tr height="5">
<td width="20"></td>
<td width="70" align="right"></td>
<td width="430">
<logic:present name="errorString"><bean:write name="errorString"/></logic:present>
</td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >图书名称:</font></td>
<td width="430"><bean:write name="book" property="name"/></td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >图书作者:</font></td>
<td width="430"><bean:write name="book" property="author"/></td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >出版单位:</font></td>
<td width="430"><bean:write name="book" property="bookMan"/></td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" > I S B N :</font></td>
<td width="430"><bean:write name="book" property="isbn"/></td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >出版日期:</font></td>
<td width="430"><bean:write name="book" property="publishDate" format="yyyy-MM-dd"/>
</td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >图书图片:</font></td>
<td width="430">
<logic:empty name="book" property="imageFile">没有图片信息</logic:empty>
<logic:notEmpty name="book" property="imageFile">
<img border="0" src="images/book/<bean:write name="book" property="bookNo"/>/<bean:write name="book" property="imageFile"/>" WIDTH="70" HEIGHT="90">
</logic:notEmpty>
</td>
<td width="24"></td>
</tr>
<bean:define id="priceint" name="book" property="price"></bean:define>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >图书价格:</font></td>
<td width="430"><%=ConvertUtil.convertCurrency(((Integer)priceint).intValue()) %>元</td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >图书数量:</font></td>
<td width="430"><bean:write name="book" property="amount"/></td>
<td width="24"></td>
</tr>
<tr height="22">
<td width="20"></td>
<td width="70" align="right"><font class="font12" >图书余量:</font></td>
<td width="430"><bean:write name="book" property="remain"/></td>
<td width="24"></td>
</tr>
<tr height="22" valign="top">
<td width="20"></td>
<td width="70" align="right" ><font class="font12" >图书简介:</font></td>
<td width="430"><bean:write name="book" property="brief"/></td>
<td width="24"></td>
</tr>
<tr height="48">
<td width="20">
<script type="text/javascript">
<!--
//修改图书信息
function bookmod(no){
document.all.booklistform.bookNo.value = no;
document.all.booklistform.action = "book_mod.do";
document.all.booklistform.submit();
}
//删除图书信息
function bookdel(no){
document.all.booklistform.bookNo.value = no;
document.all.booklistform.action = "book_delsub.do";
document.all.booklistform.submit();
}
//预错图书
function bookpreborrow(no){
document.all.booklistform.bookNo.value = no;
document.all.booklistform.action = "preborrow.do";
document.all.booklistform.submit();
}
//-->
</script>
<form name="booklistform" method="post" action="book_info.do">
<input type="hidden" name="bookNo" value="0">
</form>
</td>
<td width="70" align="right"></td>
<td width="430">
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr height="20">
<!-- 已登陆 -->
<logic:present name="UserSession" scope="session">
<!-- 管理员 -->
<logic:equal value="1" name="UserSession" property="role">
<td width="70" align="center"></td>
<td width="30"></td>
<td width="70" align="center">
</td>
<td width="30"></td>
<td width="70" align="center">
<input type="button" name="bookdel" value="删除图书" onclick="bookdel(<bean:write name="book" property="bookNo"/>);">
</td>
<td width="30"></td>
<td width="70" align="center">
<input type="button" name="bookmod" value="修改信息" onclick="bookmod(<bean:write name="book" property="bookNo"/>);">
</td>
</logic:equal>
<!-- 非管理员 -->
<logic:notEqual value="1" name="UserSession" property="role">
<td width="70" align="center"></td>
<td width="30"></td>
<td width="70" align="center">
</td>
<td width="30"></td>
<td width="70" align="center">
</td>
<td width="30"></td>
<td width="70" align="center">
<input type="button" name="bookpreborrow" value="预借图书" onclick="bookpreborrow(<bean:write name="book" property="bookNo"/>);">
</td>
</logic:notEqual>
</logic:present>
<td width="30"></td>
</tr>
</table>
</td>
<td width="24"></td>
</tr>
</table>
</td>
<td width="4" background="images/b_center_edit_right.jpg"></td>
</tr>
<tr>
<td colspan="3" height="4" background="images/b_center_edit_bottom.jpg"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 底部页面 -->
<jsp:include flush="true" page="bottom.jsp"/>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -