国内流行的内容管理系统(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.

241 lines
10.0KB

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