<?php include $this->admin_tpl('meta', 'admin');?>
<title>修改采集节点 - YzmCMS内容管理系统</title>
</head>
<body>
<nav class="breadcrumb"><i class="yzm-iconfont yzm-iconai-home"></i> 首页 <span class="c-gray en">&gt;</span> 模块管理 <span class="c-gray en">&gt;</span> 采集管理 <span class="c-gray en">&gt;</span> 修改采集节点 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="yzm-iconfont yzm-iconshuaxin"></i></a></nav>
<article class="page-container">
<div class="formdoby_normal"> 
	<form class="form form-horizontal" method="post" action="" onsubmit="return check()">
		<div id="tab_system" class="HuiTab">
			<div class="tabBar cl"><span>列表网址规则</span><span>文章网址规则</span><span>其他设置</span></div>
			<div class="tabCon formdoby_info pd-10">

			<fieldset>
				<legend>基本信息</legend>
				<table width="100%" class="table table-border yzmcms_table">
					<tr>
						<td width="120">采集项目名：</td> 
						<td>
						<input type="text" name="name" value="<?php echo $data['name']?>" class="input-text w_300"></input>
						</td>
					</tr>
					<tr>
						<td width="120">采集页面编码：</td> 
						<td>
						<label><input type="radio" class="radio" name="sourcecharset" <?php if($data['sourcecharset'] == 'utf-8') echo 'checked';?> value="utf-8"> UTF-8</label>&nbsp;&nbsp;
						<label><input type="radio" class="radio" name="sourcecharset" <?php if($data['sourcecharset'] == 'gbk') echo 'checked';?> value="gbk"> GBK</label>
						</td>
					</tr>
				</table>
			</fieldset>	
			
			<fieldset>
				<legend>列表规则</legend>
				<table width="100%" class="table table-border yzmcms_table">
					<tr>
						<td width="120">网址类型：</td> 
						<td>
						<label><input type="radio" class="radio" name="sourcetype" <?php if($data['sourcetype'] == '1') echo 'checked';?> value="1"> 序列网址</label>&nbsp;&nbsp;
						<label><input type="radio" class="radio" name="sourcetype" <?php if($data['sourcetype'] == '2') echo 'checked';?> value="2"> 单一网页</label>
						</td>
					</tr>
					<tr>
						<td width="120">网址配置：</td> 
						<td>
						 <input type="text" name="urlpage" class="input-text w_420" value="<?php echo $data['urlpage']?>">
						 <p style="margin:10px 0">(如为序列网址：http://www.yzmcms.com/html/(*).html，页码使用(*)做为通配符。</p>
						 页码从: <input type="text" name="pagesize_start" value="<?php echo $data['pagesize_start']?>" class="input-text" style="width:60px"> 到 <input type="text" name="pagesize_end" value="<?php echo $data['pagesize_end']?>" class="input-text" style="width:60px"> 每次增加 <input type="text" name="par_num" class="input-text" style="width:60px" value="<?php echo $data['par_num']?>">
						</td>
					</tr>
					<tr>
						<td width="120">网址配置：</td> 
						<td>
						网址中必须包含 <input type="text" name="url_contain"  value="<?php echo $data['url_contain']?>" class="input-text w_300"> 网址中不得包含  <input type="text" name="url_except"  value="<?php echo $data['url_except']?>" class="input-text w_300">
						</td>
					</tr>
					<tr>
						<td width="120">获取网址：</td> 
						<td>
						区域开始的HTML：<textarea name="url_start" class="textarea mb-5"><?php echo $data['url_start']?></textarea><br>
						区域结束的HTML：<textarea name="url_end" class="textarea"><?php echo $data['url_end']?></textarea> </td>
					</tr>
				</table>
			</fieldset>	
			
			</div>
			
			<div class="tabCon formdoby_info pd-10">

			<fieldset>
				<legend>标题规则</legend>
				<table width="100%" class="table table-border yzmcms_table">
					<tr>
						<td width="120">匹配规则：</td> 
						<td>
						<textarea name="title_rule" class="textarea" style="width:450px;"><?php echo $data['title_rule']?></textarea> <span class="c-red">使用“[内容]”作为通配符 </span>
						</td>
					</tr>
					<tr>
						<td width="120">过滤选项：</td> 
						<td>
<textarea name="title_html_rule" class="textarea" style="width:450px;"><?php echo $data['title_html_rule']?></textarea> <span class="c-red">使用“[|]”分隔多个规则 </span><br/>
选择：					
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<p([^>]*)>(.*)</p>" type="checkbox"> &lt;p&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<a([^>]*)>(.*)</a>" type="checkbox"> &lt;a&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<script([^>]*)>(.*)</script>" type="checkbox"> &lt;script&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<iframe([^>]*)>(.*)</iframe>" type="checkbox"> &lt;iframe&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<table([^>]*)>(.*)</table>" type="checkbox"> &lt;table&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<span([^>]*)>(.*)</span>" type="checkbox"> &lt;span&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<b([^>]*)>(.*)</b>" type="checkbox"> &lt;b&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<img([^>]*)>" type="checkbox"> &lt;img&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<object([^>]*)>(.*)</object>" type="checkbox"> &lt;object&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<embed([^>]*)>(.*)</embed>" type="checkbox"> &lt;embed&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<param([^>]*)>(.*)</param>" type="checkbox"> &lt;param&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<div([^>]*)>" type="checkbox"> &lt;div&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="</div>" type="checkbox"> &lt;/div&gt;</label>
<label style="margin-right:10px"><input name="html_rule_1" onclick="html_role('html_rule_1','title_html_rule')" value="<!--([^>]*)-->" type="checkbox"> &lt;!-- --&gt;</label>
						</td>
					</tr>
				</table>
			</fieldset>	

			<fieldset>
				<legend>时间规则</legend>
				<table width="100%" class="table table-border yzmcms_table">
					<tr>
						<td width="120">匹配规则：</td> 
						<td>
						<textarea name="time_rule" class="textarea" style="width:450px;"><?php echo $data['time_rule']?></textarea> <span class="c-red">使用“[内容]”作为通配符 </span>
						</td>
					</tr>
					<tr>
						<td width="120">过滤选项：</td> 
						<td>
<textarea name="time_html_rule" class="textarea" style="width:450px;"><?php echo $data['time_html_rule']?></textarea> <span class="c-red">使用“[|]”分隔多个规则 </span><br/>
选择：					
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<p([^>]*)>(.*)</p>" type="checkbox"> &lt;p&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<a([^>]*)>(.*)</a>" type="checkbox"> &lt;a&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<script([^>]*)>(.*)</script>" type="checkbox"> &lt;script&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<iframe([^>]*)>(.*)</iframe>" type="checkbox"> &lt;iframe&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<table([^>]*)>(.*)</table>" type="checkbox"> &lt;table&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<span([^>]*)>(.*)</span>" type="checkbox"> &lt;span&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<b([^>]*)>(.*)</b>" type="checkbox"> &lt;b&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<img([^>]*)>" type="checkbox"> &lt;img&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<object([^>]*)>(.*)</object>" type="checkbox"> &lt;object&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<embed([^>]*)>(.*)</embed>" type="checkbox"> &lt;embed&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<param([^>]*)>(.*)</param>" type="checkbox"> &lt;param&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<div([^>]*)>" type="checkbox"> &lt;div&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="</div>" type="checkbox"> &lt;/div&gt;</label>
<label style="margin-right:10px"><input name="html_rule_2" onclick="html_role('html_rule_2','time_html_rule')" value="<!--([^>]*)-->" type="checkbox"> &lt;!-- --&gt;</label>
						</td>
					</tr>
				</table>
			</fieldset>	

			<fieldset>
				<legend>内容规则</legend>
				<table width="100%" class="table table-border yzmcms_table">
					<tr>
						<td width="120">匹配规则：</td> 
						<td>
						<textarea name="content_rule" class="textarea" style="width:450px;"><?php echo $data['content_rule']?></textarea> <span class="c-red">使用“[内容]”作为通配符 </span>
						</td>
					</tr>
					<tr>
						<td width="120">过滤选项：</td> 
						<td>
<textarea name="content_html_rule" class="textarea" style="width:450px;"><?php echo $data['content_html_rule']?></textarea> <span class="c-red">使用“[|]”分隔多个规则 </span><br/>
选择：					
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<p([^>]*)>(.*)</p>" type="checkbox"> &lt;p&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<a([^>]*)>(.*)</a>" type="checkbox"> &lt;a&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<script([^>]*)>(.*)</script>" type="checkbox"> &lt;script&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<iframe([^>]*)>(.*)</iframe>" type="checkbox"> &lt;iframe&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<table([^>]*)>(.*)</table>" type="checkbox"> &lt;table&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<span([^>]*)>(.*)</span>" type="checkbox"> &lt;span&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<b([^>]*)>(.*)</b>" type="checkbox"> &lt;b&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<img([^>]*)>" type="checkbox"> &lt;img&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<object([^>]*)>(.*)</object>" type="checkbox"> &lt;object&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<embed([^>]*)>(.*)</embed>" type="checkbox"> &lt;embed&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<param([^>]*)>(.*)</param>" type="checkbox"> &lt;param&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<div([^>]*)>" checked type="checkbox"> &lt;div&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="</div>" checked type="checkbox"> &lt;/div&gt;</label>
<label style="margin-right:10px"><input name="html_rule_3" onclick="html_role('html_rule_3','content_html_rule')" value="<!--([^>]*)-->"  type="checkbox"> &lt;!-- --&gt;</label>
						</td>
					</tr>
				</table>
			</fieldset>		
			
			</div>
			
			
			<div class="tabCon formdoby_info pd-10">
			<fieldset>
				<legend>其他设置</legend>
				<table class="table table-border yzmcms_table">				
				<tr>
					<td width="180">下载图片：</td> 
					<td>
						<label><input name="down_attachment" value="1" class="radio" type="radio" <?php if($data['down_attachment'] == '1') echo 'checked';?> >下载图片</label>&nbsp;&nbsp;
						<label><input name="down_attachment" value="0" class="radio" type="radio" <?php if($data['down_attachment'] == '0') echo 'checked';?> >不下载</label>
					</td>
				</tr>				
				<tr>
					<td>导入顺序：</td> 
					<td>
						<label><input name="coll_order" value="1" class="radio" type="radio" <?php if($data['coll_order'] == '1') echo 'checked';?>>与目标站相同</label>&nbsp;&nbsp;
						<label><input name="coll_order" value="0" class="radio" type="radio" <?php if($data['coll_order'] == '0') echo 'checked';?>>与目标站相反</label>
					</td>
				</tr>								
				</table>
			</fieldset>
			</div>
		<input class="dosubmit w_100 btn-primary radius" name="dosubmit" type="submit" value="提交">
		<input class="btn w_100 btn-default radius h35" type="button" value="后退" onclick="window.history.go(-1)">
		</div>
	</form>
</div>
</article>
<?php include $this->admin_tpl('footer','admin');?> 
<script type="text/javascript">

function check(){
	 if($("input[name='name']").val()==''){
		 layer.alert('采集项目名不能为空！');
		 return false;
	 }
	 if($("input[name='urlpage']").val()==''){
		 layer.alert('网址配置不能为空！');
		 return false;
	 }		 
}
function html_role(id,textid){
		var result="";
		$("input[name='"+id+"']:checked").each(function(){
			   result+=$(this).val()+'[|]'+"\n";
		});
		$("textarea[name='"+textid+"']").val(result);    	
}

$(function(){
	$.Huitab("#tab_system .tabBar span","#tab_system .tabCon","current","click","<?php echo isset($_GET['tab']) ? intval($_GET['tab']) : '0'?>");
});
</script>
</body>
</html>