<%@ page language="C#" autoeventwireup="true" inherits="Admin_Admin_TemProjectInstall, mallz" enableEventValidation="false" %>

<!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>安装方案</title>
<style type="text/css">
    body{
       font-size:12px;
    }
    a{
        color: #000000;
        text-decoration: none;
    }
    a:active{
        color: #000000;
        text-decoration: none;
        color:#FFFFFF;
        background-color:#27004F;
    }
    .upbt{
        cursor: pointer;
        width:18px;
        height:18px;
    }
    .upbt2{
        cursor: pointer;
        border: thin outset #FFFFFF;
        width:18px;
        height:18px;
    }
    .floer {
        cursor: pointer;
    }
    .floer2 a{
        cursor: pointer;
        background-color:#919191;
    }
    .filel{
        cursor: pointer;
    }
</style>
<script type="text/javascript" language="javascript">
var DefaultPath = "<%=DefaultPath %>";
var DefaultFiler = "";
var style = 0;//"<%=style %>";

function Clickfile(fnamepath){
    if(fnamepath!=""){
        document.getElementById("filename").value = fnamepath;
        document.getElementById("OK").value = "安 装";
        ClearDefaultFiler();
    }
}
function ClearDefaultFiler(){
    DefaultFiler = "";
}
function dbClickfile(fnamepath){
    if(fnamepath!=""){
        Clickfile(fnamepath);
        selectFile();
    }
}
function Clickfiler(fnamepath){
    if(fnamepath!=""){
        document.getElementById("OK").value = "打 开";
        DefaultFiler = fnamepath;       
    }
}
function infiler(fnamepath){
    if(fnamepath!=""){       
        window.location.href="?style="+style+"&path=" +fnamepath+"&rnd="+Math.random();
    }else{
        document.location.href="?style="+style;
    }
}
function selectFile(){
    if(DefaultFiler!=""){
        document.location.href="?style="+style+"&path=" + DefaultPath + "\\" + DefaultFiler;
    }else if(document.getElementById("filename").value!=""){
        if(DefaultPath.substr(0,1)=="/" || DefaultPath.substr(0,1)=="\\"){
            DefaultPath2 = DefaultPath.substr(1,(DefaultPath.length-1));
        }else{
            DefaultPath2 = DefaultPath;
        }
        document.getElementById("filename").value = DefaultPath2 + "\\" + document.getElementById("filename").value;
        //window.close();
        return true;
    }else{
        alert("请选择文件！");
        return false;
    }
}

function showhidden(){
    if(document.getElementById("file_leftdiv").style.display=="none"){
        document.getElementById("file_leftdiv").style.display="";
        document.getElementById("file_maindiv").style.width = "280px";
        document.getElementById("file_topdiv").style.display="none";
        document.getElementById("file_bar").innerHTML = "&lt;";
        style = "1";
    }else{
        document.getElementById("file_leftdiv").style.display="none";
        document.getElementById("file_maindiv").style.width = "420px";
        document.getElementById("file_topdiv").style.display="";
        document.getElementById("file_bar").innerHTML = "&gt;";
        style = "0";
    }
}

function selectshow(){
if(style=="0"){
    document.getElementById("file_leftdiv").style.display="none";
    document.getElementById("file_topdiv").style.display="";
    document.getElementById("file_maindiv").style.width = "420px";
}else{
    document.getElementById("file_leftdiv").style.display="";
    document.getElementById("file_topdiv").style.display="none";
    document.getElementById("file_maindiv").style.width = "280px";
}
}
</script>
</head>
<body style="background-color:Menu;">
    <form id="form1" runat="server">
    <div style="padding:5px 5px 5px 0;">
        <div id="file_topdiv" style="width:100%;">
           <div style="float:left; height:25px; width:70px; text-align:right; line-height:25px;">查找范围：</div>
           <div style="float:left;">
               <asp:DropDownList ID="FileList" runat="server" >
               <asp:ListItem Text="当前方案路径" Value=""></asp:ListItem>
               </asp:DropDownList>
           </div>
           <div style="float:left;">&nbsp;&nbsp;<asp:Label ID="conlist" runat="server"></asp:Label></div>
        </div>
        <div style="width:100%;">
            <div id="file_leftdiv" style="float:left; width:150px;">
                <div style="overflow:auto; padding:5px; width:90%; height:290px; border: thin inset #ffffff; background-color:#FFFFFF;">
                <asp:Literal ID="RootList" runat="server"></asp:Literal>
                </div>
            </div>
            <div style="float:left; width:10px;"><br/><br/><br/><br/><br/><br/><br/><br/><br/><a id="file_bar" href="javascript:void(0)" onclick="return showhidden()">&lt;</a></div>
            <div style="float:left; width:auto;">
                <div id="file_maindiv" style="overflow:auto; padding:5px; width:280px; height:250px; border: thin inset #ffffff; background-color:White;">
                    <asp:Literal ID="FileNamelist" runat="server"></asp:Literal>
                </div>
                <div style="height:25px; padding:5px 0 0 0px;">
                    <div style="display:;" >文件名：<asp:TextBox runat="server" ID="filename"  />&nbsp;
                    <input value="Install" type="hidden" name="action" />
                    <asp:Button runat="server" OnClientClick="return selectFile()" ID="OK" Text="安 装" OnClick="InstallButton_OnClick" />&nbsp;
                    <input type="button" value="取 消" onclick="window.close();" /></div>
                </div>
            </div>
        </div>
    </div>
    </form>
    <script type="text/javascript" language="javascript">
        selectshow();
    </script>
</body>
</html>
