<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ImportCampaignPeople.aspx.cs" Inherits="RM.Web.Training.Campaign.InportCampaignPeople" %>

<!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 runat="server">
    <title>TKS - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Bulk_import")%></title>
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/Validator/JValidator.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
        <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
            <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
            <style>
        .file-box { position: relative; width: 400px; margin-top: 0px; }
        .txt { border: 1px solid #cdcdcd; width: 100px; }
        .btn { background-color: #FFF; border: 1px solid #CDCDCD; height: 24px; width: 100px; }
        .file { position: absolute; top: 0; left: 0; height: 24px; filter: alpha(opacity:0); opacity: 0; width: 210px; }
    </style>
</head>
<body onunload="bb()">
    <form id="form1" runat="server">
   <div>
    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ImpTempDown")%>：<a href="DownExcel.ashx" style="color:Blue">Excel<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("PeopleImpTemp")%></a><br /><br />    
    <p class="file-box">
        <input class="btn" type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SelImpFile")%>">
        <input type='text' name="textfield2" id='textfield2' class='txt' />
        <input class="file" type="file" id="file" onchange="document.getElementById('textfield2').value=this.value" name="file" runat="server">                     
    </p>   
    <P style="color:#f00">(导入之后错误记录会存入表内请点确定下载)</P> 
    </div>
        <div class="frmbottom">    
        <asp:LinkButton ID="Save" runat="server" class="l-btn" OnClientClick="return CheckValid();"
            OnClick="Save_Click"><span class="l-btn-left">
            <img src="/Themes/Images/disk.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Save")%></span></asp:LinkButton>        
        <a class="l-btn" href="javascript:void(0)" onclick="bb()"><span class="l-btn-left">
            <img src="/Themes/Images/cancel.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Close")%></span></a>
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function CheckValid() {
        var val = jQuery("#textfield2").val();
        var houzhui = val.substr(val.lastIndexOf(".") + 1);
        if (houzhui != "xls") {
            alert("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UploadFile")%>");
            return false;
        }
    }   

    function bb(){        
            top.main.windowload();                
            OpenClose();  
    }    
</script>