<% Option Explicit %>
<!--#include file="inc/Cls_DB.asp" -->
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="inc/Function.asp" -->
<%
'==============================================================================
'软件名称：风讯新闻采集系统V1.0
'最新更新：2004.12
'==============================================================================
'商业注册联系：028-85098980-601,602 技术支持：028-85098980-606、607,客户支持：608
'产品咨询QQ：159410,655071,66252421
'技术支持:所有程序使用问题，请提问到bbs.foosun.net我们将及时回答您
'程序开发：风讯开发组 & 风讯插件开发组
'论坛支持：风讯在线论坛(http://bbs.foosun.net)
'官方网站：www.Foosun.net  演示站点：test.cooin.com    
'网站建设专区：www.cooin.com
'==============================================================================
'免费版本请在新闻首页保留版权信息，并做上本站LOGO友情连接
'==============================================================================
Dim DBC,CollectConn,Conn
Set DBC = New DataBaseClass
Set CollectConn = DBC.OpenConnection()
DBC.ConnStr = "DBQ=" + Server.MapPath(DataBaseConnectStr) + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
'判断权限
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
if Not JudgePopedomTF(Session("Name"),"P1401") then Call ReturnError1()
'判断权限结束
Dim RsEditObj,EditSql,SiteID
Dim ObjUrl
Set RsEditObj = Server.CreateObject ("ADODB.RecordSet")
SiteID = Request("SiteID")
if SiteID <> "" then
	EditSql="Select * from Site where ID=" & SiteID
	RsEditObj.Open EditSql,CollectConn,1,3
	if RsEditObj.Eof then
		Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
		Response.end
	else
		ObjUrl = RsEditObj("ObjUrl")
	end if
else
	Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
	Response.end
end if

Dim ListHeadSetting,ListFootSetting
ListHeadSetting = Request.Form("ListHeadSetting")
ListFootSetting = Request.Form("ListFootSetting")
if Request.Form("Result") = "Edit" then
    Dim RsAddObj,sql
	Set RsAddObj = Server.CreateObject ("ADODB.RecordSet")
	Sql = "select * from Site where id=" & Request.Form("SiteID")
	RsAddObj.Open Sql,CollectConn,1,3
	RsAddObj("ListHeadSetting") = ListHeadSetting
	RsAddObj("ListFootSetting") = ListFootSetting
	RsAddObj.update
	RsAddObj.close
	Set RsAddObj = Nothing
end if

Dim ResponseAllStr,NewsListStr
ResponseAllStr = GetPageContent(ObjURL)
NewsListStr = GetContent(ResponseAllStr,ListHeadSetting,ListFootSetting,0)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自动新闻采集—站点设置</title>
</head>
<link href="Inc/Collect.css" rel="stylesheet">
<body leftmargin="0" topmargin="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr bgcolor="#E4E4E4"> 
    <td height="30" colspan="4" background="images/Collect_bg.gif"><font color="#FF0000"><strong>站点属性修改---第三步</strong></font></td>
  </tr>
  <tr bgcolor="#DFEAEE">
    <td colspan="4"><table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
        <form name="form1" method="post" action="SiteFourStep.asp">
    <tr bgcolor="#DFEAEE"> 
            <td width="20%"> 
              <div align="right"> 
                <input name="SiteID" type="hidden" id="SiteID2" value="<% = SiteID %>">
                <input name="Result" type="hidden" id="Result2" value="Edit">
                列表URL开始字符</div></td>
      <td colspan="3"> <textarea name="LinkHeadSetting" cols="50" rows="6" id="textarea2" style="width:100%;"><%=RsEditObj("LinkHeadSetting")%></textarea></td>
    </tr>
    <tr bgcolor="#DFEAEE"> 
      <td> <div align="right">列表URL结束字符</div></td>
      <td colspan="3"> <textarea name="LinkFootSetting" cols="50" rows="6" id="textarea3" style="width:100%;"><%=RsEditObj("LinkFootSetting")%></textarea></td>
    </tr>
    <tr bgcolor="#DFEAEE"> 
            <td height="50" colspan="4"> 
              <div align="right"> 
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr bgcolor="#DFEAEE"> 
                    <td width="30%"> 
                      <div align="center"> 
                        <input type="button" onClick="window.location.href='javascript:history.go(-1)'" name="Submit3" value="上 一 步">
                      </div></td>
                    <td><div align="center">
                        <input type="reset" name="Submit2" value=" 重 填 ">
                      </div></td>
                    <td width="30%"> 
                      <div align="center"> 
                        <input type="submit" name="Submit" value="下 一 步">
                      </div></td>
                  </tr>
                </table>
        </div></td>
    </tr>
  </form>
      </table></td>
  </tr>
  <tr bgcolor="#DFEAEE"> 
    <td colspan="4"><%	Response.Write(NewsListStr)	%></td>
  </tr>
</table>
</body>
</html>
<%
Set CollectConn = Nothing
Set Conn = Nothing
Set RsEditObj = Nothing
%>