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

198 lines
8.3KB

  1. {dede:config.pagesize value="20"/}
  2. <!DOCTYPE html
  3. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  7. <title>采集节点管理</title>
  8. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  9. <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  10. <script language="javascript" src="js/context_menu.js"></script>
  11. <script language="javascript" src="js/ieemu.js"></script>
  12. <script language="javascript">
  13. if (moz) {
  14. extendEventObject();
  15. extendElementModel();
  16. emulateAttachEvent();
  17. }
  18. //编辑节点
  19. function EditNote(nid) {
  20. if (nid == "") nid = getOneItem();
  21. if (nid == "") { alert("请选择一个节点!"); return; }
  22. location.href = "co_edit.php?nid=" + nid;
  23. }
  24. //编辑节点配置
  25. function EditNoteText(nid) {
  26. if (nid == "") nid = getOneItem();
  27. if (nid == "") { alert("请选择一个节点!"); return; }
  28. location.href = "co_edit_text.php?nid=" + nid;
  29. }
  30. //清空节点
  31. function ClearNote(nid) {
  32. if (nid == "") nid = getOneItem();
  33. if (nid == "") { alert("请选择一个节点!"); return; }
  34. location.href = "co_do.php?dopost=clear&nid=" + nid;
  35. }
  36. //删除节点
  37. function DelNote(nid) {
  38. if (nid == "") nid = getOneItem();
  39. if (nid == "") { alert("请选择一个节点!"); return; }
  40. if (window.confirm('你确定要删除这个节点吗?')) { location.href = "co_do.php?dopost=delete&nid=" + nid; }
  41. }
  42. //查看已下载的内容
  43. function ViewDown(nid) {
  44. if (nid == "") nid = getOneItem();
  45. location.href = "co_url.php?nid=" + nid;
  46. }
  47. //测试规则
  48. function TestRule(nid) {
  49. if (nid == "") nid = getOneItem();
  50. if (nid == "") { alert("请选择一个节点!"); return; }
  51. location.href = "co_test_rule.php?nid=" + nid;
  52. }
  53. //导出采集
  54. function ExportDown(nid) {
  55. if (nid == "") nid = getOneItem();
  56. if (nid == "") { alert("请选择一个节点!"); return; }
  57. location.href = "co_export.php?nid=" + nid;;
  58. }
  59. //导入规则
  60. function GetRule() {
  61. location.href = "co_get_corule.php";
  62. }
  63. //导出规则
  64. function ExportRule(nid) {
  65. if (nid == "") nid = getOneItem();
  66. if (nid == "") { alert("请选择一个节点!"); return; }
  67. location.href = "co_export_corule.php?nid=" + nid;
  68. }
  69. //采集所选节点
  70. function GatherSel(nid) {
  71. if (nid == "") nid = getOneItem();
  72. if (nid == "") { alert("请选择一个节点!"); return; }
  73. location.href = "co_gather_start.php?nid=" + nid;
  74. }
  75. //复制所选节点
  76. function CopyNote(nid) {
  77. if (nid == "") nid = getOneItem();
  78. if (nid == "") { alert("请选择一个节点!"); return; }
  79. location.href = "co_do.php?dopost=copy&nid=" + nid;
  80. }
  81. //上下文菜单
  82. function ShowMenu(evt, obj, nid) {
  83. var eobj, popupoptions
  84. popupoptions = [
  85. new ContextItem("测试当前节点", function () { TestRule(nid); }),
  86. new ContextItem("采集当前节点", function () { GatherSel(nid); }),
  87. new ContextSeperator(),
  88. new ContextItem("更改当前节点", function () { EditNote(nid); }),
  89. new ContextItem("更改节点配置", function () { EditNoteText(nid); }),
  90. new ContextSeperator(),
  91. new ContextItem("查看采集内容", function () { ViewDown(nid); }),
  92. new ContextItem("导出采集", function () { ExportDown(nid); }),
  93. new ContextSeperator(),
  94. new ContextItem("清空已下载信息", function () { ClearNote(nid); }),
  95. new ContextItem("删除当前节点", function () { DelNote(nid); }),
  96. new ContextSeperator(),
  97. new ContextItem("复制当前节点", function () { CopyNote(nid); }),
  98. new ContextSeperator(),
  99. new ContextItem("导出配置规则", function () { ExportRule(nid); }),
  100. new ContextItem("关闭菜单(<u>C</u>)", function () { })
  101. ]
  102. ContextMenu.display(evt, popupoptions)
  103. }
  104. //获得选中其中一个的id
  105. function getOneItem() {
  106. var allSel = "";
  107. if (document.form1.nids.value) return document.form1.nids.value;
  108. for (i = 0; i < document.form1.nids.length; i++) {
  109. if (document.form1.nids[i].checked) {
  110. allSel = document.form1.nids[i].value;
  111. break;
  112. }
  113. }
  114. return allSel;
  115. }
  116. </script>
  117. <link rel="stylesheet" href="../static/css/bootstrap.min.css">
  118. <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  119. <link href="css/base.css" rel="stylesheet" type="text/css">
  120. </head>
  121. <body background='images/allbg.gif' leftmargin='8' topmargin='8' onLoad="ContextMenu.intializeContextMenu()">
  122. <table width="98%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center" class="table maintable table-bordered mt-3">
  123. <tr>
  124. <td height="20" colspan="7" background='images/tbg.gif'>
  125. <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-borderless">
  126. <tr>
  127. <td width="20%" height="18" style="padding-left:10px;"><strong>采集节点管理:</strong></td>
  128. <td width="80%" align="right">
  129. <input type="button" name="ba" value="添加新节点" onClick="location='co_add.php?action=select';"
  130. class="coolbg np" style="width:100px" />
  131. </td>
  132. </tr>
  133. </table>
  134. </td>
  135. </tr>
  136. <tr align="center" height="26" bgcolor="#FBFCE2">
  137. <td width="8%">选择</td>
  138. <td width="32%">节点名称</td>
  139. <td width="18%">针对规则</td>
  140. <td width="10%">最后采集日期</td>
  141. <td width="10%">加入日期</td>
  142. <td width="10%">编码</td>
  143. <td width="10%">网址数</td>
  144. </tr>
  145. <form name="form1">
  146. {dede:datalist}
  147. <tr bgcolor="#FFFFFF" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';"
  148. onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22"
  149. oncontextmenu="ShowMenu(event,this,{dede:field.nid /});">
  150. <td><input type='checkbox' name='nids' value='{dede:field.nid /}' class='np'></td>
  151. <td><a href='co_url.php?nid={dede:field.nid /}'>{dede:field.notename /}</a></td>
  152. <td>{dede:field.typename /}</td>
  153. <td>{dede:field.cotime function='GetDatePage(@me)' /}</td>
  154. <td>{dede:field.uptime function='GetDatePage(@me)' /}</td>
  155. <td>{dede:field.sourcelang /}</td>
  156. <td>{dede:field.nid function='TjUrlNum(@me)' /}</td>
  157. </tr>
  158. {/dede:datalist}
  159. </form>
  160. <tr bgcolor="#ffffff">
  161. <td height="24" colspan="7">
  162. <table width="90%" border="0" cellspacing="0" cellpadding="0" class="table-borderless">
  163. <tr>
  164. <td>
  165. &nbsp;
  166. <a href="#" onClick="location='co_add.php?action=select';" class='coolbg np'>增加新节点</a>
  167. <a href="javascript:GetRule();" class='coolbg np'>导入配置</a>
  168. <a href="javascript:ExportRule('');" class='coolbg np'>导出配置</a>
  169. |
  170. <a href="javascript:GatherSel('');" class='coolbg np' style='color:red'>采集</a>
  171. <a href="javascript:ExportDown('');" class='coolbg np'>导出数据</a>
  172. |
  173. <a href="javascript:EditNote('');" class='coolbg np'>更改</a>
  174. <a href="javascript:EditNoteText('');" class='coolbg np'>更改配置</a>
  175. <a href="javascript:TestRule('');" class='coolbg np'>测试</a>
  176. |
  177. <a href="javascript:ViewDown('');" class='coolbg np'>查看已下载</a>
  178. |
  179. <a href="javascript:CopyNote('');" class='coolbg np'>复制</a>
  180. <a href="javascript:ClearNote('');" class='coolbg np'>清空</a>
  181. |
  182. <a href="javascript:DelNote('');" class='coolbg np'>删除</a>
  183. </td>
  184. </tr>
  185. </table>
  186. </td>
  187. </tr>
  188. <tr bgcolor="#F9FCEF">
  189. <td height="24" colspan="7" align="center">
  190. {dede:pagelist size='5' /}
  191. </td>
  192. </tr>
  193. </table>
  194. </body>
  195. </html>