国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

615 行
30KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>修改采集节点</title>
  6. <link href="css/base.css" rel="stylesheet" type="text/css" />
  7. <script language="javascript" src="../static/js/jquery.js"></script>
  8. <script language="javascript" src="js/main.js"></script>
  9. <script language="javascript" type="text/javascript" src="js/co.js"></script>
  10. <style type="text/css">
  11. .STYLE2 {color: #666666}
  12. tr{display:compact}
  13. /*chrome调整*/
  14. @media screen and (-webkit-min-device-pixel-ratio:0) {
  15. tr{display:table-row}
  16. }
  17. </style>
  18. </head>
  19. <body>
  20. <div class="bodytitle" style="width:98%">
  21. <div class="bodytitleleft"></div>
  22. <div class="bodytitletxt" style="padding-left:10px;"><b>修改采集节点</b></div>
  23. <div style='float:right;padding-right:6px;padding-top:3px'>
  24. <input type="button" name="aaa" value="开始采集" class="coolbg np" style="width:80px;height:20px;" onclick="location.href='co_gather_start.php?nid=<?php echo $nid; ?>';" />
  25. <input type="button" name="bbb" value="返回节点管理页" class="coolbg np" style="width:110px;height:20px;" onclick="location.href='co_main.php';" />
  26. </div>
  27. </div>
  28. <form name="form1" method="post" action="co_edit.php">
  29. <input type='hidden' name='nid' value='<?php echo $nid; ?>' />
  30. <input type='hidden' name='channelid' value='<?php echo $channelid; ?>' />
  31. <input type='hidden' name='dopost' value='saveandtest' />
  32. <input type='hidden' name='donext' value='text' />
  33. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1">
  34. <tr>
  35. <td colspan="2">
  36. <table height="24" border="0" cellpadding="0" cellspacing="0">
  37. <tr>
  38. <td width="84" align="center" background="images/itemnote1.gif">网址索引</td>
  39. <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="showItem2()"><u>内容配置</u></a></td>
  40. </tr>
  41. </table>
  42. </td>
  43. </tr>
  44. </table>
  45. <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="head2" style="display:none">
  46. <tr>
  47. <td colspan="2">
  48. <table height="24" border="0" cellpadding="0" cellspacing="0">
  49. <tr>
  50. <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="showItem1()"><u>网址索引</u></a></td>
  51. <td width="84" align="center" background="images/itemnote1.gif">内容配置</td>
  52. </tr>
  53. </table>
  54. </td>
  55. </tr>
  56. </table>
  57. <table width="98%" border="0" id="needset" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center">
  58. <tr>
  59. <td background="images/tbg.gif" bgcolor="#F2F6E5">
  60. <table width="400" border="0" cellspacing="0" cellpadding="0">
  61. <tr class="top" onClick="showHide('sitem');" style="cursor:pointer">
  62. <td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td>
  63. <td width="374">节点基本信息<a name="d1"></a></td>
  64. </tr>
  65. </table>
  66. </td>
  67. </tr>
  68. <tr id="sitem">
  69. <td bgcolor="#FFFFFF">
  70. <table width="100%" border="0">
  71. <tr>
  72. <td width="18%" height="24">节点名称:</td>
  73. <td width="32%">
  74. <input name="notename" type="text" id="notename" value="<?php echo $notename; ?>" style="width:250px" />
  75. </td>
  76. <td width="18%">目标页面编码:</td>
  77. <td width="32%">
  78. <input type="radio" name="sourcelang" id='language1' class="np" value="gb2312"<?php if($noteinfo->GetAtt('sourcelang')=='gb2312') echo " checked='1'"; ?>/>
  79. GB2312
  80. <input type="radio" name="sourcelang" id='language2' class="np" value="utf-8"<?php if($noteinfo->GetAtt('sourcelang')=='utf-8') echo " checked='1'"; ?>/>
  81. UTF8
  82. <input type="radio" name="sourcelang" id='language3' class="np" value="big5"<?php if($noteinfo->GetAtt('sourcelang')=='big5') echo " checked='1'"; ?>/>
  83. BIG5
  84. </td>
  85. </tr>
  86. <tr>
  87. <td height="24">区域匹配模式:</td>
  88. <td>
  89. <input type="radio" class="np" name="macthtype" value="regex"<?php if($noteinfo->GetAtt('macthtype')=='regex') echo " checked='1'"; ?>/>
  90. 正则表达式
  91. <input name="macthtype" class="np" type="radio" value="string"<?php if($noteinfo->GetAtt('macthtype')=='string') echo " checked='1'"; ?>/>
  92. 字符串
  93. </td>
  94. <td>内容导入顺序:</td>
  95. <td>
  96. <input type="radio" name="cosort" id="cosort1" value="asc" class='np'<?php if($noteinfo->GetAtt('cosort')=='asc') echo " checked='1'"; ?>/>
  97. 与目标站一致
  98. <input type="radio" name="cosort" id="cosort2" class='np' value="desc"<?php if($noteinfo->GetAtt('cosort')=='desc') echo " checked='1'"; ?>/>
  99. 与目标站相反
  100. </td>
  101. </tr>
  102. <tr>
  103. <td height="24" colspan="4" bgcolor="#F9FCEF"><img src="images/file_tt.gif" width="7" height="8" />以下选项仅在开启防盗链模式才需设定,如果目标网站没有防盗链功能请不要开启,否则会降低采集速度。</td>
  104. </tr>
  105. <tr>
  106. <td height="24">防盗链模式:</td>
  107. <td>
  108. <input name="isref" type="radio" class="np" value="no"<?php if($noteinfo->GetAtt('isref')=='no') echo " checked='1'"; ?>/>
  109. 不开启
  110. <input name="isref" type="radio" class="np" value="yes"<?php if($noteinfo->GetAtt('isref')=='yes') echo " checked='1'"; ?>/>
  111. 开启
  112. </td>
  113. <td>资源下载超时时间:</td>
  114. <td>
  115. <input name="exptime" type="text" id="exptime" value="<?php echo $noteinfo->GetAtt('exptime'); ?>" size="3" />秒
  116. </td>
  117. </tr>
  118. <tr>
  119. <td height="24">引用网址:</td>
  120. <td colspan="3">
  121. <input name="refurl" type="text" id="refurl" value="<?php echo $noteinfo->GetAtt('refurl'); ?>" size="30" style='width:250px' />
  122. (一般为目标网站其中一个文章页的网址)
  123. </td>
  124. </tr>
  125. </table>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td background="images/tbg.gif" bgcolor="#F2F6E5">
  130. <table width="400" border="0" cellspacing="0" cellpadding="0">
  131. <tr class="top" onClick="showHide('slist');" style="cursor:pointer">
  132. <td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td>
  133. <td width="374">列表网址获取规则</td>
  134. </tr>
  135. </table></td>
  136. </tr>
  137. <tr id="slist">
  138. <td bgcolor="#FFFFFF">
  139. <table width="100%" border="0">
  140. <tr>
  141. <td width="18%" height="24">来源属性:</td>
  142. <td>
  143. <input type="radio" name="sourcetype" id="source1" class='np' onclick="selSourceSet()" value="batch"<?php if($listrule->GetAtt('sourcetype')=='batch') echo " checked='checked'"; ?>/>
  144. 批量生成列表网址
  145. <input type="radio" name="sourcetype" id="source2" class='np' onclick="selSourceSet()" value="hand"<?php if($listrule->GetAtt('sourcetype')=='hand') echo " checked='checked'"; ?>/>
  146. 手工指定列表网址
  147. <input type="radio" name="sourcetype" id="source3" class='np' onclick="selSourceSet()" value="rss"<?php if($listrule->GetAtt('sourcetype')=='rss') echo " checked='checked'"; ?>/>
  148. 从RSS中获取
  149. </td>
  150. </tr>
  151. <tr bgcolor="#F9FCEF" id="rssset" style="display:none">
  152. <td height="24">RSS网址:</td>
  153. <td>
  154. <input type="text" name="rssurl" id="rssurl" style="width:350px" value="<?php echo $listrule->GetAtt('rssurl'); ?>" />
  155. <input type="button" name="btv2" id="btv2" value="测试" onclick="testRss()" />
  156. </td>
  157. </tr>
  158. <tr bgcolor="#F9FCEF" id="batchset">
  159. <td height="77">批量生成地址设置:</td>
  160. <td>
  161. <table width="90%">
  162. <tr>
  163. <td width="100%" colspan="2">
  164. 匹配网址:
  165. <input type="text" name="regxurl" id="regxurl" style="width:350px" value="<?php echo $listrule->GetAtt('regxurl'); ?>" />
  166. <input type="button" name="btv1" id="btv1" value="测试" onclick="testRegx()" />
  167. </td>
  168. </tr>
  169. <tr>
  170. <td colspan="2">
  171. <span class="STYLE2">(如:http://www.dedecms.com/html/test/list_(*).html,如果不能匹配所有网址,可以在手工指定网址的地方输入要追加的网址) </span> </td>
  172. </tr>
  173. <tr>
  174. <td colspan="2">
  175. (*)从
  176. <input type="text" name="startid" id="startid" style="width:30px" value="<?php echo $listrule->GetAtt('startid'); ?>" />
  177. <input type="text" name="endid" id="endid" style="width:30px" value="<?php echo $listrule->GetAtt('endid'); ?>" />
  178. (填写页码或规律递增数字)&nbsp;
  179. 每页递增:
  180. <input type="text" name="addv" id="addv" style="width:30px" value="<?php echo $listrule->GetAtt('addv'); ?>" />
  181. <input type="checkbox" name="usemore" id="usemore" class="np" value="1" onClick="testMore()"<?php if($usemore==1) echo " checked='1' "; ?>/>
  182. 启用多栏目通配(#)
  183. </td>
  184. </tr>
  185. </table>
  186. </td>
  187. </tr>
  188. <tr id='handset' style='<?php if($usemore==1) echo 'display:none'; ?>'>
  189. <td height="171">手工指定网址:<br />
  190. <span class="STYLE2">在指定了通配规则后有些不能匹配的网址也可以在这里指定。</span><br /></td>
  191. <td>
  192. <textarea name="addurls" id="addurls" cols="45" rows="5" style="width:80%;height:160px"><?php echo $addurls->GetInnerText(); ?></textarea>
  193. </td>
  194. </tr>
  195. <tr id='usemoretr' style='<?php if($usemore==0) echo 'display:none'; ?>'>
  196. <td height="171">多栏目通配规则:<br />
  197. <span class="STYLE2">
  198. 如果目标网站使用单一模板,可以在匹配网址中用"(#)"表示近似网址的差异,然后在通配规则中设定集合,并且可以指定导出栏目。
  199. </span>
  200. <br />
  201. </td>
  202. <td>
  203. <textarea name="batchrule" id="batchrule" cols="45" rows="5" style="width:80%;height:160px"><?php echo (is_object($batchrule) ? trim($batchrule->GetInnerText()) : ''); ?></textarea>
  204. <br /><span style='color:#666666'>示例格式:[(#)=>labs/list_3; (*)=>1-25; typeid=>7] 匹配网址:http://www.aaa.com/(#)_(*).html</span>
  205. </td>
  206. </tr>
  207. </table>
  208. </td>
  209. </tr>
  210. <tr>
  211. <td background="images/tbg.gif" bgcolor="#F2F6E5">
  212. <table width="400" border="0" cellspacing="0" cellpadding="0">
  213. <tr class="top" onClick="showHide('arturl');" style="cursor:pointer">
  214. <td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td>
  215. <td width="374">文章网址匹配规则</td>
  216. </tr>
  217. </table></td>
  218. </tr>
  219. <tr id="arturl">
  220. <td height="76" valign="top" width="100%" bgcolor="#FFFFFF">
  221. <table width="100%">
  222. <!-- //使用与正则匹配链接模式不大稳定,也不适合初级用户,暂时作为保留项 -->
  223. <tr style='display:none'>
  224. <td width="18%">内容网址匹配模式:</td>
  225. <td width="82%">
  226. <input name="urlrule" type="radio" class="np" id="urlrule1" value="area" onclick="selUrlRuleSet()" <?php if($listrule->GetAtt('urlrule')=='area') echo " checked='1'"; ?>/>
  227. 指定包含有文章网址的区域(可以获取区域的网址、标题、图片等信息)
  228. <input type="radio" name="urlrule" id="urlrule2" value="regx" onclick="selUrlRuleSet()" class="np"<?php if($listrule->GetAtt('urlrule')=='regx') echo " checked='1'"; ?>/>
  229. 指定网址正则表达式(仅能获得网址信息)
  230. </td>
  231. </tr>
  232. <!--tr id="regxruletr" style="<?php if($listrule->GetAtt('urlrule')=='area') echo "display:none"; ?>"-->
  233. <tr id="regxruletr" style="display:none">
  234. <td height="84">网址的正则表达式:</td>
  235. <td>
  236. <textarea name="regxrule" id="regxrule" cols="45" rows="5" style="width:80%;height:60px"><?php echo $regxrule->GetInnerText(); ?></textarea>
  237. </td>
  238. </tr>
  239. <tr id="arearuletr">
  240. <td height="84" width="18%">包含有文章网址的区域设置:</td>
  241. <td width="82%">
  242. <table width="90%">
  243. <tr>
  244. <td width="22%" align="center">区域开始的HTML:</td>
  245. <td width="78%">
  246. <textarea name="areastart" id="areastart" cols="45" rows="5" style="width:80%;height:60px"><?php echo $areastart->GetInnerText(); ?></textarea>
  247. </td>
  248. </tr>
  249. <tr>
  250. <td align="center">区域结束的HTML:</td>
  251. <td>
  252. <textarea name="areaend" id="areaend" cols="45" rows="5" style="width:80%;height:60px"><?php echo $areaend->GetInnerText(); ?></textarea>
  253. </td>
  254. </tr>
  255. <tr>
  256. <td align="center">如果链接中含有图片:</td>
  257. <td>
  258. <input name="listpic" type="radio" class='np' id="listpic1" value="0"<?php if($listrule->GetAtt('listpic')=='0') echo " checked='1'"; ?>/>
  259. 不处理
  260. <input type="radio" name="listpic" id="listpic2" class='np' value="1"<?php if($listrule->GetAtt('listpic')=='1') echo " checked='1'"; ?>/>
  261. 采集为缩略图
  262. </td>
  263. </tr>
  264. <tr>
  265. <td rowspan="2" align="center">对区域网址进行再次筛选:<br />
  266. (使用正则表达式)</td>
  267. <td>必须包含:
  268. <input type="text" name="musthas" id="musthas" style="width:280px" value="<?php echo $listrule->GetAtt('musthas'); ?>" />
  269. (优先级高于后者)
  270. </td>
  271. </tr>
  272. <tr>
  273. <td>不能包含:
  274. <input type="text" name="nothas" id="nothas" style="width:280px" value="<?php echo $listrule->GetAtt('nothas'); ?>" />
  275. </td>
  276. </tr>
  277. </table>
  278. </td>
  279. </tr>
  280. </table>
  281. </td>
  282. </tr>
  283. <tr>
  284. <td height="94" align="center" bgcolor="#FFFFFF">&nbsp;
  285. <script language='javascript'>
  286. selSourceSet();
  287. </script>
  288. &nbsp;
  289. <input type="submit" name="b12" value="保存并测试" class="coolbg np" style="width:120px" />
  290. <input type="submit" name="b" value="仅保存" onclick="form.donext.value='save';" class="coolbg np" style="width:80px" /></td>
  291. </tr>
  292. </table>
  293. <table width="98%" border="0" id="adset" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" align="center" style="display:none">
  294. <tr>
  295. <td background="images/tbg.gif" bgcolor="#F2F6E5">
  296. <table width="400" border="0" cellspacing="0" cellpadding="0">
  297. <tr class="top" onClick="showHide('sart');" style="cursor:pointer">
  298. <td width="26" align="center"><img src="images/file_tt.gif" width="7" height="8"></td>
  299. <td width="374">网页内容获取规则</td>
  300. </tr>
  301. </table>
  302. </td>
  303. </tr>
  304. <tr id="sart">
  305. <td height="113" valign="top" bgcolor="#FFFFFF">
  306. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  307. <tr id='achelp' style="display:none">
  308. <td height="60" colspan="3">1、匹配规则:在匹配区域规则中,规则一般为“<font color="#FF0000">起始无重复HTML</font><span class="STYLE1">[内容]</span><font color="#FF0000">结尾无重复HTML</font>”(普通匹配,非正则)。<br/>
  309. 2、字段值:如果指定的字段没有指定区域匹配规则,用这个值作为默认值。<br />
  310. 3、过滤规则:如果有多个规则,用<br /><font color='#6B7360'>
  311. {dede:trim replace=&quot;&quot;}规则一{/dede:trim}<br />
  312. {dede:trim replace=&quot;&quot;}规则二{/dede:trim}<br />
  313. ...</font>表示,如果要替换成指定的值,在 replace=&quot;&quot;里设置即可
  314. </td>
  315. </tr>
  316. <tr>
  317. <td height="35"><a href="#" onclick="showHide('achelp')"><img src="images/help.gif" width="16" height="16" /></a>预览网址:</td>
  318. <td>
  319. <input type="text" name="previewurl" id="previewurl" style="width:90%" value="<?php echo $previewurl; ?>" />
  320. </td>
  321. <td>&nbsp;</td>
  322. </tr>
  323. <tr>
  324. <td width="18%" height="60">内容分页导航所在的区域匹配规则:<br/></td>
  325. <td><textarea name="sppage" rows="3" id="sppage" style="width:90%"><?php echo trim($sppage->GetInnerText()); ?></textarea></td>
  326. <td width="37%">
  327. <input name="sptype" type="radio" value="full" class="np"<?php if($sppage->GetAtt('sptype')=='full') echo " checked='1'"; ?>/>
  328. 全部列出的分页列表<br/>
  329. <input type="radio" name="sptype" class="np" value="next"<?php if($sppage->GetAtt('sptype')=='next') echo " checked='1'"; ?>/>
  330. 上下页形式或不完整的分页列表<br />
  331. <input type="radio" name="sptype" class="np" value="diyrule"<?php if($sppage->GetAtt('sptype')=='diyrule') echo " checked='1'"; ?>/>
  332. 分页列表规则 开始:
  333. <input name="srul" type="text" value="1" size="4" />
  334. 结束:
  335. <input name="erul" type="text" value="5" size="4" /></td>
  336. </tr>
  337. <tr>
  338. <td height="35" colspan="3" bgcolor="#FBFCE2" id="dyrule">如果设定分页列表规则.可采用地址规则(正则),其中{p}是递增变量,从1开始每次增加1,例如:{path}{file}_{p}{ext}<br />
  339. <strong>规则说明:{path}</strong>地址+目录 <strong>{file}</strong>文件 <strong>{ext}</strong>文件扩展名 <strong>{p}</strong>分页列表数</td>
  340. </tr>
  341. <tr>
  342. <td height="24" colspan="3" bgcolor="#F9FCEF">
  343. &nbsp;<strong>以下为固定的采集项目:</strong>(项目点击可展开/隐藏,内容摘要、关键字、缩略图系统会用正则进行自动匹配)
  344. </td>
  345. </tr>
  346. </table>
  347. <table width="100%" border="0" cellspacing="0" cellpadding="2">
  348. <tr>
  349. <td width="50%" valign="top">
  350. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  351. <tr>
  352. <td height="24">
  353. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  354. <tr>
  355. <td width="18%" height="80">关键字过滤内容:</td>
  356. <td height="20" colspan="2">
  357. <textarea name="keywordtrim" rows="4" id="keywordtrim" style="width:90%"><?php echo $notes['keywordtrim']; ?></textarea>
  358. </td>
  359. </tr>
  360. </table></td>
  361. </tr>
  362. </table>
  363. </td>
  364. <td valign="top">
  365. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  366. <tr>
  367. <td height="24">
  368. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  369. <tr>
  370. <td width="18%" height="80">摘要过滤内容:</td>
  371. <td height="20" colspan="2">
  372. <textarea name="descriptiontrim" rows="4" id="descriptiontrim" style="width:90%"><?php echo $notes['descriptiontrim']; ?></textarea>
  373. </td>
  374. </tr>
  375. </table></td>
  376. </tr>
  377. </table>
  378. </td>
  379. </tr>
  380. <tr>
  381. <td width="50%" valign="top">
  382. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  383. <tr bgcolor="#F9FCEF">
  384. <td height="24" class="adline">&nbsp;<a href="#" onclick="showHide('ttitle')"><b><u>文章标题</u></b></a></td>
  385. </tr>
  386. <tr>
  387. <td height="24" id="ttitle">
  388. <input type='checkbox' name='fields[]' checked='1' value='title' style='display:none' />
  389. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  390. <tr>
  391. <td width="18%" height="80">匹配规则:</td>
  392. <td height="20" colspan="2">
  393. <textarea name="match_title" rows="4" id="match_title" style="width:90%"><?php echo $notes['title']['match']; ?></textarea>
  394. </td>
  395. </tr>
  396. <tr>
  397. <td height="63">过滤规则:</td>
  398. <td width="53%" height="63">
  399. <textarea name="trim_title" cols="20" rows="3" id="trim_title" style="width:90%"><?php echo $notes['title']['trim']; ?></textarea>
  400. </td>
  401. <td height="63">
  402. <input type="button" name="button" id="button" value="常用规则" onclick="selTrim('trim_title')" />
  403. </td>
  404. </tr>
  405. </table></td>
  406. </tr>
  407. </table>
  408. </td>
  409. <td valign="top">
  410. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  411. <tr bgcolor="#F9FCEF">
  412. <td height="24" class="adline">&nbsp;<a href="#" onclick="showHide('twriter')"><b><u>文章作者</u></b></a> </td>
  413. </tr>
  414. <tr id="twriter">
  415. <td height="24">
  416. <input type='checkbox' name='fields[]' checked='1' value='writer' style='display:none' />
  417. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  418. <tr>
  419. <td width="18%" height="80">匹配规则:</td>
  420. <td height="20" colspan="2">
  421. <textarea name="match_writer" rows="4" id="match_writer" style="width:90%"><?php echo $notes['writer']['match']; ?></textarea>
  422. </td>
  423. </tr>
  424. <tr>
  425. <td height="63">过滤规则:</td>
  426. <td width="53%" height="63">
  427. <textarea name="trim_writer" cols="20" rows="3" id="trim_writer" style="width:90%"><?php echo $notes['writer']['trim']; ?></textarea>
  428. </td>
  429. <td width="29%" height="63">
  430. <input type="button" name="button2" id="button2" value="常用规则" onclick="selTrim('trim_writer')" />
  431. </td>
  432. </tr>
  433. </table></td>
  434. </tr>
  435. </table>
  436. </td>
  437. </tr>
  438. <tr>
  439. <td valign="top">
  440. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  441. <tr bgcolor="#F9FCEF">
  442. <td height="24" class="adline">&nbsp;<a href="#" onclick="showHide('tsource')"><b><u>文章来源</u></b></a> </td>
  443. </tr>
  444. <tr id="tsource">
  445. <td height="24">
  446. <input type='checkbox' name='fields[]' checked='1' value='source' style='display:none' />
  447. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  448. <tr>
  449. <td width="18%" height="80">匹配规则:</td>
  450. <td height="20" colspan="2">
  451. <textarea name="match_source" rows="4" id="match_source" style="width:90%"><?php echo $notes['source']['match']; ?></textarea>
  452. </td>
  453. </tr>
  454. <tr>
  455. <td height="63">过滤规则:</td>
  456. <td width="53%" height="63">
  457. <textarea name="trim_source" cols="20" rows="3" id="trim_source" style="width:90%"><?php echo $notes['source']['trim']; ?></textarea>
  458. </td>
  459. <td height="63">
  460. <input type="button" name="button4" id="button4" value="常用规则" onclick="selTrim('trim_source')" />
  461. </td>
  462. </tr>
  463. </table>
  464. </td>
  465. </tr>
  466. </table>
  467. </td>
  468. <td valign="top">
  469. <table width="98%" border="0" cellspacing="0" cellpadding="0">
  470. <tr bgcolor="#F9FCEF">
  471. <td height="24" class="adline">&nbsp;<a href="#" onclick="showHide('tpubdate')"><b><u>发布时间</u></b></a> </td>
  472. </tr>
  473. <tr id="tpubdate">
  474. <td height="24">
  475. <input type='checkbox' name='fields[]' checked='1' value='pubdate' style='display:none' />
  476. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  477. <tr>
  478. <td width="18%" height="80">匹配规则:</td>
  479. <td height="20" colspan="2">
  480. <textarea name="match_pubdate" rows="4" id="match_pubdate" style="width:90%"><?php echo $notes['pubdate']['match']; ?></textarea>
  481. </td>
  482. </tr>
  483. <tr>
  484. <td height="63">过滤规则:</td>
  485. <td width="53%" height="63">
  486. <textarea name="trim_pubdate" cols="20" rows="3" id="trim_pubdate" style="width:90%"><?php echo $notes['pubdate']['trim']; ?></textarea>
  487. </td>
  488. <td width="29%" height="63">
  489. <input type="button" name="button3" id="button3" value="常用规则" onclick="selTrim('trim_pubdate')" />
  490. </td>
  491. </tr>
  492. </table></td>
  493. </tr>
  494. </table>
  495. </td>
  496. </tr>
  497. </table>
  498. <!-- 固定项目结束,下面为自动项目 -->
  499. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  500. <tr>
  501. <td width="55%" height="24" colspan="3" bgcolor="#FBFCE2">
  502. &nbsp;<strong>以下是针对模型设置的采集项目:</strong>
  503. </td>
  504. </tr>
  505. </table>
  506. <?php
  507. $row = $dsql->GetOne("Select * From `#@__channeltype` where id='{$channelid}' ");
  508. $dtp = new DedeTagParse();
  509. $dtp->SetNameSpace('field','<','>');
  510. $dtp->LoadString($row['fieldset']);
  511. foreach($dtp->CTags as $ctag)
  512. {
  513. //采集禁用的字段
  514. $notsend = $ctag->GetAtt('notsend');
  515. if($notsend==1) continue;
  516. $fieldtype = $ctag->GetAtt('type');
  517. $tname = $ctag->GetTagName();
  518. $iname = $ctag->GetAtt('itemname');
  519. if(isset($notes[$tname]['item']))
  520. {
  521. $tvalue = $notes[$tname]['item']->GetAtt('value');
  522. $tisunit = $notes[$tname]['item']->GetAtt('isunit');
  523. $tisdown = $notes[$tname]['item']->GetAtt('isdown');
  524. $tmatch = $notes[$tname]['match'];
  525. $ttrim = $notes[$tname]['trim'];
  526. $tfunction = $notes[$tname]['function'];
  527. }else {
  528. $tvalue = $tisunit = $tisdown = $tmatch = $ttrim = $tfunction = '';
  529. }
  530. ?>
  531. <input type='checkbox' name='fields[]' checked='1' value='<?php echo $tname; ?>' style='display:none' />
  532. <table width="99%" border="0" cellspacing="0" cellpadding="0" class='autotb' style="margin-top:2px">
  533. <tr bgcolor="#EBEFD1">
  534. <td width="18%" height="24" bgcolor="#F0F7D9" class="adline">
  535. &nbsp;<a href="#" onclick="showHide('t<?php echo $tname; ?>')"><b><u><?php echo $iname; ?></u></b></a>
  536. </td>
  537. <td width="12%" bgcolor="#F0F7D9" class="adline">&nbsp;</td>
  538. <td width="10%" bgcolor="#F0F7D9" class="adline"><strong>字段值:</strong></td>
  539. <td bgcolor="#F0F7D9" class="adline">
  540. <input name="value_<?php echo $tname; ?>" type="text" value="<?php echo $tvalue; ?>" size="25" style="width:250px" />
  541. </td>
  542. </tr>
  543. <tr id="t<?php echo $tname; ?>">
  544. <td height="24" colspan="4">
  545. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  546. <tr>
  547. <td width="16%" height="80">匹配规则:</td>
  548. <td height="20">
  549. <textarea name="match_<?php echo $tname; ?>" rows="4" style="width:90%"><?php echo $tmatch; ?></textarea>
  550. </td>
  551. <td height="20">
  552. <input name="isunit_<?php echo $tname; ?>" type="checkbox" value="1" class="np"<?php if($tisunit=='1') echo " checked='checked'"; ?>/>
  553. 分页内容字段(规则中只允许单一的该类型字段)<br/>
  554. <input name="isdown_<?php echo $tname; ?>" type="checkbox" value="1" class="np"<?php if($tisdown=='1') echo " checked='checked'"; ?>/>
  555. 下载字段里的多媒体资源
  556. </td>
  557. </tr>
  558. <tr>
  559. <td height="63">过滤规则:</td>
  560. <td height="63">
  561. <textarea name="trim_<?php echo $tname; ?>" cols="20" rows="3" id="trim_<?php echo $tname; ?>" style="width:90%"><?php echo $ttrim; ?></textarea>
  562. </td>
  563. <td height="63">
  564. <input type="button" name="button<?php echo $tname; ?>" id="button<?php echo $tname; ?>" value="常用规则" onclick="selTrim('trim_<?php echo $tname; ?>')" />
  565. </td>
  566. </tr>
  567. <tr>
  568. <td width="18%" height="60">自定义处理接口:</td>
  569. <td width="52%" height="20">
  570. <textarea name="function_<?php echo $tname; ?>" cols="20" rows="3" style="width:90%"><?php echo $tfunction; ?></textarea>
  571. </td>
  572. <td width="30%" height="20">
  573. <?php
  574. if($fieldtype=='htmltext' || $fieldtype=='img')
  575. {
  576. ?>
  577. 函数或程序的变量<br />
  578. @body 表示原始网页 @litpic 缩略图<br />
  579. @me 表示当前标记值和最终结果
  580. <?php
  581. }
  582. ?>
  583. </td>
  584. </tr>
  585. </table>
  586. </td>
  587. </tr>
  588. </table>
  589. <?php } ?>
  590. </td>
  591. </tr>
  592. <tr>
  593. <td height="52" align="center" bgcolor="#FFFFFF">
  594. <input type="submit" name="b13" value="仅保存" onclick="form.donext.value='save';" class="coolbg np" style="width:80px" />
  595. &nbsp;
  596. <input type="submit" name="b12" value="保存并测试" class="coolbg np" style="width:120px" />
  597. </td>
  598. </tr>
  599. </table>
  600. </form>
  601. </body>
  602. </html>