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

712 lines
35KB

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