国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

163 lines
4.0KB

  1. <!--
  2. function ShowAddCatalog(){
  3. $Obj('addCatalog').style.display='block';
  4. }
  5. function CloseAddCatalog(){
  6. $Obj('addCatalog').style.display='none';
  7. }
  8. function CloseEditCatalog(){
  9. $Obj('editCatalog').style.display='none';
  10. }
  11. function DelCatalog(cid){
  12. if(window.confirm("你确实要删除这个分类么?"))
  13. {
  14. location.href='story_catalog.php?catid='+cid+'&action=del';
  15. }
  16. }
  17. function DelStory(bid){
  18. if(window.confirm("你确实要删除这本图书么?")){
  19. location.href='story_do.php?bid='+bid+'&action=delbook';
  20. }
  21. }
  22. function DelStoryContent(cid){
  23. if(window.confirm("删除内容后章节的其它内容排列序号不会发生变化,\r\n这可能导致管理混乱,你确实要删除这篇内容么?")){
  24. location.href='story_do.php?cid='+cid+'&action=delcontent';
  25. }
  26. }
  27. function CloseLayer(layerid){
  28. $Obj(layerid).style.display='none';
  29. }
  30. //预览内容
  31. function PreViewCt(cid,booktype){
  32. if(booktype==0){
  33. window.open("../book/story.php?id="+cid);
  34. }else{
  35. window.open("../book/show-photo.php?id="+cid);
  36. }
  37. }
  38. //编辑栏目
  39. function EditCatalog(cid){
  40. $Obj('editCatalog').style.display='block';
  41. var myajax = new DedeAjax($Obj('editCatalogBody'),false,true,"","","请稍候,正在载入...");
  42. myajax.SendGet2('story_catalog.php?catid='+cid+'&action=editload');
  43. DedeXHTTP = null;
  44. }
  45. //图书章节,反向选择
  46. function ReSelChapter(){
  47. var ems = document.getElementsByName('ids[]');
  48. for(var i=0;i<ems.length;i++){
  49. if(!ems[i].checked) ems[i].checked = true;
  50. else ems[i].checked = false;
  51. }
  52. }
  53. //删除整章节图书内容
  54. function DelStoryChapter(cid){
  55. if(window.confirm("删除章节会删除章节下的所有内容,你确实要删除么?")){
  56. location.href='story_do.php?cid='+cid+'&action=delChapter';
  57. }
  58. }
  59. //增加图书的检查
  60. function checkSubmitAdd()
  61. {
  62. if(document.form1.catid.value==0){
  63. alert("请选择连载内容的栏目!");
  64. document.form1.bookname.focus();
  65. return false;
  66. }
  67. if(document.form1.bookname.value==""){
  68. alert("连载图书名称不能为空!");
  69. document.form1.bookname.focus();
  70. return false;
  71. }
  72. }
  73. //增加小说内容的检查
  74. function checkSubmitAddCt()
  75. {
  76. if(document.form1.title.value==0){
  77. alert("文章标题不能为空!");
  78. document.form1.title.focus();
  79. return false;
  80. }
  81. if(document.form1.chapterid.selectedIndex==-1 && document.form1.chapternew.value==''){
  82. alert("文章所属章节和新章节名称不能同时为空!");
  83. return false;
  84. }
  85. }
  86. //增加漫画内容的检查
  87. function checkSubmitAddPhoto()
  88. {
  89. if(document.form1.chapterid.selectedIndex==-1 && document.form1.chapternew.value==''){
  90. alert("文章所属章节和新章节名称不能同时为空!");
  91. return false;
  92. }
  93. document.form1.photonum.value = endNum;
  94. }
  95. //显示选择框与新增章节选项
  96. function ShowHideSelChapter(selfield,newfield)
  97. {
  98. if(document.form1.addchapter.checked){
  99. $Obj(selfield).style.display = 'none';
  100. $Obj(newfield).style.display = 'block';
  101. }else{
  102. $Obj(selfield).style.display = 'block';
  103. $Obj(newfield).style.display = 'none';
  104. }
  105. }
  106. function selAll()
  107. {
  108. for(i=0;i<document.form2.ids.length;i++)
  109. {
  110. if(!document.form2.ids[i].checked){
  111. document.form2.ids[i].checked=true;
  112. }
  113. }
  114. }
  115. function noSelAll()
  116. {
  117. for(i=0;i<document.form2.ids.length;i++)
  118. {
  119. if(document.form2.ids[i].checked){
  120. document.form2.ids[i].checked=false;
  121. }
  122. }
  123. }
  124. //获得选中文件的文件名
  125. function getCheckboxItem()
  126. {
  127. var allSel="";
  128. if(document.form2.ids.value) return document.form2.ids.value;
  129. for(i=0;i<document.form2.ids.length;i++)
  130. {
  131. if(document.form2.ids[i].checked){
  132. allSel += (allSel=='' ? document.form2.ids[i].value : ","+document.form2.ids[i].value);
  133. }
  134. }
  135. return allSel;
  136. }
  137. //删除多选
  138. function DelAllBooks()
  139. {
  140. if(window.confirm("你确实要删除这些图书么?")){
  141. var selbook = getCheckboxItem();
  142. location.href='story_do.php?bid='+selbook+'&action=delbook';
  143. }
  144. }
  145. -->