<!--#include file="conn/hl_conn.asp"-->
<!--#include file="inc/hl_manage.inc"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>数据转移数据库设置</title>
<style type="text/css">
.STYLE1 {color: #FF0000}
body,td,th {
	font-size: 13px;
}
.STYLE2 {
	color: #000000;
	font-weight: bold;
}
-->
</style>
</head>
<%
Dim FromType,ToType,Transfer_Table_name,other_userid,other_username,DataType,AcData_Path
Dim Data_Name,Data_user,Data_Pass,AcToData_Path,DataTo_Source,DataTo_Name,DataTo_user
Dim DataTo_Pass,Data_Source,jumpuser,ID_Auto,md5_size
set rs=server.CreateObject("Adodb.recordset")
sql="select * from hl_transfer_set where id="&replace(request("Transfer_id"),"'","")
rs.open sql,conn,1,1
DataChannelID=rs("id")
FromType=rs("FromType")
ToType=rs("ToType")
Transfer_Table_name=rs("Transfer_Table_name")
other_userid=rs("other_userid")
other_username=rs("other_username")
DataType=rs("DataType")
DataToType=rs("DataToType")
AcData_Path=rs("AcData_Path")
Data_Name=rs("Data_Name")
Data_user=rs("Data_user")
Data_Pass=rs("Data_Pass")
AcToData_Path=rs("AcToData_Path")
DataTo_Source=rs("DataTo_Source")
DataTo_Name=rs("DataTo_Name")
DataTo_user=rs("DataTo_user")
DataTo_Pass=rs("DataTo_Pass")
Data_Source=rs("Data_Source")
jumpuser=rs("jumpuser")
ID_Auto=rs("ID_Auto")
md5_size=rs("md5_size")
rs.close
set rs=nothing
%>
<body>
<table width="88%" border="1"  align="center" cellpadding="2" cellspacing="0" bordercolor="#A0D3FE" bgcolor="#EEF9FD" style="BORDER-COLLAPSE: collapse">
  <form action="Admin_Data_Transfer.asp" method="post" name="Data_Transfer" id="Data_Transfer">
    <input name="action" type="hidden" value="go2" />
	<input name="T_type" type="hidden" value="modify" />
	<input name="DataChannelID" type="hidden" value=<%=DataChannelID%> />
    <tr>
      <td colspan="3"><strong> 1、选择转移数据的源系统和目的系统(<span class="STYLE1">请先查看数据库要转移的表的表名和表里的ID字段名</span>)</strong></td>
    </tr>
    <tr>
      <td colspan="3"><table width="100%">
        <tr>
          <td colspan="2"><label>请选择<span class="STYLE1">源</span>系统 </label></td>
          <td>请选择<span class="STYLE1">目标</span>系统
            <label></label></td>
          <td width="22%">转移数据库表名</td>
          <td width="20%">表ID字段名</td>
          <td width="25%">表UserName字段名</td>
        </tr>
        <tr>
          <td colspan="2"><select name="FromType" id="FromType">
            <% 
          set hl_rs=server.CreateObject("Adodb.recordset")
              hl_sql="select * from hl_config where hl_open=1"
			  hl_rs.open hl_sql,conn,1,1
			  if FromType="0" then
			  response.Write "<option value=0 selected>恒浪V4.0系统</option>"
			  end if
			  do while not hl_rs.eof
			  if cint(FromType)=hl_rs("id") then
			    response.Write "<option value="&hl_rs("id")&" selected>"&hl_rs("hl_name")&"</option>"
				else 
			     response.Write "<option value="&hl_rs("id")&">"&hl_rs("hl_name")&"</option>"
			  end if 
			  hl_rs.movenext
			  loop
			  hl_rs.close
			  set hl_rs=nothing
		  %>
          </select>
		 </td>
          <td width="17%"><select name="ToType" id="ToType">
            <%
              set hl_rs=server.CreateObject("Adodb.recordset")
              hl_sql="select * from hl_config where hl_open=1"
			  hl_rs.open hl_sql,conn,1,1
			  do while not hl_rs.eof
			  if hl_rs("id")=cint(ToType) then
			  response.Write "<option value="&hl_rs("id")&" selected>"&hl_rs("hl_name")&"</option>"
			  else 
			  response.Write "<option value="&hl_rs("id")&">"&hl_rs("hl_name")&"</option>"
			  end if
			  hl_rs.movenext
			  loop
			  if ToType="0" then
			  response.Write "<option value=0 selected>恒浪V4.0系统</option>"
			  else
			  response.Write "<option value=0>恒浪V4.0系统</option>"
			  end if
			  hl_rs.close
			  set hl_rs=nothing
		  %>
          </select></td>
          <td>如:PE_User
            <input name="Transfer_Table_name" type="text" id="Transfer_Table_name" size="12" value="<%=Transfer_Table_name%>"/></td>
          <td><label>如userid
            <input name="other_userid" type="text" id="other_userid" size="12" value="<%=other_userid%>"/>
          </label></td>
          <td>如UserName
            <input name="other_username" type="text" id="other_username" size="12" value="<%=other_username%>"/></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="3"><table width="100%">
        <tr bgcolor="#ffffff"></tr>
        <tr>
          <td colspan="3"><strong>2、选择数据库类型及数据库相对路径</strong></td>
        </tr>
        <tr>
          <td width="20%" colspan="3" bgcolor="#EEF9FD"><span class="STYLE1">源数据库</span>类型：
            <input name="DataType" type="radio" onclick="AcData.style.display='none',SqlData.style.display=''" value="1" <%if DataType="1" then%>checked<%end if %>/>
            MS SQL
            <input type="radio" value="0" name="DataType" onclick="SqlData.style.display='none',AcData.style.display=''" <%if DataType="0" then%>checked<%end if %>/>
            ACCESS</td>
        </tr>
        <tr  bgcolor="#ffffff">
          <td colspan="3"><div id="AcData" <%if DataType="0" then%>style="display:'';"<%else%>style="display:none;"<%end if%>>
            <table width="88%" border="1"  align="center" cellpadding="2" cellspacing="0" bordercolor="#A0D3FE" bgcolor="#EEF9FD" style="BORDER-COLLAPSE: collapse">
              <tr bgcolor="#ffffff">
                <td width="20%">数据库路径：</td>
                <td width="80%"><input type="text" name="AcData_Path" size="40" value="<%=AcData_Path%>"/></td>
              </tr>
            </table>
          </div>
                <div id="SqlData" <%if DataType="1" then%>style="display:'';"<%else%>style="display:none;"<%end if%>>
                  <table width="88%" border="1"  align="center" cellpadding="2" cellspacing="0" bordercolor="#A0D3FE" bgcolor="#EEF9FD" style="BORDER-COLLAPSE: collapse">
                    <tr  bgcolor="#ffffff">
                      <td width="20%">数据库服务器：</td>
                      <td width="80%"><input type="text" name="Data_Source" size="20" value="<%=Data_Source%>"/></td>
                    </tr>
                    <tr  bgcolor="#ffffff">
                      <td>数据库名称：</td>
                      <td><input type="text" name="Data_Name" size="20" value="<%=Data_Name%>"/></td>
                    </tr>
                    <tr  bgcolor="#ffffff">
                      <td>登陆帐号：</td>
                      <td><input type="text" name="Data_user" size="20" value="<%=Data_user%>"/></td>
                    </tr>
                    <tr  bgcolor="#ffffff">
                      <td>登陆密码：</td>
                      <td><input type="text" name="Data_Pass" size="20" value="<%=Data_Pass%>"/></td>
                    </tr>
                  </table>
                </div></td>
        </tr>
      </table>
          <table width="100%">
            <tr bgcolor="#ffffff">
              <td width="20%" colspan="2" bgcolor="#EEF9FD"><span class="STYLE1">目的数据库</span>类型：
                <input type="radio" value="1" name="DataToType" onclick="AcToData.style.display='none',SqlToData.style.display=''" <%if DataToType="1" then%>checked<%end if %>/>
                MS SQL
                <input type="radio" value="0" name="DataToType" onclick="SqlToData.style.display='none',AcToData.style.display=''" <%if DataToType="0" then%>checked<%end if %>/>
              ACCESS</td>
            </tr>
            <tr  bgcolor="#ffffff">
              <td colspan="2"><div id="AcToData"  <%if DataToType="0" then%>style="display:'';"<%else%>style="display:none;"<%end if%>>
                  <table width="88%" border="1"  align="center" cellpadding="2" cellspacing="0" bordercolor="#A0D3FE" bgcolor="#EEF9FD" style="BORDER-COLLAPSE: collapse">
                    <tr bgcolor="#ffffff">
                      <td width="20%">数据库路径：</td>
                      <td width="80%"><input type="text" name="AcToData_Path" size="40" value="<%=AcToData_Path%>"/></td>
                    </tr>
                  </table>
              </div>
                  <div id="SqlToData" <%if DataToType="1" then%>style="display:'';"<%else%>style="display:none;"<%end if%>>
                    <table width="88%" border="1"  align="center" cellpadding="2" cellspacing="0" bordercolor="#A0D3FE" bgcolor="#EEF9FD" style="BORDER-COLLAPSE: collapse">
                      <tr  bgcolor="#ffffff">
                        <td width="20%">数据库服务器：</td>
                        <td width="80%"><input type="text" name="DataTo_Source" size="20" value="<%=DataTo_Source%>"/></td>
                      </tr>
                      <tr  bgcolor="#ffffff">
                        <td>数据库名称：</td>
                        <td><input type="text" name="DataTo_Name" size="20" value="<%=DataTo_Name%>"/></td>
                      </tr>
                      <tr  bgcolor="#ffffff">
                        <td>登陆帐号：</td>
                        <td><input type="text" name="DataTo_user" size="20" value="<%=DataTo_user%>"/></td>
                      </tr>
                      <tr  bgcolor="#ffffff">
                        <td>登陆密码：</td>
                        <td><input type="text" name="DataTo_Pass" size="20" value="<%=DataTo_Pass%>"/></td>
                      </tr>
                    </table>
                  </div></td>
            </tr>
        </table></td>
    </tr>
	<tr>
      <td colspan="3"><span class="STYLE2">3、遇到相同用户名的处理方式：</span>
        <input type="radio" name="jumpuser" value="1" <%if jumper=1 then%>checked="checked"<%end if%>/>
用户名加随机数字
<input type="radio" name="jumpuser" value="0" <%if jumper=0 then%>checked="checked"<%end if%> />
跳过 </td>
    </tr>
    <tr>
      <td colspan="3"><strong>4、如果目标系统<span class="STYLE1">ID字段不是自动增加</span>的请勾先</strong>
          <input type="checkbox" name="ID_Auto" value="1" <%if ID_Auto=1 then %>checked<%end if%>/> 
          打开目标系统数据库用户字段的ID看是不是有“自动编号”没就打勾      </td>
    </tr>
    <tr>
      <td colspan="3"><strong>5、请填写该系统所采用的MD5加密位数</strong>
          <label>
          <input name="md5_size" type="text" id="md5_size" value="<%=md5_size%>" size="4" />
          </label>
        只能是16或者是32 </td>
    </tr>
    <tr>
      <td colspan="3" align="center"><input name="action2" type="button" value="返回上一步" onclick="window.history.back()" />
          <input name="submit2" type="submit" value="点击进入下一步" /></td>
    </tr>
  </form>
</table>
</body>
</html>
