<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>网页采集</title>
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link href="css/title.css" rel="stylesheet" type="text/css" />
<script>
function goFolderBrowser() {
var ret = window.external.folderBrowser("选择保存路径");
if (ret != null) { 
document.getElementById("LocalPath").value = ret; 
}
}
function goXPath() {
var addr=document.getElementById("ContentPage").value;
if(addr==""){
alert("请设置第一页的网址!");
return;
}
var lnk="?xmls=index.xmls&method=request&url="+encodeURIComponent(addr)+"&BrowseMode="+document.getElementById("BrowseMode").value;
var html=window.external.get(lnk);
var ret = window.external.openHtmlXPath(html);
if (ret != null) {
 document.getElementById("XPath").value = ret; 
}
}
</script>
</head>
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<![endif]-->
<body>
<div class="bgcolor">
<div class="bg">
<header>
<div class="center">
<h2>网页采集</h2>
</div>
</header>
<div class="pic_main">
<div class="pic_left">
<span><a href="{%#path%}?xmls=index.xmls">项目列表 </a>&gt; <a href="{%#path%}?xmls=readx.xmls&ItemId={%$http.get(ItemId)%}">内容列表 </a>&gt; <a href="{%#path%}?xmls=field.xmls&ItemId={%$http.get(ItemId)%}">规则管理 </a>&gt;  规则编辑</span>
<!--<div class="sanjiao"></div>-->
<div class="file_name clear"><form id="form1" name="form1" method="post" action="{%#path%}?xmls=field.xmls&method={%@method%}" style="padding:0;pading:0;">
<table class="clear nobg">

<tr>
<td class="t1">名称</td>
<td class="t2"><input name="FieldName" type="text" class="mulu" value="{%@row[FieldName]%}"></td>
</tr>
<tr>
<td class="t1">类型</td>
<td class="t2">
{%<input type="select" value="@row[FieldType]" name="FieldType">
<data type="list" name="options">
<item key="0">HTML</item>
<item key="1">文本</item>
<item key="2">图片</item>
</data>
</input>%} </td>
</tr>
 
<tr>
<td class="t1">标签路径</td>
<td class="t2"><input id="ContentPage" name="ContentPage" type="hidden" class="mulu" value="{%@row[ContentPage]%}" ><input id="XPath" name="XPath" type="text" class="mulu" value="{%$web.htmlEncode(@row[XPath])%}" > <button type=“button” class="no-float"  onClick="goXPath()">选择</button></td>
</tr>
<tr>
<td class="t1">本地文件夹</td>
<td class="t2"><input name="Folder" type="text" class="mulu" value="{%@row[Folder]%}" placeholder="images"></td>
</tr>
<tr>
<td class="t1">过滤文字（多个请换行）</td>
<td class="t2"><textarea name="Filter" >{%$web.htmlEncode(@row[Filter])%}</textarea></td>
</tr>
<tr>
<td colspan="2" class="t2"> 
<input type="hidden" value="{%@row[BrowseMode]%}" name="BrowseMode" id="BrowseMode"/>
<input type="hidden" value="{%@row[FieldId]%}" name="FieldId"/>
<input type="hidden" value="{%@row[ItemId]%}" name="ItemId"/>
<button type="submit" class="button-center">提交</button></td>
</tr>


</table>
</form>
</div>
</div>
</div>
</div>
</div>
</body>
</html>