<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DbImport_Edit.aspx.cs" Inherits="TotCms.Web.Admin.DbImport_Edit" %>

<%@ Register src="UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>

<!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 id="Head1" runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>数据库采集</title>
    <link href="style/global.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
      <uc1:main_top ID="main_top1" runat="server" />
    
    </div>
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="black_border">
      <tr class="suphead">
        <td>
                                                                                数据库采集</td>
    </tr>
    <tr>
      <td align="center">
        
        <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" 
          FinishCompleteButtonText="完成" FinishPreviousButtonText="上一步" 
          StartNextButtonText="下一步" StepNextButtonText="下一步" 
          StepPreviousButtonText="上一步" DisplaySideBar="False" 
          onfinishbuttonclick="Wizard1_FinishButtonClick" 
          onnextbuttonclick="Wizard1_NextButtonClick" Width="50%">
          <WizardSteps>
            <asp:WizardStep ID="WizardStep1" runat="server" title="Step 1">
              <table>
                <tr>
                  <td align="left">
                    &nbsp;数据库类型：</td>
                  <td align="left">
                    <asp:DropDownList ID="db_type" runat="server">
                      <asp:ListItem Value="0">Access</asp:ListItem>
                      <asp:ListItem Value="1">Sqlserver</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                  </td>
                </tr>
                <tr>
                  <td align="left">
                    数据库地址：</td>
                  <td align="left">
                    <asp:TextBox ID="db_host" runat="server"></asp:TextBox>
                  </td>
                </tr>
                <tr>
                  <td align="left">
                    数据库名称：</td>
                  <td align="left">
                    <asp:TextBox ID="db_name" runat="server"></asp:TextBox>
                  </td>
                </tr>
                <tr>
                  <td align="left">
                    用户名：</td>
                  <td align="left">
                    <asp:TextBox ID="db_username" runat="server"></asp:TextBox>
                  </td>
                </tr>
                <tr>
                  <td align="left">
                    &nbsp;连接密码：</td>
                  <td align="left">
                    <asp:TextBox ID="db_password" runat="server"></asp:TextBox>
                    &nbsp;
                  </td>
                </tr>
                <tr>
                  <td align="left">
                    &nbsp;</td>
                  <td align="left">
                    <asp:Button ID="TestConn" runat="server" OnClick="TestConn_Click" Text="测试连接" />
                  </td>
                </tr>
                <tr>
                  <td align="left" colspan="2">
                    说明：如果要采集Access数据库，只需要设置数据库地址为Access库所在服务器物理路径即可(如F:\totcms.mdb)。如果采集Mssql数据库，需要设置数据库地址(数据库所在服务器IP或主机名)、数据库名称、用户名、连接密码)。</td>
                </tr>
              </table>
            </asp:WizardStep>
            <asp:WizardStep ID="WizardStep2" runat="server" title="Step 2">
              <table cellspacing="2" cellpadding="2" bgcolor="#f5f5f5" border="0">
                <tr>
                  <td align="left" bgcolor="White">
                    选择表：</td>
                  <td align="left" bgcolor="White">
                    <asp:DropDownList ID="db_table" runat="server" AutoPostBack="True" 
                      OnSelectedIndexChanged="db_table_SelectedIndexChanged">
                    </asp:DropDownList>
                  </td>
                </tr>
                <tr>
                  <td align="left" bgcolor="White">
                    自定义查询：</td>
                  <td align="left" bgcolor="White">
                    <asp:TextBox ID="db_sql" runat="server" TextMode="MultiLine" 
                      CssClass="text_normal"></asp:TextBox>
                  </td>
                </tr>
                <tr>
                  <td align="left" bgcolor="White">
                    字段映射：</td>
                  <td align="left" bgcolor="White">
                    <table bgcolor="#66CCFF">
                      <tr>
                        <td align="center" rowspan="3">
                          <asp:ListBox ID="MapItem" runat="server" Rows="10" CssClass="style2"></asp:ListBox>
                          <br />
                          <asp:Button ID="delmap" runat="server" OnClick="delmap_Click" Text="删除映射" />
                        </td>
                        <td>
                          源&nbsp; 字&nbsp; 段：<asp:DropDownList ID="o_field" runat="server">
                          </asp:DropDownList>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          目标字段： 
                          <asp:DropDownList ID="t_field" runat="server">
                            <asp:ListItem Value="Title">Title</asp:ListItem>
                            <asp:ListItem Value="SubHeading">SubHeading</asp:ListItem>
                            <asp:ListItem Value="TitleColor">TitleColor</asp:ListItem>
                            <asp:ListItem Value="KeyWords">KeyWords</asp:ListItem>
                            <asp:ListItem Value="RelateKey">RelateKey</asp:ListItem>
                            <asp:ListItem Value="RelateNum">RelateNum</asp:ListItem>
                            <asp:ListItem Value="Content">Content</asp:ListItem>
                            <asp:ListItem Value="ParentId">ParentId</asp:ListItem>
                            <asp:ListItem Value="SpecialId">SpecialId</asp:ListItem>
                            <asp:ListItem Value="Top1">Top1</asp:ListItem>
                            <asp:ListItem Value="ToTop">ToTop</asp:ListItem>
                            <asp:ListItem Value="ToHot">ToHot</asp:ListItem>
                            <asp:ListItem Value="Recommend">Recommend</asp:ListItem>
                            <asp:ListItem Value="Images">Images</asp:ListItem>
                            <asp:ListItem Value="IsSlide">IsSlide</asp:ListItem>
                            <asp:ListItem Value="Checked">Checked</asp:ListItem>
                            <asp:ListItem Value="Author">Author</asp:ListItem>
                            <asp:ListItem Value="SourceFrom">SourceFrom</asp:ListItem>
                            <asp:ListItem Value="Editor">Editor</asp:ListItem>
                            <asp:ListItem Value="Photo">Photo</asp:ListItem>
                            <asp:ListItem Value="Hits">Hits</asp:ListItem>
                            <asp:ListItem Value="ModiTime">ModiTime</asp:ListItem>
                            <asp:ListItem Value="ModDate">ModDate</asp:ListItem>
                          </asp:DropDownList>
                        </td>
                      </tr>
                      <tr>
                        <td>
                          <asp:Button ID="BtnAddMap" runat="server" OnClick="BtnAddMap_Click" 
                            Text="&lt;&lt;添加映射" />
                        </td>
                      </tr>
                      
                    </table>
                  </td>
                </tr>
                <tr>
                        <td bgcolor="White" align="left">
                          采集到栏目：</td>
                        <td bgcolor="White" align="left">
                          <asp:TextBox ID="CategoryId" runat="server"></asp:TextBox>  (栏目ID)
                        </td>
                      </tr>
                      <tr>
                        <td bgcolor="White" align="left">
                          选择文章模板：</td>
                        <td bgcolor="White" align="left">
                          <asp:DropDownList ID="templateid" runat="server">
                          </asp:DropDownList>
                        </td>
                      </tr>
              </table>
            </asp:WizardStep>
          </WizardSteps>
          <HeaderTemplate>
            
          </HeaderTemplate>
        </asp:Wizard>
      </td>
    </tr>
    <tr>
      <td align="center">
        
        &nbsp;</td>
    </tr>
  </table>
    </form>
</body>
</html>
