📄 book_list.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ 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"%>
<script type="text/javascript"><!--
//图书信息
function bookinfo(no){
document.all.booklistform.bookNo.value = no;
document.all.booklistform.action = "book_info.do";
document.all.booklistform.submit();
} //修改图书信息
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>
<logic:present name="pageresult" scope="request">
<logic:notEmpty name="pageresult" property="resultList">
<logic:iterate name="pageresult" property="resultList" id="book" indexId="index">
<bean:define id="indexrow" value="${index%2}"></bean:define>
<logic:equal value="0" name="indexrow">
<tr>
</logic:equal>
<logic:equal value="1" name="indexrow">
<tr bgcolor="#c8c8ff">
</logic:equal>
<td width="100%">
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr height="5"><td colspan="4"></td></tr>
<tr>
<td width="5"></td>
<td width="135" align="center">
<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="400">
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr height="20">
<td colspan="3">
<table border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
<td width="25"><img border="0" src="images/m_center_book2.jpg" WIDTH="18" HEIGHT="18"></td>
<td width="275"><a href="#" onclick="bookinfo(<bean:write name="book" property="bookNo"/>);"><font class="font12" color="#2C4A98"><b><bean:write name="book" property="name"/></b></font></a><font color="#fd9a01"></font></td>
<td width="100" align="right"><font class="font12" >还有<bean:write name="book" property="remain"/>本</font></td>
</tr>
</table>
</td>
</tr>
<tr height="20">
<td width="33%"><font class="font12" >图书作者:<bean:write name="book" property="author"/></font></td>
<td width="33%"><font class="font12" >出版单位:<bean:write name="book" property="bookMan"/></font></td>
<td width="33%"><font class="font12" >出版日期:<bean:write name="book" property="publishDate" format="yyyy-MM-dd"/></font></td>
</tr>
<tr height="20"><td colspan="2"><font class="font12"></font></td></tr>
</table>
</td>
<td width="5"></td>
</tr>
<tr height="5"><td colspan="4"></td></tr>
<tr>
<td width="5"></td>
<td width="135"></td>
<td width="400">
<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">
<input type="button" name="bookinfo" value="详细信息" onclick="bookinfo(<bean:write name="book" property="bookNo"/>);">
</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">
<input type="button" name="bookinfo" value="详细信息" onclick="bookinfo(<bean:write name="book" property="bookNo"/>);">
</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="5"></td>
</tr>
<tr height="5"><td colspan="4"></td></tr>
</table>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
<logic:empty name="pageresult" property="resultList">
<tr >
<td align="center" width="100%">
没有图书信息
</td>
</tr>
</logic:empty>
</logic:present>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -