<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
Dim SqlItem,RsItem,FoundErr,ErrMsg

Dim ItemID,ItemName,WebName,WebUrl,ChannelID,ClassID,SpecialID,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,ItemDemo
ItemID=Trim(Request("ItemID"))
If ItemID="" Then
   FoundErr=True
   ErrMsg=ErrMsg & "<br><li>参数错误，项目ID不能为空！</li>"
Else
   ItemID=Clng(ItemID)
End If
If FoundErr<>True Then
   SqlItem ="select ItemID,ItemName,WebName,ListStr,ChannelID,ClassID,SpecialID,LoginType,LoginUrl,LoginPostUrl,LoginUser,LoginPass,LoginFalse,ItemDemo from Item where ItemID=" & ItemID
   Set RsItem=Server.CreateObject("adodb.recordset")
   RsItem.Open SqlItem,ConnItem,1,1
   If RsItem.Eof And RsItem.Bof  Then
      FoundErr=True
      ErrMsg=ErrMsg & "<br><li>参数错误，没有找到该项目！</li>"
   Else
      ItemName=RsItem("ItemName")
      ItemDemo=RsItem("ItemDemo")
      WebName=RsItem("WebName")
      ListStr=RsItem("ListStr")
      ChannelID=RsItem("ChannelID")
      ClassID=RsItem("ClassID")
      SpecialID=RsItem("SpecialID")
      LoginType=RsItem("LoginType")
      LoginUrl=RsItem("LoginUrl")
      LoginPostUrl=RsItem("LoginPostUrl")
      LoginUser=RsItem("LoginUser")
      LoginPass=RsItem("LoginPass")
      LoginFalse=RsItem("LoginFalse")
   End If
   RsItem.Close
   Set RsItem=Nothing
End If

If FoundErr=True Then
   Call WriteErrMsg(ErrMsg)
Else
   Call Main()
End If
'关闭数据库链接
Call CloseConn()
Call CloseConnItem()
%>
<%Sub Main%>
<html>
<head>
<title>采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/Admin_Style.css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr> 
    <td height="22" colspan="2" align="center" class="topbg"><strong>采&nbsp;&nbsp;集&nbsp;&nbsp;系&nbsp;&nbsp;统&nbsp;&nbsp;项&nbsp;&nbsp;目&nbsp;&nbsp;管&nbsp;&nbsp;理</strong></td>
  </tr>
  <tr class="tdbg"> 
    <td width="65" height="30"><strong>管理导航：</strong></td>
    <td height="30">项目编辑 >> <a href="Admin_ItemModify.asp?ItemID=<%=ItemID%>"><font color=red>基本设置</font></a> >> <a href="Admin_ItemModify2.asp?ItemID=<%=ItemID%>">列表设置</a> >> <a href="Admin_ItemModify3.asp?ItemID=<%=ItemID%>">链接设置</a> >> <a href="Admin_ItemModify4.asp?ItemID=<%=ItemID%>">正文设置</a> >>  
	<a href="Admin_ItemModify5.asp?ItemID=<%=ItemID%>">采样测试</a> >> <a href="Admin_ItemAttribute.asp?ItemID=<%=ItemID%>">属性设置</a> >> 完成</td>         
  </tr>         
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
<form method="post" action="Admin_ItemModify2.asp" name="myform">
    <tr> 
      <td height="22" colspan="2" class="title"> <div align="center"><strong>编 辑 项 目--基 本 设 置</strong></div></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong>项目名称：</strong></td>
      <td class="tdbg" width="75%">
		<input name="ItemName" type="text" size="27" maxlength="30" value="<%=ItemName%>">&nbsp;&nbsp;<font color=red>*</font>如：新浪网－信息中心 既简单又明了 
      </td>
    </tr>
    <tr class="tdbg"> 
      <td height="30" width="20%"><strong> 所属频道：</strong></td>
      <td><input name="ChannelID" type="radio" onClick="info.style.display='';expo.style.display='none'" value="1" <%if ChannelID=1 then response.write"CHECKED"%>>
		商业资讯<span lang="en-us">&nbsp;
		</span>
		<input type="radio" value="2" name="ChannelID" onClick="expo.style.display='';info.style.display='none'" <%if ChannelID=2 then response.write"CHECKED"%>>
		展会资讯 <font color=red> * </font>
      </td>
    </tr>
    <tr class="tdbg" id="info" <%if ChannelID<>1 then response.write"style=""display:none"""%>> 
      <td width="20%"><strong> 所属栏目：</strong></td>
      <td class=forumRow width="75%"> 
              <select name="infoClassID" size="1" class="lh17">
          <%
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from Websen_newsType"
rs1.open sql1,conn,1,1
if not rs1.eof then
do while not rs1.eof
response.write "<option value='"&rs1("typeid")&"'"
if ChannelID=1 and ClassID=rs1("typeid") then
response.write "Selected"
end if
response.write ">"&rs1("type")&" 商业资讯</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
end if
%> 
              </select> <font color=red> * </font> <a href="../info/Class_Ok.asp?action=add_class_1"><font color='#FF0000'>添加</font></a></font>
      </td>
    </tr>
    <tr class="tdbg" id="expo" <%if ChannelID<>2 then response.write"style=""display:none"""%>> 
      <td width="20%"><strong> 所属栏目：</strong></td>
      <td class=forumRow width="75%"> 
              <select name="expoClassID" size="1" class="lh17">
          <%
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from Websen_expoinfotype"
rs1.open sql1,conn,1,1
if not rs1.eof then
do while not rs1.eof
response.write "<option value='"&rs1("id")&"'"
if ChannelID=2 and ClassID=rs1("id") then
response.write "Selected"
end if
response.write ">"&rs1("type")&"</option>"&chr(13)+chr(10)
rs1.movenext
loop
rs1.close
end if
%> 
              </select> <font color=red> * </font> <a href="../expo/Class_Ok.asp?action=add_class_1"><font color='#FF0000'>添加</font></a></font> 
      </td>
    </tr>
    <tr>
      <td width="20%" class="tdbg"><strong> 网站名称：</strong></td>
      <td class="tdbg" width="75%">
		<input name="webname" type="text" size="27" maxlength="30" value="<%=webname%>"> <font color=red> * </font>
      </td>
    </tr>
    <tr>
      <td width="20%" class="tdbg"><strong> 网站网址：</strong></td>
      <td class="tdbg" width="75%"><input name="ListStr" type="text" size="49" maxlength="150" value="<%=ListStr%>"><font color=red> * </font><font color=blue>注：主要采集网站的列表页</font>
      </td>
    </tr>
   <tr class="tdbg"> 
      <td width="150" class="tdbg"><strong> 网站登录：</strong></td>
      <td class="tdbg">
		<input type="radio" value="0" name="LoginType" <%if LoginType=0 Then Response.Write "checked"%> onClick="Login.style.display='none'">不需要登录<span lang="en-us">&nbsp;
		</span>
		<input type="radio" value="1" name="LoginType" <%if LoginType=1 Then Response.Write "checked"%> onClick="Login.style.display=''">设置参数

      </td>
    </tr>
   <tr class="tdbg" id="Login" style="<%If LoginType=0 Then Response.write "display:none"%>"> 
      <td width="150" class="tdbg"><strong> 登录参数：</strong></td>
      <td class="tdbg">
        登录地址：<input name="LoginUrl" type="text" size="40" maxlength="150" value="<%=LoginUrl%>"><br>
        提交地址：<input name="LoginPostUrl" type="text" size="40" maxlength="150" value="<%=LoginPostUrl%>"><br>
        用户参数：<input name="LoginUser" type="text" size="30" maxlength="150" value="<%=LoginUser%>"><br>
        密码参数：<input name="LoginPass" type="text" size="30" maxlength="150" value="<%=LoginPass%>"><br> 
		失败信息：<input name="LoginFalse" type="text" size="30" maxlength="150" value="<%=LoginFalse%>"></td>
    </tr>
    <tr class="tdbg"> 
      <td width="20%" class="tdbg"><strong>模板备注：</strong></td>
      <td class="tdbg" width="75%"><textarea name="ItemDemo" cols="49" rows="5"><%=ItemDemo%></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td colspan="2" align="center" class="tdbg">
        <input name="ItemID" type="hidden" id="ItemID" value="<%=ItemID%>">
        <input name="Action" type="hidden" id="Action" value="SaveEdit">
        <input name="Cancel" type="button" id="Cancel" value=" 返&nbsp;&nbsp;回 " onClick="window.location.href='Admin_ItemStart.asp'" style="cursor: hand;background-color: #cccccc;">
        &nbsp; 
        <input  type="submit" name="Submit" value="下&nbsp;一&nbsp;步" style="cursor: hand;background-color: #cccccc;"></td>
    </tr>
</form>
</table>
<!--#include file="Admin_ItemFoot.asp"-->
</body>         
</html>
<%End  Sub%>