国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

242 lines
9.8KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="<?php echo $cfg_soft_lang; ?>">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>文档管理</title>
  7. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  9. <link rel="stylesheet" href="../static/web/css/admin.css">
  10. <script src="../static/web/js/jquery.min.js"></script>
  11. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  12. <script src="../static/web/js/webajax.js"></script>
  13. <script src="js/ieemu.js"></script>
  14. <script src="js/context_menu.js"></script>
  15. <script src="js/main.js"></script>
  16. <script>
  17. if (moz) {
  18. extendEventObject();
  19. extendElementModel();
  20. emulateAttachEvent();
  21. }
  22. function viewArc(aid) {
  23. if (aid == 0) aid = getOneItem();
  24. window.open("archives_do.php?aid=" + aid + "&dopost=viewArchives");
  25. }
  26. function editArc(aid) {
  27. if (aid == 0) aid = getOneItem();
  28. location = "archives_do.php?aid=" + aid + "&dopost=editArchives";
  29. }
  30. function checkArc(aid) {
  31. var qstr = getCheckboxItem();
  32. if (aid == 0) aid = getOneItem();
  33. location = "archives_do.php?aid=" + aid + "&dopost=checkArchives&qstr=" + qstr;
  34. }
  35. function updateArc(aid) {
  36. var qstr = getCheckboxItem();
  37. if (aid == 0) aid = getOneItem();
  38. location = "archives_do.php?aid=" + aid + "&dopost=makeArchives&qstr=" + qstr;
  39. }
  40. function moveArc(aid) {
  41. var qstr = getCheckboxItem();
  42. if (aid == 0) aid = getOneItem();
  43. location = "archives_do.php?aid=" + aid + "&dopost=moveArchives&qstr=" + qstr;
  44. }
  45. function delArc(aid) {
  46. var qstr = getCheckboxItem();
  47. if (qstr == '') {
  48. ShowMsg('必须选择一个或多个文档');
  49. return;
  50. }
  51. if (aid == 0) aid = getOneItem();
  52. location = "archives_do.php?qstr=" + qstr + "&aid=" + aid + "&dopost=delArchives";
  53. }
  54. function adArc(aid) {
  55. var qstr = getCheckboxItem();
  56. if (aid == 0) aid = getOneItem();
  57. location = "archives_do.php?aid=" + aid + "&dopost=commendArchives&qstr=" + qstr;
  58. }
  59. function moveArc(e, obj, cid) {
  60. var qstr = getCheckboxItem();
  61. if (qstr == '') {
  62. ShowMsg('必须选择一个或多个文档');
  63. return;
  64. }
  65. LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr=' + qstr + '&channelid=' + cid + '&rnd=' + Math.random(), 'moveArchives', '450px', '180px');
  66. ChangeFullDiv('show');
  67. }
  68. //上下文菜单
  69. function ShowMenu(evt, obj, aid, atitle) {
  70. var popupoptions
  71. popupoptions = [
  72. new ContextItem("浏览文档", function () { viewArc(aid); }),
  73. new ContextItem("编辑文档", function () { editArc(aid); }),
  74. new ContextSeperator(),
  75. new ContextItem("更新HTML", function () { updateArc(aid); }),
  76. new ContextItem("审核文档", function () { checkArc(aid); }),
  77. new ContextItem("推荐文档", function () { adArc(aid); }),
  78. new ContextItem("删除文档", function () { delArc(aid); }),
  79. new ContextSeperator(),
  80. new ContextItem("复制(C)", function () { copyToClipboard(atitle); }),
  81. new ContextItem("重载页面", function () { location.reload(); }),
  82. new ContextSeperator(),
  83. new ContextItem("全部选择", function () { selAll(); }),
  84. new ContextItem("取消选择", function () { noSelAll(); }),
  85. new ContextSeperator(),
  86. new ContextItem("关闭菜单", function () { })
  87. ]
  88. ContextMenu.display(evt, popupoptions);
  89. //location="catalog_main.php";
  90. }
  91. //获得选中文件的文件名
  92. function getCheckboxItem() {
  93. var allSel = "";
  94. if (document.form2.arcID.value) return document.form2.arcID.value;
  95. for (i = 0; i < document.form2.arcID.length; i++) {
  96. if (document.form2.arcID[i].checked) {
  97. if (allSel == "")
  98. allSel = document.form2.arcID[i].value;
  99. else
  100. allSel = allSel + "`" + document.form2.arcID[i].value;
  101. }
  102. }
  103. return allSel;
  104. }
  105. function getCheckboxItem2() {
  106. var allSel = "";
  107. if (document.form2.arcID.value) return document.form2.arcID.value;
  108. for (i = 0; i < document.form2.arcID.length; i++) {
  109. if (document.form2.arcID[i].checked) {
  110. if (allSel == "")
  111. allSel = document.form2.arcID[i].value;
  112. else
  113. allSel = allSel + "," + document.form2.arcID[i].value;
  114. }
  115. }
  116. return allSel;
  117. }
  118. //获得选中其中一个的id
  119. function getOneItem() {
  120. var allSel = "";
  121. if (document.form2.arcID.value) return document.form2.arcID.value;
  122. for (i = 0; i < document.form2.arcID.length; i++) {
  123. if (document.form2.arcID[i].checked) {
  124. allSel = document.form2.arcID[i].value;
  125. break;
  126. }
  127. }
  128. return allSel;
  129. }
  130. function selAll() {
  131. for (i = 0; i < document.form2.arcID.length; i++) {
  132. if (!document.form2.arcID[i].checked) {
  133. document.form2.arcID[i].checked = true;
  134. }
  135. }
  136. }
  137. function noSelAll() {
  138. for (i = 0; i < document.form2.arcID.length; i++) {
  139. if (document.form2.arcID[i].checked) {
  140. document.form2.arcID[i].checked = false;
  141. }
  142. }
  143. }
  144. </script>
  145. </head>
  146. <body onLoad="ContextMenu.intializeContextMenu()">
  147. <table width="98%" align="center" cellspacing="0" cellpadding="0" class="table maintable mt-3 mb-3">
  148. <tr>
  149. <td>
  150. <button type='button' class="btn btn-success btn-sm" onClick="location='catalog_do.php?channelid={dede:global.channelid/}&cid={dede:global.cid/}&dopost=addArchives';">添加文档</button>
  151. {dede:if $adminid==$mid }
  152. <button type='button' class="btn btn-success btn-sm" onClick="location='content_list.php?cid={dede:global.cid/}&mid=0';">全部文档</button>
  153. {else}
  154. <button type='button' class="btn btn-success btn-sm" onClick="location='content_list.php?cid={dede:global.cid/}&mid=<?php echo $cuserLogin->getUserID(); ?>';">我的文档</button>
  155. {/dede:if}
  156. <button type='button' class="btn btn-success btn-sm" onClick="location='catalog_main.php';">栏目管理</button>
  157. <button type='button' class="btn btn-success btn-sm" name='bb1' onClick="location='makehtml_list.php?cid={dede:global.cid/}';">更新列表</button>
  158. <button type='button' class="btn btn-success btn-sm" name='bb2' onClick="location='makehtml_archives.php?cid={dede:global.cid/}';">更新文档</button>
  159. <?php echo $CheckUserSend; ?>
  160. </td>
  161. </tr>
  162. </table>
  163. <form name='form3' action='content_sg_list.php' method='get'>
  164. <input type='hidden' name='dopost' value='listArchives'>
  165. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="mb-3" style="border:1px solid #dee2e6">
  166. <tr>
  167. <td height="36" bgcolor="#f8f8f8">
  168. <table cellpadding="0" cellspacing="0">
  169. <tr>
  170. <td width="180" align="center">
  171. <select name="cid" style="width:160px">
  172. <option value="0">选择分类</option>
  173. {dede:global.optionarr/}
  174. </select>
  175. </td>
  176. <td width="270"><input type="text" name="keyword" placeholder="请输入关键词" value="{dede:global.keyword/}" style="width:260px"></td>
  177. <td><button type="submit" class="btn btn-success btn-sm">搜索</button></td>
  178. </tr>
  179. </table>
  180. </td>
  181. </tr>
  182. </table>
  183. </form>
  184. <table width="98%" cellpadding="2" cellspacing="1" align="center" class="table maintable mb-3">
  185. <tr>
  186. <td height="26" colspan="9" background="../static/web/img/tbg.gif" style="padding-left:10px">{dede:global.positionname/}文档列表(文章标题处右键进行常用操作)</td>
  187. </tr>
  188. <form name="form2">
  189. <tr align="center" bgcolor="#F8FCF1" height="26">
  190. <td width="6%">ID</td>
  191. <td width="6%">选择</td>
  192. <td width="30%">文章标题</td>
  193. <td width="10%">更新时间</td>
  194. <td width="14%">类目</td>
  195. <td width="9%">点击</td>
  196. <td width="9%">权限</td>
  197. <td width="6%">发布人</td>
  198. <td width="10%">操作</td>
  199. </tr>
  200. {dede:datalist empty='<tr><td colspan="9"><center>暂无内容</center></td></tr>'}
  201. <tr height="26" align="center" onmousemove="javascript:this.bgColor='#F8FCF1';" onmouseout="javascript:this.bgColor='#ffffff';">
  202. <td>{dede:field.id/}</td>
  203. <td><input name="arcID" type="checkbox" id="arcID" value="{dede:field.aid/}" class="np"></td>
  204. <td align='left'>
  205. <a href='archives_do.php?aid={dede:field.aid/}&dopost=editArchives' oncontextmenu="ShowMenu(event,this,{dede:field.aid/},'{dede:field.title function=" str_replace('\'', '' , @me)" /}')">{dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/}</a>
  206. </td>
  207. <td>{dede:field.senddate function='GetDateMk(@me)'/}</td>
  208. <td>{dede:field.typename/}</td>
  209. <td>{dede:field.arcrank function="GetRankName(@me)"/}</td>
  210. <td>{dede:field.click/}</td>
  211. <td>{dede:field.mid function=GetMemberName(@me)/}</td>
  212. <td>
  213. <a href="javascript:editArc({dede:field.aid/})" class="btn btn-success btn-sm" title="编辑"><i class="fa fa-pencil-square-o"></i></a>
  214. <a href="javascript:viewArc({dede:field.aid/})" class="btn btn-success btn-sm" title="预览"><i class="fa fa-globe"></i></a>
  215. </td>
  216. </tr>
  217. {/dede:datalist}
  218. <tr>
  219. <td colspan="9" class="py-3" style="margin-left:10px">
  220. <a class="btn btn-success btn-sm" href="javascript:selAll()" class="coolbg">全选</a>
  221. <a class="btn btn-success btn-sm" href="javascript:noSelAll()" class="coolbg">取消</a>
  222. <a class="btn btn-success btn-sm" href="javascript:updateArc(0)" class="coolbg">更新</a>
  223. <a class="btn btn-success btn-sm" href="javascript:checkArc(0)" class="coolbg">审核</a>
  224. <a class="btn btn-success btn-sm" href="javascript:adArc(0)" class="coolbg">推荐</a>
  225. <a class="btn btn-success btn-sm" href="javascript:;" onClick="moveArc(event,this,<?php echo (empty($channelid) ? 0 : $channelid); ?>)" class="coolbg">移动</a>
  226. <a class="btn btn-success btn-sm" href="javascript:delArc(0)" class="coolbg">删除</a>
  227. <?php
  228. if(!empty($f)) {
  229. ?>
  230. <a href="javascript:ReturnValue()" class="btn btn-success btn-sm">把选定值加到列表</a>
  231. <?php
  232. }
  233. ?>
  234. </td>
  235. </tr>
  236. </form>
  237. <tr>
  238. <td height="36" bgcolor="#f8f8f8" colspan="9" align="center">{dede:pagelist listsize='6'/}</td>
  239. </tr>
  240. </table>
  241. </body>
  242. </html>