📄 adminbookinfoupdate_do.jsp
字号:
<%@ page language="java" pageEncoding="gbk" import="java.sql.*" import="java.util.*"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<jsp:useBean id="data" class="com.hua.book.struts.datebase.Database" scope="session"/>
<jsp:useBean id="smart" scope="page" class="org.lxh.smart.SmartUpload"/>
<%
// 1、上传初始化
smart.initialize(pageContext) ;
// 2、准备上传
smart.upload() ;
// 3、保存上传的文件
smart.save("D:/workspace/booksystem/WebRoot/load") ;
String src=smart.getFiles().getFile(0).getFilePathName();
String filename=smart.getFiles().getFile(0).getFileName();
GregorianCalendar calendar = new GregorianCalendar();
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH) + 1;
int day = calendar.get(Calendar.DAY_OF_MONTH);
String uploadtime = year + "-" + month + "-" + day;
String id=smart.getRequest().getParameter("id");
String bookid=smart.getRequest().getParameter("bookid");
String bookname=smart.getRequest().getParameter("bookname");
String bookauthor=smart.getRequest().getParameter("bookauthor");
String biglocation=smart.getRequest().getParameter("biglocation");
String smalllocation=smart.getRequest().getParameter("smalllocation");
String bookinprice=smart.getRequest().getParameter("bookinprice");
String bookshuliang=smart.getRequest().getParameter("bookshuliang");
String bookshuoming=smart.getRequest().getParameter("bookshuoming");
String bookchubanshe=smart.getRequest().getParameter("bookchubanshe");
String bookborrowprice=smart.getRequest().getParameter("bookborrowprice");
//boolean tag=data.adminbookupdate(id,bookname,bookauthor,biglocation,smalllocation,bookshuliang,bookchubanshe,bookinprice,bookshuoming,filename,uploadtime);
//data.adminbookupdate( );
boolean tag=data.adminbookupdate(id , bookid, bookname, bookauthor, biglocation, smalllocation, bookshuliang, bookchubanshe, bookinprice, bookshuoming, filename,uploadtime,bookborrowprice);
if(tag)
{
%>
<script language="javascript">
alert('恭喜!修改成功!');
window.location="adminbookserach.jsp";
</script>
<%
}
else
{%>
<script language="javascript">
alert('对不起,修改失败!');
window.location="adminbookserach.jsp";
</script>
<%
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -