Edit D:\rfid\apache-tomcat-8.5.32\webapps\opac\page\book\bookdetail.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page import="com.jishen.opac.entity.ParSysLocation"%> <%@ page import="com.jishen.common.CommonPar"%> <c:set var="ctx" value="${pageContext.request.contextPath}"/> <!DOCTYPE html> <html> <head> <title>??????</title> <%@ include file="../../page/global/booklinkcss.jsp" %> <link rel="stylesheet" href="${ctx}/css/bookreview.css"/> </head> <body> <!-- ?????? --> <%@ include file="../../page/global/header.jsp" %> <!-- ????? --> <div id="bg"></div> <div class="book-detail" style="width: 1000px;"> <div class="reader-info-box" style="border: 0; margin-bottom: 0;"> <div class="reader-header-title"> <h1>??????</h1> </div> <div class="reader-body basic-info" > <table class="booktable "> <tr> <td colspan="6"> <div class="book-fld-title">${book.title}/${book.author}</div> </td> </tr> <tr> <td rowspan="5" style="width: 120px;"> <div class="bookdetailimg"> <div class="img-title">${book.title}</div> </div> </td> <td style="width: 80px;">????</td> <td >${book.author}</td> <td style="width: 80px;">?????</td> <td style="width: 200px;">${book.publish}</td> <td rowspan="5" style="width: 120px;"> <div id="qrcode"> </div> </td> </tr> <tr> <td >ISBN</td> <td >${book.isbn}</td> <td >?????</td> <td >${book.publishaddress}</td> </tr> <tr> <td >???</td> <td >${book.price}</td> <td >?????</td> <td >${book.publishdate}</td> </tr> <tr> <td >?????</td> <td >${book.classno}</td> <td >???</td> <td >${book.page}</td> </tr> <tr> <td >?????</td> <td >${book.callno}</td> <td >???</td> <td >${book.language}</td> </tr> <tr> <td ></td> <td >?????</td> <td colspan="3">${book.subject}</td> <td class="handler-bnt"> <a href="javascript:void(0)" onclick="addMyselfBook()" title="?????????" style="margin-top: 0px;width: 100%; padding: 0px;">?????????</a> </td> </tr> <tr> <td colspan="6">???????</td> </tr> <tr> <td colspan="6"> <div class="booksummary">${book.content}</div> </td> </tr> </table> </div> </div> <div class="reader-info-box" style="border: 0; margin-bottom: 0;border-top:1px solid #ddd;"> <div class="reader-header-title"> <h1>??????</h1> </div> <div style="text-align: right;height: 50px;border-bottom:1px solid #ddd;line-height: 50px;margin-right: 10px;"> <div class="handler-bnt"> <a href="javascript:void(0)" onclick="reserveHandler(0)" title="??????">??????</a> <a href="javascript:void(0)" onclick="reserveHandler(1)" title="???????">???????</a> </div> </div> <div style="display: none;"> <select id="status"> <c:forEach var="hold" items="${holds}" varStatus="status"> <option value="${hold.status}">${hold.status}</option> </c:forEach> </select> </div> <div style="padding: 10px;"> <table class="table-black" > <thead> <tr> <th >?????</th> <th >?????</th> <th >?????</th> <th >?????</th> <th >???????</th> <th >???????</th> <th >???????</th> <th >??????</th> <th >??????</th> <th >???????</th> <th class="barcodelink-text">???</th> </tr> </thead> <tbody> <c:forEach var="hold" items="${holds}" varStatus="status"> <tr> <td>${hold.barcode}</td> <td>${hold.callno}</td> <td>${hold.libcode}</td> <td>${hold.curlibcode}</td> <td>${hold.curlocation}</td> <td>${hold.status}</td> <td>${hold.doctype}</td> <td>${hold.loandate}</td> <td>${hold.returndate}</td> <td>${hold.renewnum}</td> <td class="barcodelink-text barcodelink-value">${hold.barcode}</td> </tr> </c:forEach> </tbody> </table> </div> </div> <!-- ??? --> <div class="bookreview-box"> <div class="wirte-bookreview"> <a href="javascript:void(0)" onclick="showBookReviewText()" title="??????" >??????</a> </div> <div class="container"> <div class="commentbox"> <textarea cols="80" rows="50" placeholder="????????......" class="mytextarea" id="content"></textarea> <div class="wirte-bookreview"> <a href="javascript:void(0)" onclick="addBookReview()" title="??????" >??????</a> </div> </div> <div class="comment-list"> <div class="comment-info"> <%-- <header><img src="${ctx}/images/user.jpg"></header> <div class="comment-right"> <h3>???</h3> <div class="comment-content-header"><span><i class="glyphicon glyphicon-time"></i> 2017-10-17 11:42:53</span><span></span></div> <p class="content">mongodb ??????????????????????????????????? ????????????????????????????????????????? ????? ????????????? ????????????Mysql ????????????????????????????????????????????????? ?????????????????????????????????????????????? ??????????????ongodb???????????????????????????????????????????????...</p> </div> --%> </div> </div> </div> </div> </div> <div id="show" class="reader-info-box bookreserve" > <div class="reader-header-title" style="clear: both;height: 20px;"> <h1 style="float: left;">??????</h1> <div style="float:right;"><img alt="" src="${ctx}/images/close.png" onclick="hidediv()" style="cursor: pointer;"></div> </div> <div style="display: "> <input id="bibid" hidden="hidden" class="reserverecord" value="${book.id}"> <input id="restype" hidden="hidden" class="reserverecord" > </div> <table class="booktable" style="margin-top: -2px;"> <tr> <td class="div-tr-td" > ?????? </td> <td style="width: 100px;"> <input id="expirydate" class="input-keyword reserverecord" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width:290px;height: 24px;" > </td> </tr> <tr> <td class="div-tr-td" > ?????? </td> <td style="width: 100px;"> <select id="notifyway" class="input-keyword reserverecord" style="width:100%;height: 28px;" data-options="panelHeight:'auto',"> <option value="0">??????</option> <option value="1">??????</option> </select> </td> </tr> <tr> <td class="div-tr-td" > ?????? </td> <td style="width: 100px;"> <select id="location" class="input-keyword reserverecord" style="width:100%;height: 28px;" data-options="panelHeight:'120',"> <%for(ParSysLocation sysLocation:CommonPar.location.listEntity){%> <option value="<%=sysLocation.getCode()%>"><%=sysLocation.getName()%></option> <%}%> </select> </td> </tr> <tr> <td class="div-tr-td" > ??? </td> <td style="width: 100px;"> <input id="note" class="input-keyword reserverecord" style="width:290px;height: 24px;" > </td> </tr> <tr> <td colspan="2"> <div style="margin: auto;text-align: center;"> <div class="handler-bnt"> <a href="javascript:void(0)" onclick="sendReserve()" title="??????">???</a> <a href="javascript:void(0)" onclick="hidediv()" title="???????">???</a> </div> </div> </td> </tr> </table> </div> <div style="height: 80px;clear: both;"></div> <!-- ??? --> <%@ include file="../global/footer.jsp" %> </body> <%@ include file="../global/booklinkjs.jsp" %> <script type="text/javascript" src="${ctx}/third-party/js/jquery.qrcode.min.js"></script> <script type="text/javascript" src="${ctx}/js/DatePicker/WdatePicker.js"></script> <script type="text/javascript"> $(function(){ makeCode(); getDoubanBook(); initBookReviewList(); hidediv(); writeSearchDetailLog(); initPageMessage(); }); function initPageMessage(){ var url = '${ctx}/par/common/getOpacConfig.do'; $.post(url, null, function(data) { if(data.barcodelink){ var barcodeArr = $(".barcodelink-value"); barcodeArr.each(function(i, elt) { var html ="<a title=\"??????\" href='"+data.barcodelink+elt.innerHTML+"' class='jump-link-barcode'>"+ data.barcodetext +"</a>"; elt.innerHTML=html; }); }else{ $(".barcodelink-text").hide(); } }, 'json'); } function writeSearchDetailLog(){ var url = ctx + '/par/common/writeSearchDetailLog.do'; var param = {}; param.id = '${book.id}'; param.classno = '${book.classno}'; $.post(url, param, function(data) { }, 'json'); } function addMyselfBook(){ var url = '${ctx}/reader/myBookShelf/insert.do'; var param = {}; param.bibid = '${book.id}'; param.mbtype = "0"; param.note = "?????????"; if(param.bibid){ $.post(url, param, function(data) { if (data.status == "0") { var rows = data.rows; if(rows[0]=="QT_MEI_DENG_LU"){ window.location.href="${ctx}/page/reader/login.jsp?url="+window.location.href; }else{ alert(data.message+",??????????????,??????????????????????"); } } }, 'json'); } } function showBookReviewText(){ var url = '${ctx}/par/common/validateLogin.do'; var param = {}; $.post(url, param, function(data) { if (data.status == "0") { $(".commentbox").toggle(); }else{ window.location.href="${ctx}/page/reader/login.jsp?url="+window.location.href; } }, 'json'); } function initBookReviewList(){ var url = '${ctx}/reader/bookreview/listUnionReader.do'; var param = {}; param.bibid = '${book.id}'; param.status = "1"; if(param.bibid){ $.post(url, param, function(data) { if (data.status == "0") { var rows = data.rows; var html =""; for(var i = 0; i < rows.length;i++){ html +="<div class=\"comment-info\">"; html +="<header><img src=\"${ctx}/images/user.jpg\"></header>"; html +="<div class=\"comment-right\">"; html +="<h3>"+ rows[i].name.substr(0, 1) +"**</h3>"; html +="<div class=\"comment-content-header\">"; html +="<span>"+ fmtStringToDate(rows[i].reviewdate) +" "+ fmtStringToTime(rows[i].reviewtime) +"</span>"; html +="</div>"; html +="<p class=\"content\">"; html += rows[i].content; html +="</p>"; html +="</div>"; html +="</div>"; } $(".comment-list").html(html); } }, 'json'); } } function addBookReview(){ var url = '${ctx}/reader/bookreview/insert.do'; var param = {}; param.bibid = '${book.id}'; param.content = $("#content").val(); if(param.bibid){ $.post(url, param, function(data) { if (data.status == "0") { var rows = data.rows; if(rows[0]=="QT_MEI_DENG_LU"){ window.location.href="${ctx}/page/reader/login.jsp?url="+window.location.href; }else{ $(".commentbox").toggle(); alert(data.message+",??????????????????????????,?????????????????"); } } }, 'json'); } } function reserveHandler(type){ var bLoan = false; var bhold = false; $("#status option").each(function(){ //???????ption var txt = $(this).val(); //???option?? if(txt == '???'){ bhold = true; } if(txt == '???'){ bhold = true; } }); /* if(type == 0 && !bLoan){ return alert("????????????,?????????!"); } if(type == 1 && !bLoan){ return alert("????????????,??????????!"); } */ var url = '${ctx}/par/common/validateLogin.do'; var param = {}; param.isbn = '${book.isbn}'; if(param.isbn){ $.post(url, param, function(data) { if (data.status == "0") { showdiv(); $("#expirydate").val(getAddYMD(null,1,null)); $("#restype").val(type); /* $(window).attr('location', '${ctx}/page/reader/reserve.jsp?type='+type+"&id="+${book.id}); */ }else{ var r=confirm(data.message) if (r==true) { window.location.href="${ctx}/page/reader/login.jsp?url="+window.location.href; } } }, 'json'); } } function sendReserve(){ var url = '${ctx}/server/api/insertReserve.do'; var param = {}; $(".reserverecord").each(function (index, elt) { param[elt.id] = $("#" + elt.id).val(); }); if(param.expirydate) param.expirydate = param.expirydate.replace(new RegExp('-', 'g'), ''); var title = "??"; if($("#restype").val() == "1"){ title = "??"; } $.post(url, param, function(data) { hidediv(); if(data){ var dataJosn = data; if(dataJosn.status == '0'){ var r=confirm(dataJosn.message + ",???????????"+title+"???"); if (r==true){ window.location.href="${ctx}/page/reader/reserve.jsp?target=999&menucode=2005&type="+$("#restype").val(); } }else{ alert(dataJosn.message); } }else{ alert("??????????????,?????????"); } }, 'json'); } function showdiv() { document.getElementById("bg").style.display ="block"; document.getElementById("show").style.display ="block"; } function hidediv() { document.getElementById("bg").style.display ='none'; document.getElementById("show").style.display ='none'; } function getDoubanBook(){ var url = '${ctx}/par/common/getDoubanBook.do'; var param = {}; param.isbn = '${book.isbn}'; if(param.isbn){ $.post(url, param, function(data) { if (data.status == "0") { var book = JSON.parse(data.message); setBookDetailText(book); } }, 'json'); } } function setBookDetailText(book){ if(book.image){ var imageUrl = book.image.replace("view\/subject\/m\/public","lpic"); $(".bookdetailimg").html("<img src=\"" + imageUrl + "\" width='120' height='150'>"); } if(book.summary){ $(".booksummary").html(book.summary); } } /* ????????? * @param type ?????? * @returns */ function getAddYMD(y,m,d){ var date = new Date(); if(y){ date.setMonth(date.getFullYear() + y); } if(m){ date.setMonth(date.getMonth() + m); } if(d){ date.setMonth(date.getDate() + d); } var year = date.getFullYear(); var month = date.getMonth() + 1; var strDate = date.getDate(); if (month >= 1 && month <= 9) { month = "0" + month; } if (strDate >= 0 && strDate <= 9) { strDate = "0" + strDate; } var currentdate = year +"-"+ month + "-" + strDate; return currentdate; } function makeCode() { var qrcodeText = "???:" + '${book.title}'; qrcodeText += ",?????:" + '${book.callno}'; qrcodeText += ",ISBN:" + '${book.isbn}'; $("#qrcode").qrcode({ width: 180, height:180, text:toUtf8(qrcodeText) }); } function toUtf8(str) { var out, i, len, c; out = ""; len = str.length; for(i = 0; i < len; i++) { c = str.charCodeAt(i); if ((c >= 0x0001) && (c <= 0x007F)) { out += str.charAt(i); } else if (c > 0x07FF) { out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F)); out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F)); out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); } else { out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F)); out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); } } return out; } </script> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de