Edit D:\chineseall_products\bak\digitalLib6\pages\prettify\book\bookDetail.jsp
<%@ page contentType="text/html;charset=utf-8" %> <%@ taglib prefix="s" uri="/struts-tags"%> <s:set name="templatePath" value="@com.chineseall.core.servlet.InitParameters@pageTemplatePath"/> <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <title>????????- <s:action name="viewSchoolName" executeResult="true"> <s:param name="sid" value="sid"></s:param> </s:action></title> <link rel="stylesheet" type="text/css" href="/pages/${templatePath}/css/base.css"> <script type="text/javascript" src="/js/judgeInput.js"></script> </head> <body> <!--top--> <s:set name="menuIndex" value="2"/> <jsp:include page="/pages/${templatePath}/top.jsp" /> <jsp:include page="/pages/${templatePath}/navMenu.jsp"/> <div class="bodypage"> <div class="tx_top"> <div class="left"> <s:if test="book.bookCover == null"> <img src='/uploadFiles/subjectHeadImage/nopic.jpg' width="150" height="200"> </s:if><s:else> <img src='<s:property value="book.bookCover"/>' onerror="this.src='/uploadFiles/subjectHeadImage/nopic.jpg'" width="150" height="200"> </s:else></div> <div class="center"> <dl><dt><span><s:property value="book.name"/> </span> <s:if test="bookStat !=null"> <img id="star0" src="/pages/${templatePath}/images/dafen<s:if test="bookStat.plainScore<1">_g</s:if>.png" width="16" height="16"> <img id="star10" src="/pages/${templatePath}/images/dafen<s:if test="bookStat.plainScore<20">_g</s:if>.png" width="16" height="16"> <img id="star20" src="/pages/${templatePath}/images/dafen<s:if test="bookStat.plainScore<30">_g</s:if>.png" width="16" height="16"> <img id="star30" src="/pages/${templatePath}/images/dafen<s:if test="bookStat.plainScore<40">_g</s:if>.png" width="16" height="16"> <img id="star40" src="/pages/${templatePath}/images/dafen<s:if test="bookStat.plainScore<50">_g</s:if>.png" width="16" height="16"> </s:if></dt> <dd>?????<s:property value="book.author"/> </dd> <dd>??????<s:property value="book.publisher"/> </dd> <dd>????????<s:property value="book.publishDate"/> </dd> <dd>ISBN??<s:property value="book.isbn"/> </dd> <dd class="fl_list">???????? ( <s:property value="book.ztCode"/> <s:if test="ztSortList!=null && ztSortList.size()>0"> ( <s:iterator value="ztSortList" status="obj"> <s:property value="name"/> <s:if test="#obj.count < ztSortList.size">></s:if> </s:iterator>)</s:if> ) </dd> <s:if test="book.entityTypes!=null && !book.entityTypes.equals('PAPER) && !isBorrowed "> <s:if test="(book.copiesCount+1)-borrowCount>0"> <dd class="fl_list">??????????????<s:property value="(book.copiesCount+1)-borrowCount"/> </dd> </s:if> <s:else> <dd class="fl_list">?????????????????<s:date name="userBorrowBook.expiredDate" format="yyyy-MM-dd" />??????????? </dd> </s:else> </s:if> <s:if test="paperBook!=null"> <dd class="fl_list" style="color: orange;"> ?????? ????????<s:property value="paperBook.entityPath"/> ??????<s:property value="paperBook.fileSize"/> <br/> ????????<s:property value="paperBook.bookPosCn"/> </dd> </s:if> <dd class="fl_list1 yuedu"><s:property value="bookStat.totalReadCount"/>??</dd> <dd class="fl_list1 chakan"><s:property value="bookStat.totalVisitCount"/>??</dd> <dd class="fl_list1 shoucang"><s:property value="bookStat.totalCollectionCount"/>??</dd> <dd class="fl_list1 tuijian"><s:property value="bookStat.totalRecommendCount"/>??</dd> <dd class="fl_list2"> <s:if test="book.intro!=null"> <s:property value="book.intro.replaceAll('\n','<br/>').replaceAll('\r','')" escape="false" /> </s:if> </dd> <dd class="df"> <s:if test="isBorrowed"> <s:if test="book.entityTypes.indexOf('PDF')>=0"> <a href="/readPDFBook.action?objectId=<s:property value="book.id"/>&activityId=<s:property value='activityId'/>" class="orangeBtn">???PDF</a> </s:if> <s:if test="book.entityTypes.indexOf('TXT')>=0"> <a href="/readTxtBook.action?objectId=<s:property value="book.id"/>&activityId=<s:property value='activityId'/>" class="orangeBtn">???TXT</a> </s:if> </s:if> <s:else> <s:if test="book.entityTypes!=null && !book.entityTypes.equals('PAPER')"> <div id="borrowLink"><a style="cursor: pointer;" onclick="borrowBook();">???</a></div> </s:if> </s:else> <a style="cursor: pointer;" onclick="collectionBook();">???</a> <a style="cursor: pointer;" onclick="recommendBook();" id="doBtn">???</a> <span>?????</span> <div id="starCountDiv"> <img style="cursor: pointer;" title="???" onclick="javascript:setBookScore(1);" src="/pages/${templatePath}/images/dafen_g.png" width="16" height="16"> <img style="cursor: pointer;" title="????" onclick="javascript:setBookScore(2);" src="/pages/${templatePath}/images/dafen_g.png" width="16" height="16"> <img style="cursor: pointer;" title="??" onclick="javascript:setBookScore(3);" src="/pages/${templatePath}/images/dafen_g.png" width="16" height="16"> <img style="cursor: pointer;" title="???" onclick="javascript:setBookScore(4);" src="/pages/${templatePath}/images/dafen_g.png" width="16" height="16"> <img style="cursor: pointer;" title="?????" onclick="javascript:setBookScore(5);" src="/pages/${templatePath}/images/dafen_g.png" width="16" height="16"> </div> </dd> </dl> </div> <s:if test="book.entityTypes!=null && !book.entityTypes.equals('PAPER')"> <div class="right"><img src='/resourceDownloadImg.action?type=1&objectId=<s:property value="book.id"/>&activityId=<s:property value="activityId"/>' width="132" height="132">????????????????????????????????????????????????????????????</div> </s:if> </div> <div class="tx_topimg"></div> <!--???--> <div class="w660 fleft"> <div class="yd_title_catalog">???</div> <div class="yd_catalog_list"> <div id="showItem"> <s:set name="firstCount" value="0"/> <s:set name="childCount" value="0"/> <s:set name="itemCount" value="0"/> <s:iterator value="itemList" status="obj"> <s:if test="#firstCount==10 && itemList[#obj.index].depth==1"> <s:set name="firstCount" value="#firstCount+1"/> </s:if> <s:if test="#firstCount<10 || (#firstCount==10 && itemList[#obj.index].depth>1)"> <s:set name="itemCount" value="#obj.index"/> <s:if test="depth == 1"> <s:set name="firstCount" value="#firstCount+1"/> <s:if test="#childCount > 0"></div><s:set name="childCount" value="0"/></s:if> <s:if test="hasChild"> <div class="label" style="cursor:pointer;"> <span class="arrow_r"></span> <s:set name="childCount" value="1"/> </s:if> <s:else> <div class="label"> <span class="arrow"></span> </s:else> <s:if test="book.entityTypes.indexOf('PDF')>=0"> <a href="/readPDFBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>"><s:property value="title"/></a> </s:if> <s:elseif test="book.entityTypes.indexOf('TXT')>=0"> <a href="/readTxtBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>"><s:property value="title"/></a> </s:elseif> <s:if test="!hasChild"></div></s:if> </s:if> <s:else> <div class="chapter" style="display: none" > <s:if test="book.entityTypes.indexOf('PDF')>=0"> <a href='/readPDFBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>'><s:property value="title"/></a> </s:if> <s:elseif test="book.entityTypes.indexOf('TXT')>=0"> <a href='/readTxtBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>'><s:property value="title"/></a> </s:elseif> </div> </s:else> </s:if> </s:iterator> <s:if test="itemList!=null && itemList.size()>0 && itemList[#itemCount].depth>1"></div></s:if> </div> <s:set name="childCount" value="0"/> <div id="hideItem" style="display:none;"> <s:iterator value="itemList" status="obj"> <s:if test="#obj.index>#itemCount"> <s:if test="depth == 1"> <s:if test="#childCount > 0"></div><s:set name="childCount" value="0"/></s:if> <s:if test="hasChild"> <div class="label" style="cursor:pointer;"> <span class="arrow_r"></span> <s:set name="childCount" value="1"/> </s:if> <s:else> <div class="label"> <span class="arrow"></span> </s:else> <s:if test="book.entityTypes.indexOf('PDF')>=0"> <a href="/readPDFBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>"><s:property value="title"/></a> </s:if> <s:elseif test="book.entityTypes.indexOf('TXT')>=0"> <a href="/readTxtBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>"><s:property value="title"/></a> </s:elseif> <s:if test="!hasChild"></div></s:if> </s:if> <s:else> <div class="chapter" style="display: none" > <s:if test="book.entityTypes.indexOf('PDF')>=0"> <a href='/readPDFBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>'><s:property value="title"/></a> </s:if> <s:elseif test="book.entityTypes.indexOf('TXT')>=0"> <a href='/readTxtBook.action?objectId=<s:property value="book.id"/>&pageNum=<s:property value="page"/>&activityId=<s:property value='activityId'/>'><s:property value="title"/></a> </s:elseif> </div> </s:else> </s:if> </s:iterator> <s:if test="itemList!=null && #firstCount>10 && itemList.size()>0 && itemList[itemList.size()-1].depth>1"></div></s:if> </div> </div> <s:if test="#firstCount>10"> <div class="unfold_pick_up"><div id="showBtn" style="cursor:pointer" class="text"><!--??? ??-->??? ??</div></div> </s:if> <!--???--> <div class="yd_title_catalog"><a href="javascript:getMyComment(0);">??????</a> <s:if test="#session.currentLoggedUser != null">| <a href="javascript:getMyComment(1);">??????</a></s:if> </div><div class="clear"></div> <div id="bookCommentList"></div> <!--???--> <div id="pageListDiv"></div> <!--???end--> <%-- <s:if test="#session.currentLoggedUser != null"> --%> <s:if test="@com.chineseall.core.GlobalConstants@configs.get('is.open.comment') != \"1\""> <div class="yd_title_catalog">??????</div> <textarea id="bookCommentId" class="add_comment" placeholder="????????????????????1000????"></textarea> <input type="hidden" name="csrfToken" id="csrfToken" value="<s:property value="@com.digitallib.util.CsrfUtil@generateAndReturnCsrfToken('csrfToken')"/>"> <div class="add_comment_submit">????????<b id="wordCount">1000</b>???<a href="javascript:addComment();">?? ??</a></div> </s:if> </div> <%-- </s:if> --%> <!--right--> <div class="ts_r_relate fright"> <s:if test="publiserBookList != null && publiserBookList.size()>0"> <div class="title">???????????</div> <s:iterator value="publiserBookList" status="obj"> <div class="list<s:if test="#obj.index()==1"> border_bottomnone</s:if>"> <a href="/bookDetail.action?objectId=<s:property value="id"/>"> <img src='<s:property value="bookCover"/>' width="150" height="200"></a> <div class="text"><a href="/bookDetail.action?objectId=<s:property value="id"/>"><s:property value="name"/></a><br><s:property value="publisher"/><br> <s:property value="author"/></div> </div> </s:iterator> </s:if> <!--??????????--> <s:if test="authorBookList != null && authorBookList.size()>0"> <div class="title">??????????</div> <s:iterator value="authorBookList" status="obj"> <div class="list<s:if test="#obj.index()==1"> border_bottomnone</s:if>"> <a href="/bookDetail.action?objectId=<s:property value="id"/>"><img src='<s:property value="bookCover"/>' width="150" height="200"></a> <div class="text"><a href="/bookDetail.action?objectId=<s:property value="id"/>"><s:property value="name"/> </a><br><s:property value="publisher"/><br> <s:property value="author"/> </div> </div> </s:iterator> </s:if> <!--??????--> <s:if test="newBookList != null && newBookList.size()>0"> <div class="title">??????</div> <s:iterator value="newBookList" status="obj"> <div class="list<s:if test="#obj.index()==2"> border_bottomnone</s:if>"> <a href="/bookDetail.action?objectId=<s:property value="id"/>"> <s:if test="bookCover == null"> <img src='/uploadFiles/subjectHeadImage/nopic.jpg' width="150" height="200"> </s:if><s:else> <img src='<s:property value="bookCover"/>' onerror="this.src='/uploadFiles/subjectHeadImage/nopic.jpg'" width="150" height="200"> </s:else> </a> <div class="text"><a href="/bookDetail.action?objectId=<s:property value="id"/>"><s:property value="name"/></a><br><s:property value="publisher"/><br> <s:property value="author"/></div> </div> </s:iterator> </s:if> </div> </div> <div class="clear"></div> <s:action name="foot" executeResult="true"> <s:param name="sid" value="sid"></s:param> </s:action> </body> <div id="dialog" title="??????"></div> <script type="text/javascript"> var currentPage = 1; var self = 0; function getComment(page) { currentPage = page; webDwr.getBookComment(${book.id},currentPage,self,function(info){ var jsonArr = eval("(" + info + ")"); var comments = ""; if(jsonArr["comments"].length==0){ comments += "<div class=\"nocomment\">??????</div>"; document.getElementById("bookCommentList").innerHTML = comments; }else{ for(var i=0;i<jsonArr["comments"].length;i++) { comments += "<div class=\"ts_comment\"><div class=\"commentleft\"><a>"; comments += "<img alt=\""+jsonArr["comments"][i].user+"\" src=\""+jsonArr["comments"][i].portraint+"\" width=\"150\" height=\"200\"></a>"; comments += "</div><div class=\"book_reviewright\"><div class=\"name\">"; comments += "<span>"+jsonArr["comments"][i].user+"</span><span>"+jsonArr["comments"][i].pubTime+"</span>"; comments += "</div><div class=\"content\">"+jsonArr["comments"][i].content+"</div></div></div>"; } document.getElementById("bookCommentList").innerHTML = comments; if(jsonArr["totalItem"]>0){ comments = "<div class=\"page_turn\" style=\"width:100%; text-align:center;\">"; if(page>1) { comments += "<div class=\"list leftline\"><a href=\"javascript:getComment(1);\">???</a></div>"; comments += "<div class=\"list\"><a class=\"leftarrow\" href=\"javascript:getComment("+(page-1)+");\"></a></div>"; } else { comments += "<div class=\"list leftline\"><a href=\"javascript:getComment(1);\">???</a></div> <div class=\"list\"><a hidefocus=\"hidefocus\" class=\"leftarrow\"></a></div>"; } var totalPage = jsonArr["totalPages"]; var start = page-3; if(start<=0) start = 1; var end = start + 3; if(end>totalPage) end = totalPage; for(var i=start;i<end+1;i++) { comments += "<div class=\"list\"><a "; if(page==i){ comments += "style=\"background-color:#f6f4f4;border-left:1px solid #f6f5f4;\""; }else{ comments += "href=\"javascript:getComment("+i+");\""; } comments += " pageno=\""+i+"\">"+i+"</a></div>"; } if(page<totalPage) { comments += "<div class=\"list\"><a class=\"rightarrow\" href=\"javascript:getComment("+(page+1)+");\"></a></div>"; comments += "<div class=\"list\"><a href=\"javascript:getComment("+totalPage+");\">???</a></div>"; } else { comments += "<div class=\"list\"><a class=\"rightarrow\" href=\"javascript:getComment("+(totalPage)+");\" ></a></div><div class=\"list\"><a href=\"javascript:getComment("+totalPage+");\">???</a></div>"; } comments += "</div>"; document.getElementById("pageListDiv").innerHTML = comments; } } }); } getComment(1); function getMyComment(s) { self = s; /* if(s==0) { document.getElementById("commentType_0").className = "now"; document.getElementById("commentType_1").className = ""; } else { document.getElementById("commentType_1").className = "now"; document.getElementById("commentType_0").className = ""; } */ getComment(currentPage); } function addComment() { var content = document.getElementById("bookCommentId").value; if(content=="") { popAlert("???","????????????"); return; } if(content.length>1000) { popAlert("???","????????????1000?????????????????"+content.length+"???"); return; } var csrfToken = $("#csrfToken").val(); webDwr.addBookComment(${book.id},content,csrfToken,function(info){ if(info != "") { if(info=="noLogged") { <s:if test="@com.chineseall.core.servlet.InitParameters@ssoSwitch!=null && @com.chineseall.core.servlet.InitParameters@ssoSwitch.entityValue.equals('OPEN')"> window.location="<s:property value="@com.chineseall.core.servlet.InitParameters@ssoLoginLink.entityValue"/>"; </s:if> <s:else> window.location="/vaata.action"; </s:else> return; } else if(info == "error") { alert("???????¤???!"); return; } getComment(currentPage); document.getElementById("bookCommentId").value = ""; $("#csrfToken").val(info); } }); } function borrowBook() { webDwr.borrowBook(${book.id}, '<s:property value="activityId"/>',function(info){ if(info != "") { if(info=="noLogged") { <s:if test="@com.chineseall.core.servlet.InitParameters@ssoSwitch!=null && @com.chineseall.core.servlet.InitParameters@ssoSwitch.entityValue.equals('OPEN')"> window.location="<s:property value="@com.chineseall.core.servlet.InitParameters@ssoLoginLink.entityValue"/>"; </s:if> <s:else> window.location="/vaata.action"; </s:else> return; } else if(info=="borrowed") { popAlert("???","???????????????????????"); return; } else if(info=="overed") { popAlert("???","???????????????????????????????????????"); return; } else if(info=="quantity") { popAlert("???","????????????????????????????????????????"); return; } else if(info=="pdf") { var obj = document.getElementById("borrowLink"); obj.innerHTML = "<a href='/readPDFBook.action?objectId=${book.id }'>???????</a>"; popMessage("???","?????????????????"); } else if(info=="txt") { var obj = document.getElementById("borrowLink"); obj.innerHTML = "<a href='/readTxtBook.action?objectId=${book.id }'>???????</a>"; popMessage("???","?????????????????"); } } }); } function recommendBook() { webDwr.recommendBook(${book.id},function(info){ if(info != "") { if(info=="noLogged") { <s:if test="@com.chineseall.core.servlet.InitParameters@ssoSwitch!=null && @com.chineseall.core.servlet.InitParameters@ssoSwitch.entityValue.equals('OPEN')"> window.location="<s:property value="@com.chineseall.core.servlet.InitParameters@ssoLoginLink.entityValue"/>"; </s:if> <s:else> window.location="/vaata.action"; </s:else> return; } if (info.indexOf('??????')>=0){ popMessage("???",info); }else{ popAlert("???",info); } } }); } function setBookScore(score) { webDwr.addBookScore(${book.id},score,function(info){ if(info != "") { if(info=="noLogged") { <s:if test="@com.chineseall.core.servlet.InitParameters@ssoSwitch!=null && @com.chineseall.core.servlet.InitParameters@ssoSwitch.entityValue.equals('OPEN')"> window.location="<s:property value="@com.chineseall.core.servlet.InitParameters@ssoLoginLink.entityValue"/>"; </s:if> <s:else> window.location="/vaata.action"; </s:else> return; } else if(info=="scored") { popAlert("???","?????????"); return; } else { var c = Number(info); if(c<1) { document.getElementById("star0").setAttribute('src','/pages/${templatePath}/images/dafen_g.png'); }else{ document.getElementById("star0").setAttribute('src','/pages/${templatePath}/images/dafen.png'); } if(c<20) { document.getElementById("star10").setAttribute('src','/pages/${templatePath}/images/dafen_g.png'); }else{ document.getElementById("star10").setAttribute('src','/pages/${templatePath}/images/dafen.png'); } if(c<30) { document.getElementById("star20").setAttribute('src','/pages/${templatePath}/images/dafen_g.png'); }else{ document.getElementById("star20").setAttribute('src','/pages/${templatePath}/images/dafen.png'); } if(c<40) { document.getElementById("star30").setAttribute('src','/pages/${templatePath}/images/dafen_g.png'); }else{ document.getElementById("star30").setAttribute('src','/pages/${templatePath}/images/dafen.png'); } if(c<50) { document.getElementById("star40").setAttribute('src','/pages/${templatePath}/images/dafen_g.png'); }else{ document.getElementById("star40").setAttribute('src','/pages/${templatePath}/images/dafen.png'); } } } }); } webDwr.addBookVisited(<s:property value="book.id"/>); $(document).ready(function() { $("span.arrow_r").click(function(){ if($(this).parent().hasClass("label")){ $($(this).parent()).removeClass("label") $($(this).parent()).addClass("label_down"); $($(this).parent().children()).show(); $(this).removeClass("arrow_r"); $(this).addClass("arrow"); }else{ $($(this).parent()).removeClass("label_down") $($(this).parent()).addClass("label"); $($(this).parent().children()).hide(); $(this).removeClass("arrow"); $(this).addClass("arrow_r"); $(this).show(); $(this).next().show(); } }); $("#starCountDiv img").bind({ mousemove:function(){ for(var i = 0;i<$(this).index()+1;i++){ $($("#starCountDiv img")[i]).attr("src","/pages/${templatePath}/images/dafen.png"); } }, mouseout:function(){ for(var i = 0;i<$(this).index()+1;i++){ $($("#starCountDiv img")[i]).attr("src","/pages/${templatePath}/images/dafen_g.png"); } } }); $('#bookCommentId').bind('input propertychange', function() { var count = $("#bookCommentId").val(); $("#wordCount").html(1000-count.length); }); $("#showBtn").click(function(){ if($("#hideItem").is(":hidden")){ $("#hideItem").show(); $("#showBtn").text("??? ??"); }else{ $("#hideItem").hide(); $("#showBtn").text("??? ?? "); } }); }); function collectionBook() { webDwr.collectionBook(${book.id},function(info){ if(info != "") { if(info=="noLogged") { <s:if test="@com.chineseall.core.servlet.InitParameters@ssoSwitch!=null && @com.chineseall.core.servlet.InitParameters@ssoSwitch.entityValue.equals('OPEN')"> window.location="<s:property value="@com.chineseall.core.servlet.InitParameters@ssoLoginLink.entityValue"/>"; </s:if> <s:else> window.location="/vaata.action"; </s:else> return; } if (info.indexOf('??????')>=0){ popMessage("???",info); }else{ popAlert("???",info); } } }); } </script> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de