AddInfoClass.php 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. require("../data/dbcache/class.php");
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"cj");
  20. //显示无限级结点[增加结点时]
  21. function ShowClass_AddInfoClass($obclassid,$bclassid,$exp,$enews=0){
  22. global $empire,$dbtbpre;
  23. if(empty($bclassid))
  24. {
  25. $bclassid=0;
  26. $exp="|-";
  27. }
  28. else
  29. {$exp="&nbsp;&nbsp;".$exp;}
  30. $sql=$empire->query("select classid,classname,bclassid from {$dbtbpre}enewsinfoclass where bclassid='$bclassid' order by classid");
  31. $returnstr="";
  32. while($r=$empire->fetch($sql))
  33. {
  34. if($r[classid]==$obclassid)
  35. {$select=" selected";}
  36. else
  37. {$select="";}
  38. $returnstr.="<option value=".$r[classid].$select.">".$exp.$r[classname]."</option>";
  39. $returnstr.=ShowClass_AddInfoClass($obclassid,$r[classid],$exp,$enews);
  40. }
  41. return $returnstr;
  42. }
  43. $enews=ehtmlspecialchars($_GET['enews']);
  44. $r[newsclassid]=(int)$_GET['newsclassid'];
  45. /*
  46. if(empty($r[newsclassid])&&($enews=="AddInfoClass"||empty($enews)))
  47. {
  48. echo"<script>self.location.href='AddInfoC.php".$ecms_hashur['whehref']."';</script>";
  49. exit();
  50. }
  51. */
  52. if($_GET['from'])
  53. {
  54. $listclasslink="ListPageInfoClass.php";
  55. }
  56. else
  57. {
  58. $listclasslink="ListInfoClass.php";
  59. }
  60. $docopy=ehtmlspecialchars($_GET['docopy']);
  61. $url="采集&nbsp;>&nbsp;<a href=".$listclasslink.$ecms_hashur['whehref'].">管理节点</a>&nbsp;>&nbsp;增加节点";
  62. //初使化数据
  63. $r[startday]=date("Y-m-d");
  64. $r[endday]="2099-12-31";
  65. $r[num]=0;
  66. $r[renum]=2;
  67. $r[relistnum]=1;
  68. $r[insertnum]=10;
  69. $r[keynum]=0;
  70. $r[keeptime]=0;
  71. $r[smalltextlen]=200;
  72. $r[titlelen]=0;
  73. $r['getfirstspicw']=$public_r['spicwidth'];
  74. $r['getfirstspich']=$public_r['spicheight'];
  75. $r['repf']=',title,newstext,';
  76. $r['repadf']=',newstext,';
  77. $r['loadkeeptime']=0;
  78. $r['isnullf']=',newstext,';
  79. $pagetype0="";
  80. $pagetype1=" checked";
  81. //复制结点
  82. if($docopy)
  83. {
  84. $classid=(int)$_GET['classid'];
  85. $r=$empire->fetch1("select * from {$dbtbpre}enewsinfoclass where classid='$classid'");
  86. //采集节点
  87. if($r[newsclassid])
  88. {
  89. $ra=$empire->fetch1("select * from {$dbtbpre}ecms_infoclass_".$r[tbname]." where classid='$classid'");
  90. $r=TogTwoArray($r,$ra);
  91. }
  92. if(empty($r[pagetype]))
  93. {
  94. $pagetype0=" checked";
  95. $pagetype1="";
  96. }
  97. else
  98. {
  99. $pagetype0="";
  100. $pagetype1=" checked";
  101. }
  102. $url="采集&nbsp;>&nbsp;<a href=".$listclasslink.$ecms_hashur['whehref'].">管理节点</a>&nbsp;>&nbsp;复制节点:".$r[classname];
  103. $r[classname].="(1)";
  104. }
  105. //修改节点
  106. if($enews=="EditInfoClass")
  107. {
  108. $classid=(int)$_GET['classid'];
  109. $r=$empire->fetch1("select * from {$dbtbpre}enewsinfoclass where classid='$classid'");
  110. //采集节点
  111. if($r[newsclassid])
  112. {
  113. $ra=$empire->fetch1("select * from {$dbtbpre}ecms_infoclass_".$r[tbname]." where classid='$classid'");
  114. $r=TogTwoArray($r,$ra);
  115. }
  116. if(empty($r[pagetype]))
  117. {
  118. $pagetype0=" checked";
  119. $pagetype1="";
  120. }
  121. else
  122. {
  123. $pagetype0="";
  124. $pagetype1=" checked";
  125. }
  126. $url="采集&nbsp;>&nbsp;<a href=".$listclasslink.$ecms_hashur['whehref'].">管理节点</a>&nbsp;>&nbsp;修改节点";
  127. }
  128. //模型
  129. $modid=$class_r[$r[newsclassid]][modid];
  130. $modr=$empire->fetch1("select enter from {$dbtbpre}enewsmod where mid='$modid'");
  131. //栏目
  132. $options=ShowClass_AddClass("",$r[newsclassid],0,"|-",$class_r[$r[newsclassid]][modid],4);
  133. if($r[retitlewriter])
  134. {
  135. $retitlewriter=" checked";
  136. }
  137. if($r[copyimg])
  138. {
  139. $copyimg=" checked";
  140. }
  141. if($r[copyflash])
  142. {$copyflash=" checked";}
  143. //节点
  144. $infoclass=ShowClass_AddInfoClass($r[bclassid],0,"|-",0);
  145. //采集表单文件
  146. $cjfile="../data/html/cj".$class_r[$r[newsclassid]][modid].".php";
  147. ?>
  148. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  149. <html>
  150. <head>
  151. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  152. <title>增加节点</title>
  153. <link href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  154. <script>
  155. function AddRepAd(obj,val){
  156. var dh='';
  157. if(obj==1)
  158. {
  159. if(document.form1.pagerepad.value!='')
  160. {
  161. dh=',';
  162. }
  163. document.form1.pagerepad.value+=dh+val;
  164. }
  165. else
  166. {
  167. if(document.form1.repad.value!='')
  168. {
  169. dh=',';
  170. }
  171. document.form1.repad.value+=dh+val;
  172. }
  173. }
  174. </script>
  175. <script type="text/javascript" src="ecmseditor/js/jstime/WdatePicker.js"></script>
  176. </head>
  177. <body>
  178. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
  179. <tr>
  180. <td>位置:<?=$url?></td>
  181. </tr>
  182. </table>
  183. <form name="form1" method="post" action="ListInfoClass.php">
  184. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  185. <?=$ecms_hashur['form']?>
  186. <tr class="header">
  187. <td width="30%">基本信息</td>
  188. <td width="70%"><input type=hidden name=from value="<?=ehtmlspecialchars($_GET['from'])?>">
  189. <input name="enews" type="hidden" id="enews" value="<?=$enews?>"> <input name="add[classid]" type="hidden" id="add[classid]" value="<?=$classid?>">
  190. <input name="add[oldbclassid]" type="hidden" id="add[oldbclassid]" value="<?=$r[bclassid]?>">
  191. <input name="add[oldnewsclassid]" type="hidden" id="add[oldnewsclassid]" value="<?=$r[newsclassid]?>"></td>
  192. </tr>
  193. <tr>
  194. <td height="23" bgcolor="#FFFFFF">节点名称:</td>
  195. <td height="23" bgcolor="#FFFFFF"> <input name="add[classname]" type="text" id="add[classname]" value="<?=$r[classname]?>" size=50>
  196. <font color="#666666">(如:体育,娱乐等)</font></td>
  197. </tr>
  198. <tr>
  199. <td height="23" bgcolor="#FFFFFF">父节点:</td>
  200. <td height="23" bgcolor="#FFFFFF"> <select name="bclassid" id="bclassid">
  201. <option value="0">新建父节点</option>
  202. <?=$infoclass?>
  203. </select></td>
  204. </tr>
  205. <tr>
  206. <td height="23" valign="top" bgcolor="#FFFFFF">采集页面地址:<br>
  207. <font color="#666666">(一行为一个列表)<br>
  208. <br>
  209. <br>
  210. <input name="add[infourlispage]" type="checkbox" id="add[infourlispage]" value="1"<?=$r[infourlispage]?' checked':''?>>
  211. </font>采集页面为直接内容页</td>
  212. <td height="23" bgcolor="#FFFFFF"> <textarea name="add[infourl]" cols="72" rows="10" id="add[infourl]"><?=stripSlashes($r[infourl])?></textarea></td>
  213. </tr>
  214. <tr>
  215. <td height="23" valign="top" bgcolor="#FFFFFF">采集页面地址方式二:<br> <font color="#666666">(此方式,系统自动生成页面地址)</font></td>
  216. <td height="23" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
  217. <tr>
  218. <td>地址:
  219. <input name="add[infourl1]" type="text" id="add[infourl1]2" size="42">
  220. (分页变量用
  221. <input name="textfield" type="text" value="[page]" size="8">
  222. 替换)</td>
  223. </tr>
  224. <tr>
  225. <td>页码从
  226. <input name="add[urlstart]" type="text" id="add[urlstart]4" value="1" size="6">
  227. <input name="add[urlend]" type="text" id="add[urlend]3" value="1" size="6">
  228. 之间,间隔倍数
  229. <input name="add[urlbs]" type="text" id="add[urlbs]" value="1" size="6">
  230. <input name="add[urldx]" type="checkbox" id="add[urldx]" value="1">
  231. 倒序
  232. <input name="add[urlbl]" type="checkbox" id="add[urlbl]" value="1">
  233. 补零</td>
  234. </tr>
  235. <tr>
  236. <td><font color="#666666">(如:http://www.phome.net/index.php?page=[page])</font></td>
  237. </tr>
  238. </table></td>
  239. </tr>
  240. <tr>
  241. <td height="23" valign="top" bgcolor="#FFFFFF">内容页地址前缀:</td>
  242. <td height="23" bgcolor="#FFFFFF"> <input name="add[httpurl]" type="text" id="add[httpurl]" value="<?=$r[httpurl]?>" size="50">
  243. <br> <font color="#666666">(如地址前面没域名的话,系统会加上此前缀)</font></td>
  244. </tr>
  245. <tr>
  246. <td height="23" bgcolor="#FFFFFF">图片/FLASH地址前缀(内容):</td>
  247. <td height="23" bgcolor="#FFFFFF"> <input name="add[imgurl]" type="text" id="add[imgurl]" value="<?=$r[imgurl]?>" size="50">
  248. <font color="#666666">(图片地址为相对地址时使用)</font></td>
  249. </tr>
  250. <tr>
  251. <td height="23" bgcolor="#FFFFFF">入库栏目:</td>
  252. <td height="23" bgcolor="#FFFFFF"> <select name="newsclassid" id="newsclassid">
  253. <option value="0">选择栏目</option>
  254. <?=$options?>
  255. </select> <input type="button" name="Submit622232" value="管理栏目" onclick="window.open('ListClass.php<?=$ecms_hashur['whehref']?>');">
  256. <font color="#666666">(如本节点不是采集节点,请不选)</font></td>
  257. </tr>
  258. <tr>
  259. <td height="23" bgcolor="#FFFFFF">开始时间:</td>
  260. <td height="23" bgcolor="#FFFFFF"> <input name="add[startday]" type="text" id="add[startday]" value="<?=$r[startday]?>" size="15" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd'})">
  261. <font color="#666666">(格式:2007-11-01)</font></td>
  262. </tr>
  263. <tr>
  264. <td height="23" bgcolor="#FFFFFF">结束时间:</td>
  265. <td height="23" bgcolor="#FFFFFF"> <input name="add[endday]" type="text" id="add[endday]" value="<?=$r[endday]?>" size="15" class="Wdate" onClick="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd'})">
  266. <font color="#666666">(格式:2007-11-01)</font></td>
  267. </tr>
  268. <tr>
  269. <td height="23" valign="top" bgcolor="#FFFFFF">备注:</td>
  270. <td height="23" bgcolor="#FFFFFF"> <textarea name="add[bz]" cols="72" rows="8" id="add[bz]"><?=ehtmlspecialchars(stripSlashes($r[bz]))?></textarea></td>
  271. </tr>
  272. <tr class="header">
  273. <td height="23" colspan="2">选项</td>
  274. </tr>
  275. <tr>
  276. <td height="23" bgcolor="#FFFFFF">默认相关关键字:</td>
  277. <td height="23" bgcolor="#FFFFFF">截取标题前
  278. <input name="add[keynum]" type="text" id="add[keynum]" value="<?=$r[keynum]?>" size="6">
  279. 个字</td>
  280. </tr>
  281. <tr>
  282. <td height="23" bgcolor="#FFFFFF"> <p>采集记录数:</p></td>
  283. <td height="23" bgcolor="#FFFFFF">采集前
  284. <input name="add[num]" type="text" id="add[num]" value="<?=$r[num]?>" size="6">
  285. 条记录<font color="#666666">(&quot;0&quot;为不限,系统会从头采到页面尾)</font></td>
  286. </tr>
  287. <tr>
  288. <td height="23" bgcolor="#FFFFFF">远程保存图片到本地(内容):</td>
  289. <td height="23" bgcolor="#FFFFFF"> <input name="add[copyimg]" type="checkbox" id="add[copyimg]" value="1"<?=$copyimg?>>
  290. (入库时才会保存,
  291. <input name="add[mark]" type="checkbox" id="add[mark]" value="1"<?=$r[mark]==1?' checked':''?>>
  292. <a href="SetEnews.php<?=$ecms_hashur['whehref']?>" target="_blank">加水印</a>) </td>
  293. </tr>
  294. <tr>
  295. <td height="23" bgcolor="#FFFFFF">远程保存FLASH到本地(内容):</td>
  296. <td height="23" bgcolor="#FFFFFF"> <input name="add[copyflash]" type="checkbox" id="add[copyflash]" value="1"<?=$copyflash?>>
  297. (入库时才会保存) </td>
  298. </tr>
  299. <tr>
  300. <td height="23" bgcolor="#FFFFFF">标题图片设置:</td>
  301. <td height="23" bgcolor="#FFFFFF">取第
  302. <input name="add[getfirstpic]" type="text" id="add[getfirstpic]" value="<?=$r[getfirstpic]?>" size="3">
  303. 张图片为标题图片(
  304. <input name="add[getfirstspic]" type="checkbox" id="add[getfirstspic]" value="1"<?=$r[getfirstspic]==1?' checked':''?>>
  305. 生成缩略图:宽度
  306. <input name="add[getfirstspicw]" type="text" id="add[getfirstspicw]" value="<?=$r[getfirstspicw]?>" size="3">
  307. ×高度
  308. <input name="add[getfirstspich]" type="text" id="add[getfirstspich]" value="<?=$r[getfirstspich]?>" size="3">
  309. )</td>
  310. </tr>
  311. <tr>
  312. <td height="23" bgcolor="#FFFFFF">每组列表采集个数:</td>
  313. <td height="23" bgcolor="#FFFFFF">每组采集
  314. <input name="add[relistnum]" type="text" id="add[relistnum]" value="<?=$r[relistnum]?>" size="6">
  315. 个列表页<font color="#666666">(防止采集超时) </font></td>
  316. </tr>
  317. <tr>
  318. <td height="23" bgcolor="#FFFFFF">每组信息采集个数:</td>
  319. <td height="23" bgcolor="#FFFFFF">每组采集
  320. <input name="add[renum]" type="text" id="add[renum]" value="<?=$r[renum]?>" size="6">
  321. 个信息页<font color="#666666">(防止采集超时)</font></td>
  322. </tr>
  323. <tr>
  324. <td height="23" bgcolor="#FFFFFF">每组入库数:</td>
  325. <td height="23" bgcolor="#FFFFFF">每组入
  326. <input name="add[insertnum]" type="text" id="add[insertnum]" value="<?=$r[insertnum]?>" size="6">
  327. 条记录<font color="#666666">(防止入库超时) </font></td>
  328. </tr>
  329. <tr>
  330. <td height="23" bgcolor="#FFFFFF">每组采集时间间隔</td>
  331. <td height="23" bgcolor="#FFFFFF"> <input name="add[keeptime]" type="text" id="add[keeptime]" value="<?=$r[keeptime]?>" size="6">
  332. 秒 <font color="#666666">(0为连续采集)</font></td>
  333. </tr>
  334. <tr>
  335. <td height="23" bgcolor="#FFFFFF">每组入库时间间隔</td>
  336. <td height="23" bgcolor="#FFFFFF"><input name="add[loadkeeptime]" type="text" id="add[loadkeeptime]" value="<?=$r[loadkeeptime]?>" size="6">
  337. 秒 <font color="#666666">(0为连续入库)</font></td>
  338. </tr>
  339. <tr class="header">
  340. <td height="23" colspan="2">附加选项</td>
  341. </tr>
  342. <tr>
  343. <td height="23" bgcolor="#FFFFFF">页面编码转换</td>
  344. <td height="23" bgcolor="#FFFFFF"> <table width="100%" border="0" cellpadding="1" cellspacing="1">
  345. <?php
  346. $trueenpagecode="<input type='radio' name='add[enpagecode]' value='0'".($r[enpagecode]==0?' checked':'').">正常编码";
  347. if(empty($ecms_config['sets']['pagechar'])||$ecms_config['sets']['pagechar']=='gb2312')
  348. {
  349. ?>
  350. <tr>
  351. <td height="22">
  352. <?=$trueenpagecode?> </td>
  353. <td><input type="radio" name="add[enpagecode]" value="1"<?=$r[enpagecode]==1?' checked':''?>>
  354. UTF8-&gt;GB2312</td>
  355. <td> <input type="radio" name="add[enpagecode]" value="3"<?=$r[enpagecode]==3?' checked':''?>>
  356. BIG5-&gt;GB2312</td>
  357. <td><input type="radio" name="add[enpagecode]" value="5"<?=$r[enpagecode]==5?' checked':''?>>
  358. UNICODE-&gt;GB2312</td>
  359. </tr>
  360. <?php
  361. $trueenpagecode='';
  362. }
  363. if(empty($ecms_config['sets']['pagechar'])||$ecms_config['sets']['pagechar']=='big5')
  364. {
  365. ?>
  366. <tr>
  367. <td height="22">
  368. <?=$trueenpagecode?> </td>
  369. <td> <input type="radio" name="add[enpagecode]" value="2"<?=$r[enpagecode]==2?' checked':''?>>
  370. UTF8-&gt;BIG5</td>
  371. <td> <input type="radio" name="add[enpagecode]" value="4"<?=$r[enpagecode]==4?' checked':''?>>
  372. GB2312-&gt;BIG5</td>
  373. <td><input type="radio" name="add[enpagecode]" value="6"<?=$r[enpagecode]==6?' checked':''?>>
  374. UNICODE-&gt;BIG5</td>
  375. </tr>
  376. <?php
  377. $trueenpagecode='';
  378. }
  379. if($ecms_config['sets']['pagechar']=='utf-8')
  380. {
  381. ?>
  382. <tr>
  383. <td height="22">
  384. <?=$trueenpagecode?> </td>
  385. <td><input type="radio" name="add[enpagecode]" value="7"<?=$r[enpagecode]==7?' checked':''?>>
  386. GB2312-&gt;UTF8</td>
  387. <td><input type="radio" name="add[enpagecode]" value="8"<?=$r[enpagecode]==8?' checked':''?>>
  388. BIG5-&gt;UTF8</td>
  389. <td><input type="radio" name="add[enpagecode]" value="9"<?=$r[enpagecode]==9?' checked':''?>>
  390. UNICODE-&gt;UTF8</td>
  391. </tr>
  392. <?php
  393. }
  394. ?>
  395. </table></td>
  396. </tr>
  397. <tr>
  398. <td height="23" bgcolor="#FFFFFF">是否重复采集同一链接</td>
  399. <td height="23" bgcolor="#FFFFFF"><input name="add[recjtheurl]" type="checkbox" id="add[recjtheurl]" value="1"<?=$r[recjtheurl]==1?' checked':''?>>
  400. 重复采集<font color="#666666">(不选为不重复采集)</font></td>
  401. </tr>
  402. <tr>
  403. <td height="23" bgcolor="#FFFFFF"><p>是否隐藏已导入的信息</p></td>
  404. <td height="23" bgcolor="#FFFFFF"><input type="radio" name="add[hiddenload]" value="0"<?=$r[hiddenload]==0?' checked':''?>>
  405. <input type="radio" name="add[hiddenload]" value="1"<?=$r[hiddenload]==1?' checked':''?>>
  406. 否</td>
  407. </tr>
  408. <tr>
  409. <td height="23" bgcolor="#FFFFFF">采集后自动入库</td>
  410. <td height="23" bgcolor="#FFFFFF"><input name="add[justloadin]" type="checkbox" id="add[justloadin]" value="1"<?=$r[justloadin]==1?' checked':''?>>
  411. 是,
  412. <input name="add[justloadcheck]" type="checkbox" id="add[justloadcheck]" value="1"<?=$r[justloadcheck]==1?' checked':''?>>
  413. 直接审核<font color="#666666">(不推荐选择,因为可能入库超时)</font></td>
  414. </tr>
  415. <tr>
  416. <td height="23" bgcolor="#FFFFFF">&nbsp;</td>
  417. <td height="23" bgcolor="#FFFFFF"><input name="add[delloadinfo]" type="checkbox" id="add[delloadinfo]" value="1"<?=$r[delloadinfo]==1?' checked':''?>>
  418. 入库后自动删除已导入的信息记录</td>
  419. </tr>
  420. <tr>
  421. <td height="23" valign="top" bgcolor="#FFFFFF">整体页面过滤正则<br> <font color="#666666">格式:广告开始[!--pad--]广告结束</font></td>
  422. <td height="23" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
  423. <tr>
  424. <td> <textarea name="pagerepad" cols="60" rows="10" id="textarea"><?=ehtmlspecialchars(stripSlashes($r[pagerepad]))?></textarea> </td>
  425. <td valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  426. <tr>
  427. <td><a href="#ecms" onclick="AddRepAd(1,'<iframe[!--pad--]</iframe>,<IFRAME[!--pad--]</IFRAME>');">IFRAME</a></td>
  428. <td><a href="#ecms" onclick="AddRepAd(1,'<table[!--pad--]>,</table>,<TABLE[!--pad--]>,</TABLE>');">TABLE</a></td>
  429. <td><a href="#ecms" onclick="AddRepAd(1,'<form[!--pad--]</form>,<FORM[!--pad--]</FORM>');">FORM</a></td>
  430. </tr>
  431. <tr>
  432. <td><a href="#ecms" onclick="AddRepAd(1,'<object[!--pad--]</object>,<OBJECT[!--pad--]</OBJECT>');">OBJECT</a></td>
  433. <td><a href="#ecms" onclick="AddRepAd(1,'<tr[!--pad--]>,</tr>,<TR[!--pad--]>,</TR>');">TR</a></td>
  434. <td><a href="#ecms" onclick="AddRepAd(1,'<tbody[!--pad--]>,</tbody>,<TBODY[!--pad--]>,</TBODY>');">TBODY</a></td>
  435. </tr>
  436. <tr>
  437. <td><a href="#ecms" onclick="AddRepAd(1,'<script[!--pad--]</script>,<SCRIPT[!--pad--]</SCRIPT>');">SCRIPT</a></td>
  438. <td><a href="#ecms" onclick="AddRepAd(1,'<td[!--pad--]>,</td>,<TD[!--pad--]>,</TD>');">TD</a></td>
  439. <td>&nbsp;</td>
  440. </tr>
  441. <tr>
  442. <td><a href="#ecms" onclick="AddRepAd(1,'<style[!--pad--]</style>,<STYLE[!--pad--]</STYLE>');">STYLE</a></td>
  443. <td><a href="#ecms" onclick="AddRepAd(1,'<a[!--pad--]>,</a>,<A[!--pad--]>,</A>');">A</a></td>
  444. <td>&nbsp;</td>
  445. </tr>
  446. <tr>
  447. <td><a href="#ecms" onclick="AddRepAd(1,'<div[!--pad--]>,</div>,<DIV[!--pad--]>,</DIV>');">DIV</a></td>
  448. <td><a href="#ecms" onclick="AddRepAd(1,'<font[!--pad--]>,</font>,<FONT[!--pad--]>,</FONT>');">FONT</a></td>
  449. <td>&nbsp;</td>
  450. </tr>
  451. <tr>
  452. <td><a href="#ecms" onclick="AddRepAd(1,'<span[!--pad--]>,</span>,<SPAN[!--pad--]>,</SPAN>');">SPAN</a></td>
  453. <td><a href="#ecms" onclick="AddRepAd(1,'<img[!--pad--]>,<IMG[!--pad--]>');">IMG</a></td>
  454. <td>&nbsp;</td>
  455. </tr>
  456. </table></td>
  457. </tr>
  458. <tr>
  459. <td><font color="#666666">(多个请用&quot;,&quot;格开)</font></td>
  460. <td>&nbsp;</td>
  461. </tr>
  462. </table></td>
  463. </tr>
  464. <tr>
  465. <td height="23" rowspan="2" valign="top" bgcolor="#FFFFFF">整体页面替换</td>
  466. <td height="11" bgcolor="#FFFFFF">将
  467. <textarea name="add[oldpagerep]" cols="36" rows="10" id="add[oldpagerep]"><?=ehtmlspecialchars(stripSlashes($r[oldpagerep]))?></textarea>
  468. 替换成
  469. <textarea name="add[newpagerep]" cols="36" rows="10" id="textarea4"><?=ehtmlspecialchars(stripSlashes($r[newpagerep]))?></textarea> </td>
  470. </tr>
  471. <tr>
  472. <td height="11" bgcolor="#FFFFFF"><font color="#666666">(原字符多个请用&quot;,&quot;格开,如果是新字符是多个,可以用&quot;,&quot;格开,系统会对应替换)</font></td>
  473. </tr>
  474. <tr class="header">
  475. <td height="23" colspan="2">过滤选项</td>
  476. </tr>
  477. <tr>
  478. <td height="23" bgcolor="#FFFFFF">采集关键字(包含关键字才会采):</td>
  479. <td height="23" bgcolor="#FFFFFF"> <input name="add[keyboard]" type="text" id="add[keyboard]" value="<?=$r[keyboard]?>">
  480. <font color="#666666">(只针对标题。如不限制,请留空。多个请用&quot;,&quot;格开)</font></td>
  481. </tr>
  482. <tr>
  483. <td rowspan="2" valign="top" bgcolor="#FFFFFF">替换:<br>
  484. (针对标题与内容) </td>
  485. <td height="23" bgcolor="#FFFFFF">将
  486. <textarea name="add[oldword]" cols="36" rows="10" id="add[oldword]"><?=ehtmlspecialchars(stripSlashes($r[oldword]))?></textarea>
  487. 替换成
  488. <textarea name="add[newword]" cols="36" rows="10" id="add[newword]"><?=ehtmlspecialchars(stripSlashes($r[newword]))?></textarea> </td>
  489. </tr>
  490. <tr>
  491. <td height="23" bgcolor="#FFFFFF"><font color="#666666">(原字符多个请用&quot;,&quot;格开,如果是新字符是多个,可以用&quot;,&quot;格开,系统会对应替换)</font></td>
  492. </tr>
  493. <tr>
  494. <td valign="top" bgcolor="#FFFFFF">要替换的字段名</td>
  495. <td height="23" bgcolor="#FFFFFF"><input name="repf" type="text" id="repf" value="<?=substr($r[repf],1,-1)?>" size="60">
  496. <font color="#666666">(多个字段用半角逗号&quot;,&quot;格开)</font></td>
  497. </tr>
  498. <tr>
  499. <td height="23" valign="top" bgcolor="#FFFFFF"><strong>过滤广告正则:</strong><br>
  500. <font color="#666666">格式:广告开始[!--ad--]广告结束<br>
  501. (针对内容) </font></td>
  502. <td height="23" bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
  503. <tr>
  504. <td> <textarea name="repad" cols="60" rows="10" id="repad"><?=ehtmlspecialchars(stripSlashes($r[repad]))?></textarea> </td>
  505. <td valign="top"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
  506. <tr>
  507. <td><a href="#ecms" onclick="AddRepAd(0,'<iframe[!--ad--]</iframe>,<IFRAME[!--ad--]</IFRAME>');">IFRAME</a></td>
  508. <td><a href="#ecms" onclick="AddRepAd(0,'<table[!--ad--]>,</table>,<TABLE[!--ad--]>,</TABLE>');">TABLE</a></td>
  509. <td><a href="#ecms" onclick="AddRepAd(0,'<form[!--ad--]</form>,<FORM[!--ad--]</FORM>');">FORM</a></td>
  510. </tr>
  511. <tr>
  512. <td><a href="#ecms" onclick="AddRepAd(0,'<object[!--ad--]</object>,<OBJECT[!--ad--]</OBJECT>');">OBJECT</a></td>
  513. <td><a href="#ecms" onclick="AddRepAd(0,'<tr[!--ad--]>,</tr>,<TR[!--ad--]>,</TR>');">TR</a></td>
  514. <td><a href="#ecms" onclick="AddRepAd(0,'<tbody[!--ad--]>,</tbody>,<TBODY[!--ad--]>,</TBODY>');">TBODY</a></td>
  515. </tr>
  516. <tr>
  517. <td><a href="#ecms" onclick="AddRepAd(0,'<script[!--ad--]</script>,<SCRIPT[!--ad--]</SCRIPT>');">SCRIPT</a></td>
  518. <td><a href="#ecms" onclick="AddRepAd(0,'<td[!--ad--]>,</td>,<TD[!--ad--]>,</TD>');">TD</a></td>
  519. <td>&nbsp;</td>
  520. </tr>
  521. <tr>
  522. <td><a href="#ecms" onclick="AddRepAd(0,'<style[!--ad--]</style>,<STYLE[!--ad--]</STYLE>');">STYLE</a></td>
  523. <td><a href="#ecms" onclick="AddRepAd(0,'<a[!--ad--]>,</a>,<A[!--ad--]>,</A>');">A</a></td>
  524. <td>&nbsp;</td>
  525. </tr>
  526. <tr>
  527. <td><a href="#ecms" onclick="AddRepAd(0,'<div[!--ad--]>,</div>,<DIV[!--ad--]>,</DIV>');">DIV</a></td>
  528. <td><a href="#ecms" onclick="AddRepAd(0,'<font[!--ad--]>,</font>,<FONT[!--ad--]>,</FONT>');">FONT</a></td>
  529. <td>&nbsp;</td>
  530. </tr>
  531. <tr>
  532. <td><a href="#ecms" onclick="AddRepAd(0,'<span[!--ad--]>,</span>,<SPAN[!--ad--]>,</SPAN>');">SPAN</a></td>
  533. <td><a href="#ecms" onclick="AddRepAd(0,'<img[!--ad--]>,<IMG[!--ad--]>');">IMG</a></td>
  534. <td>&nbsp;</td>
  535. </tr>
  536. </table></td>
  537. </tr>
  538. <tr>
  539. <td><font color="#666666">(多个请用&quot;,&quot;格开)</font></td>
  540. <td>&nbsp;</td>
  541. </tr>
  542. </table></td>
  543. </tr>
  544. <tr>
  545. <td height="23" bgcolor="#FFFFFF">要过滤广告的字段名</td>
  546. <td height="23" bgcolor="#FFFFFF"><input name="repadf" type="text" id="repadf" value="<?=substr($r[repadf],1,-1)?>" size="60">
  547. <font color="#666666">(多个字段用半角逗号&quot;,&quot;格开)</font></td>
  548. </tr>
  549. <tr>
  550. <td height="23" bgcolor="#FFFFFF">内容为空不采集</td>
  551. <td height="23" bgcolor="#FFFFFF"><input name="add[newstextisnull]" type="checkbox" id="add[newstextisnull]" value="1"<?=$r[newstextisnull]==1?' checked':''?>>
  552. 是,验证字段名:<font color="#666666">
  553. <input name="isnullf" type="text" id="isnullf" value="<?=substr($r['isnullf'],1,-1)?>" size="40">
  554. (多个字段用半角逗号&quot;,&quot;格开)</font></td>
  555. </tr>
  556. <tr>
  557. <td height="23" bgcolor="#FFFFFF">过滤相似:</td>
  558. <td height="23" bgcolor="#FFFFFF">不采集标题相似超过
  559. <input name="add[titlelen]" type="text" id="add[titlelen]" value="<?=$r[titlelen]?>" size="6">
  560. 字的信息[与入库信息比较]<font color="#666666">(如不限制请填&quot;0&quot;)</font></td>
  561. </tr>
  562. <tr>
  563. <td height="23" bgcolor="#FFFFFF">&nbsp;</td>
  564. <td height="23" bgcolor="#FFFFFF">不采集标题完全相同的信息(与入库信息比较)
  565. <input name="add[retitlewriter]" type="checkbox" id="add[retitlewriter]" value="1"<?=$retitlewriter?>></td>
  566. </tr>
  567. <tr>
  568. <td height="23" bgcolor="#FFFFFF">截取内容简介:</td>
  569. <td height="23" bgcolor="#FFFFFF"> <p>截取信息内容
  570. <input name="add[smalltextlen]" type="text" id="add[smalltextlen]" value="<?=$r[smalltextlen]?>" size="6">
  571. 个字<font color="#666666">(在没有设置“内容简介”正则,系统采取的措施)</font></p></td>
  572. </tr>
  573. <tr class="header">
  574. <td height="25" colspan="2">采集内容正则(不采集项,请留空)</td>
  575. </tr>
  576. <tr>
  577. <td bgcolor="#C7D4F7">列表页</td>
  578. <td bgcolor="#C7D4F7">&nbsp;</td>
  579. </tr>
  580. <tr>
  581. <td valign="top" bgcolor="#FFFFFF"><strong>信息链接区域正则:</strong><br>
  582. (<font color="#FF0000">如不限,请为空</font>)<br>
  583. 截取的地方加上
  584. <input name="textfield" type="text" id="textfield" value="[!--smallurl--]" size="20">
  585. <br>
  586. 如:&lt;tr&gt;&lt;td&gt;链接区域&lt;/td&gt;&lt;/tr&gt;<br>
  587. 正则就是:<br> &lt;tr&gt;&lt;td&gt;[!--smallurl--]&lt;/td&gt;&lt;/tr&gt;</td>
  588. <td bgcolor="#FFFFFF"> <textarea name="add[zz_smallurl]" cols="60" rows="10" id="textarea8"><?=ehtmlspecialchars(stripSlashes($r[zz_smallurl]))?></textarea></td>
  589. </tr>
  590. <tr>
  591. <td valign="top" bgcolor="#FFFFFF"><strong>信息页链接正则:</strong><br>
  592. 截取的地方加上
  593. <input name="textfield" type="text" id="textfield3" value="[!--newsurl--]" size="20">
  594. <br>
  595. 如:&lt;a href=&quot;信息链接&quot;&gt;标题&lt;/a&gt;<br>
  596. 正则就是:<br> &lt;a href=&quot;[!--newsurl--]&quot;&gt;*&lt;/a&gt;</td>
  597. <td bgcolor="#FFFFFF"> <textarea name="add[zz_newsurl]" cols="60" rows="10" id="add[zz_newsurl]"><?=ehtmlspecialchars(stripSlashes($r[zz_newsurl]))?></textarea></td>
  598. </tr>
  599. <tr>
  600. <td valign="top" bgcolor="#FFFFFF"><p><strong>标题图片正则:<br>
  601. (如图片在内容页,请留空)</strong><br>
  602. <input name="textfield" type="text" id="textfield" value="[!--titlepic--]" size="20">
  603. </p></td>
  604. <td bgcolor="#FFFFFF"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
  605. <tr>
  606. <td>图片地址前缀:
  607. <input name="add[qz_titlepicl]" type="text" id="add[qz_titlepicl]" value="<?=stripSlashes($r[qz_titlepicl])?>" size="32">
  608. <input name="add[save_titlepicl]" type="checkbox" id="add[save_titlepicl]" value=" checked"<?=$r[save_titlepicl]?>>
  609. 保存本地 </td>
  610. </tr>
  611. <tr>
  612. <td><textarea name="add[zz_titlepicl]" cols="60" rows="10" id="add[zz_titlepicl]"><?=ehtmlspecialchars(stripSlashes($r[zz_titlepicl]))?></textarea></td>
  613. </tr>
  614. <tr>
  615. <td><input name="add[z_titlepicl]" type="text" id="add[z_titlepicl]" value="<?=stripSlashes($r[z_titlepicl])?>" size="32">
  616. (如填这里,将为此字段值)</td>
  617. </tr>
  618. </table></td>
  619. </tr>
  620. <tr>
  621. <td colspan="2" bgcolor="C7D4F7">内容页(文件过大的请不要选择保存本地)</td>
  622. </tr>
  623. <?
  624. @include($cjfile);
  625. ?>
  626. <tr>
  627. <td colspan="2" bgcolor="C7D4F7">内容页分页采集设置:(如没有分页请留空,只对newstext有效)</td>
  628. </tr>
  629. <tr>
  630. <td bgcolor="#FFFFFF">入库是否保留原分页:</td>
  631. <td bgcolor="#FFFFFF"><input type="radio" name="add[doaddtextpage]" value="0"<?=$r[doaddtextpage]==0?' checked':''?>>
  632. 保留分页
  633. <input type="radio" name="add[doaddtextpage]" value="1"<?=$r[doaddtextpage]==1?' checked':''?>>
  634. 不保留分页</td>
  635. </tr>
  636. <tr>
  637. <td bgcolor="#FFFFFF">分页形式:</td>
  638. <td bgcolor="#FFFFFF"> <input type="radio" name="add[pagetype]" value="0"<?=$pagetype0?>>
  639. 上下页导航式
  640. <input type="radio" name="add[pagetype]" value="1"<?=$pagetype1?>>
  641. 全部列出式 </td>
  642. </tr>
  643. <tr>
  644. <td valign="top" bgcolor="#FFFFFF">&quot;全部列出&quot;式正则设置:</td>
  645. <td bgcolor="#FFFFFF"> <table width="100%%" border="0" cellspacing="1" cellpadding="2">
  646. <tr>
  647. <td width="50%" height="23"><strong>分页区域正则(<font color="#FF0000">[!--smallpageallzz--]</font>)</strong></td>
  648. <td><strong>分页链接正则(<font color="#FF0000">[!--pageallzz--]</font>)</strong></td>
  649. </tr>
  650. <tr>
  651. <td><textarea name="add[smallpageallzz]" cols="42" rows="12" id="textarea2"><?=ehtmlspecialchars(stripSlashes($r[smallpageallzz]))?></textarea></td>
  652. <td><textarea name="add[pageallzz]" cols="42" rows="12" id="textarea3"><?=ehtmlspecialchars(stripSlashes($r[pageallzz]))?></textarea></td>
  653. </tr>
  654. </table></td>
  655. </tr>
  656. <tr>
  657. <td valign="top" bgcolor="#FFFFFF">&quot;上下页导航&quot;式正则设置:</td>
  658. <td bgcolor="#FFFFFF"> <table width="100%%" border="0" cellspacing="1" cellpadding="2">
  659. <tr>
  660. <td width="50%" height="23"><strong>分页区域正则(<font color="#FF0000">[!--smallpagezz--]</font>)</strong></td>
  661. <td><strong>分页链接正则(<font color="#FF0000">[!--pagezz--]</font>)</strong></td>
  662. </tr>
  663. <tr>
  664. <td><textarea name="add[smallpagezz]" cols="42" rows="12" id="add[smallpagezz]"><?=ehtmlspecialchars(stripSlashes($r[smallpagezz]))?></textarea></td>
  665. <td><textarea name="add[pagezz]" cols="42" rows="12" id="add[pagezz]"><?=ehtmlspecialchars(stripSlashes($r[pagezz]))?></textarea></td>
  666. </tr>
  667. </table></td>
  668. </tr>
  669. <tr>
  670. <td bgcolor="#FFFFFF">&nbsp;</td>
  671. <td bgcolor="#FFFFFF"> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"> </td>
  672. </tr>
  673. </table>
  674. <br>
  675. <table width="100%" border="0" cellspacing="0" cellpadding="3">
  676. <tr>
  677. <td><strong>注意事项:<font color="#FF0000"><br>
  678. </font></strong>1.*:表示不限制内容。行与行之间的间隔最好用*格开<br>
  679. 2.增加节点后,最好先“预览”。<br>
  680. 3.对于特殊字符请在前面加上“\\”,当然直接将特殊字符改为“*”最合适了。特殊字符如下:<br>
  681. ),(,{,},[,],\,?<br>
  682. 4.同一信息链接系统不会重复采集。</td>
  683. </tr>
  684. </table>
  685. </form>
  686. </body>
  687. </html>
  688. <?php
  689. db_close();
  690. $empire=null;
  691. ?>