<% Option Explicit %>
<!--#include file="inc/Cls_DB.asp" -->
<!--#include file="../../Inc/Const.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,Conn,CollectConn
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 ListHeadSetting,ListFootSetting
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
		ListHeadSetting = RsEditObj("ListHeadSetting")
		ListFootSetting = RsEditObj("ListFootSetting")
	end if
else
	Response.write"<script>alert(""没有修改的站点"");location.href=""javascript:history.back()"";</script>"
	Response.end
end if
Set RsEditObj = Nothing
if Request.Form("Result") = "Edit" then
    Dim RsAddObj,sql
    if Request.Form("SiteName")="" Or Request.Form("SysTemplet")="" or Request.Form("SiteUrl")=""  or Request.Form("objURL")=""  or Request.Form("SiteClass")=""  or Request.Form("SysClass")=""  then
		Response.write"<script>alert(""请填写完整！"");location.href=""javascript:history.back()"";</script>"
		Response.end
	end if
	Set RsAddObj = Server.CreateObject ("ADODB.RecordSet")
	Sql = "select * from Site where id=" & Request.Form("SiteID")
	RsAddObj.Open Sql,CollectConn,1,3
	RsAddObj("SiteName") = Request.Form("SiteName")
	RsAddObj("SiteUrl") = Request.Form("SiteUrl")
	RsAddObj("objURL") = Request.Form("objURL")
	RsAddObj("SiteClass") = Request.Form("SiteClass")
	RsAddObj("SysClass") = Request.Form("SysClass")
	RsAddObj("SysTemplet") = Request.Form("SysTemplet")
	if Request.Form("Islock") <> "" then
		RsAddObj("Islock") = True
	else
		RsAddObj("Islock") = False
	end if
	RsAddObj.update
	RsAddObj.close
	Set RsAddObj = Nothing
end if
%>
<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="5" cellspacing="1" bgcolor="#CCCCCC">
  <form name="form1" method="post" action="SiteThreeStep.asp">
    <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 width="20%"> <div align="right">
          <input name="SiteID" type="hidden" id="SiteID2" value="<% = SiteID %>">
          <input name="Result" type="hidden" id="Result2" value="Edit">
          列表开始字符</div></td>
      <td colspan="3"> <textarea name="ListHeadSetting" rows="6" id="ListHeadSetting" style="width:100%;"><%=ListHeadSetting%></textarea></td>
    </tr>
    <tr bgcolor="#DFEAEE"> 
      <td> <div align="right">列表结束字符</div></td>
      <td colspan="3"> <textarea name="ListFootSetting" rows="6" id="ListFootSetting" style="width:100%;"><%=ListFootSetting%></textarea></td>
    </tr>
    <tr bgcolor="#F3F3F3"> 
      <td height="50" colspan="4"> <div align="right"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr> 
              <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>
</body>
</html>
<%
Set CollectConn = Nothing
%>