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

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