<!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("FirstPage").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; 项目编辑</span>
<!--<div class="sanjiao"></div>-->
<div class="file_name clear"><form id="form1" name="form1" method="post" action="{%#path%}?xmls=index.xmls&method={%@method%}" style="padding:0;pading:0;">
<table class="clear nobg">
<tr>
<td class="t1">标题</td>
<td class="t2"><input name="Title" type="text" class="mulu" value="{%@row[Title]%}" ></td>
</tr>
<tr>
<td class="t1">目录第一页</td>
<td class="t2"><input name="FirstPage" type="text" class="mulu" value="{%@row[FirstPage]%}" ></td>
</tr>
<tr> 
<td class="t1">内容页</td>
<td class="t2"><input name="ContentPage" type="text" class="mulu" value="{%@row[ContentPage]%}" ></td>
</tr>
<tr>
<td class="t1">目录网址格式</td>
<td class="t2"><input id="UrlFormat" name="UrlFormat" type="text" class="mulu" value="{%@row[UrlFormat]%}" ></td>
</tr>
<tr>
<td class="t1">目录第二页开始页</td>
<td class="t2"><input name="StartPage" type="text" class="number" value="{%@row[StartPage]%}"></td>
</tr>
<tr>
<td class="t1">目录结束页</td>
<td class="t2"><input name="EndPage" type="text" class="number" value="{%@row[EndPage]%}" ></td>
</tr>
<tr>
<td class="t1">目录链接包含文字</td>
<td class="t2"><input name="LikeText" type="text" class="mulu" value="{%@row[LikeText]%}" ></td>
</tr>

<td class="t1">模式</td>
<td class="t2">
{%<input type="select" value="@row[BrowseMode]" name="BrowseMode" id="BrowseMode">
<data type="list" name="options">
<item key="0">源码模式</item>
<item key="1">浏览模式</item>
</data>
</input>%} </td>
</tr>
<tr>
<td class="t1">标签路径</td>
<td class="t2"><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>
<td class="t1">本地路径</td>
<td class="t2"><input id="LocalPath" name="LocalPath" type="text" class="mulu" value="{%@row[LocalPath]%}" > <button type=“button” class="no-float" onClick="goFolderBrowser()">浏览</button></td>
</tr>
<td class="t1">网上路径</td>
<td class="t2"><input name="WebPath" type="text" class="mulu" value="{%@row[WebPath]%}" > </td>
</tr>
<tr>
<td colspan="2" class="t2"> 
<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>