<% 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,UpdateConn,Conn
Set DBC = New DataBaseClass
DBC.ConnStr = "DBQ=" + server.mappath("FooSunData/Update.mdb") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set UpdateConn = 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"),"P1406") then Call ReturnError1()
'判断权限结束
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据转移</title>
</head>
<link href="inc/Collect.css" rel="stylesheet">
<body topmargin="0" leftmargin="0" oncontextmenu="return false;">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr bgcolor="#E4E4E4"> 
    <td height="30" background="images/Collect_bg.gif"><font color="#FF0000"><strong>数据转移</strong></font></td>
  </tr>
  <tr> 
    <td valign="top"> <table width="100%" height="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#cccccc">
        <tr bgcolor="#F3F3F3"> 
          <td width="15%" height="30"> <div align="left">数据转移规则 </div></td>
          <td height="30"> <div align="center"> 
              <select style="width:100%;" onChange="ShowDescription(this);" name="MoveDataRuleList">
                <%
			  Dim RsUpdateObj,OptionStr
			  Set RsUpdateObj = UpdateConn.Execute("Select * from DBSO")
			  do while Not RsUpdateObj.Eof
			  	if RsUpdateObj("SourceDBType") = 1 then
					OptionStr = RsUpdateObj("SServer") & ":" & RsUpdateObj("SourceDB") & ":" & RsUpdateObj("SUser") & ":" & RsUpdateObj("SPassWord")
				else
					OptionStr = RsUpdateObj("SServer")
				end if
			  	if RsUpdateObj("ObjectDBType") = 1 then
					OptionStr = OptionStr & "===>" & RsUpdateObj("OServer") & ":" & RsUpdateObj("ObjectDB") & ":" & RsUpdateObj("OUser") & ":" & RsUpdateObj("OPassWord")
				else
					OptionStr = OptionStr & "===>" & RsUpdateObj("OServer")
				end if
			  %>
                <option value="<% = RsUpdateObj("MainID") %>" Description="<% = RsUpdateObj("Description") %>"> 
                <% = OptionStr %>
                </option>
                <%
			  	RsUpdateObj.MoveNext
			  Loop
			  Set RsUpdateObj = Nothing
			  %>
              </select>
            </div></td>
        </tr>
        <tr bgcolor="#F3F3F3"> 
          <td height="30">描述</td>
          <td height="30" id="ShowDescriptionArea">&nbsp;</td>
        </tr>
        <tr bgcolor="#F3F3F3"> 
          <td height="30" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td>删除源数据库数据 
                  <input name="DelSource" type="checkbox" id="DelSource" value="1"></td>
              </tr>
            </table></td>
        </tr>
        <tr bgcolor="#F3F3F3"> 
          <td height="30" colspan="2"> <div align="center"> 
              <input type="button" name="BtnStart" onClick="StartMoveDat();" value=" 开 始 ">
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
              <input type="button" name="Submit2" onClick="location.href='MoveDataManage.asp';" value=" 停 止 ">
            </div></td>
        </tr>
        <tr valign="top" bgcolor="#F3F3F3"> 
          <td colspan="2" id="ShowInfoArea" bgcolor="#FFFFFF"></td>
        </tr>
      </table></td>
  </tr>
</table>
<iframe id="MoveDataFrame" frameborder="1" src="MoveData.asp" width="0" height="0"></iframe>
</body>
</html>
<%
Set UpdateConn = Nothing
Set Conn = Nothing
%>
<script language="JavaScript">
function StartMoveDat()
{
	var DelSourceFlag=0;
	if (document.all.DelSource.checked==true) DelSourceFlag='1';
	else DelSourceFlag='0';
	if (document.all.MoveDataRuleList.value!='')
	{
		document.all.ShowInfoArea.innerHTML='';
		document.all.BtnStart.disabled=true;
		frames["MoveDataFrame"].location='MoveData.asp?MainID='+document.all.MoveDataRuleList.value+'&DelSource='+DelSourceFlag;
	}
}
function MoveDataEndFun()
{
	document.all.BtnStart.disabled=false;
}
function AddShowInfo(Str,Flag) //Flag为True，则添加信息到头部，Flag为False，则添加信息到末尾
{
	if (Flag) document.all.ShowInfoArea.innerHTML=Str+document.all.ShowInfoArea.innerHTML;
	else  document.all.ShowInfoArea.innerHTML=document.all.ShowInfoArea.innerHTML+Str;
}
ShowDescription(document.all.MoveDataRuleList);
function ShowDescription(Obj)
{
	if (Obj.options.length<=0) return;
	var Str=Obj.options(Obj.selectedIndex).Description;
	if (Str!=null)	document.all.ShowDescriptionArea.innerHTML=Str;
	else document.all.ShowDescriptionArea.innerHTML='';
}
</script>