<%@ Control Language="C#" %>
<%@ Import Namespace="Spaces" %>
<%@ Register Assembly="Xiaoxiao.WebUI" Namespace="Xiaoxiao.WebUI" TagPrefix="cc1" %>

<style>
.bvError{margin:0 0 8 0;}
.bvSection{border-style:none;margin-left:0px}
.bvwordwrap{width:100%}
</style>
<cc1:Form runat="server">
    <table class="bvwordwrap" border="0" width="100%" height="247">
        <tr>
            <td valign="top" class="cellstyle">
                <table cellspacing="0" class="pheader" border="0" style="width: 100%;" height="22">
                    <tr>
                        <td class="mod_tlc" width="6" nowrap>&nbsp;
                      </td>
                        <td width="100%" class="modhead">
                            <table cellspacing="0" width="100%" class="fixedTable partheader" style="width: 100%;">
                                <tr>
                                    <td id="" class="bold ellipse partDetail" nowrap>
                                        <div class='ellipse'>
                                            <%=Globals.Text["UpdateDir_ModifyFile"]%></div>
                                    </td>
                                    <td class="partBuffer" align="right" nowrap>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td class="mod_trc" width="6" nowrap>&nbsp;
                      </td>
                    </tr>
                </table>
                <table cellspacing="0" style="width: 100%;" height="22">
                    <tr>
                        <td>
                            <table cellspacing="0" cellpadding="2" width="100%" border="0" class='subnav'>
                                <tbody>
                                    <tr>
                                        <td align="left">
                                            <%=Globals.Text["UpdateDir_FileName"]%></td>
                                        <td align="left">
                                            <asp:Image ID="dirIco" runat="server" style="display:none" /><asp:TextBox ID="txtFolderName" runat="server"
                                               MaxLength="80" Width="250px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <%=Globals.Text["UpdateDir_FileType"]%></td>
                                        <td align="left">
                                            <asp:DropDownList ID="DropFolderType" runat="server" onchange="getSelectValue();"  Width="250px">
                                                <asp:ListItem Selected="true" Value="1">普通</asp:ListItem>
                                                <asp:ListItem Value="2">档案</asp:ListItem>
                                                <asp:ListItem Value="3">图片</asp:ListItem>
                                                <asp:ListItem Value="4">音乐</asp:ListItem>
                                                <asp:ListItem Value="5">网址</asp:ListItem>
                                                <asp:ListItem Value="6">网站</asp:ListItem>
                                            </asp:DropDownList>

                                            <script>
                                function getSelectValue()
                                {
                                document.images['<%=dirIco.ClientID%>'].src='<%=Globals.GetSkinPath() %>/images/icons/'+document.all['<%=DropFolderType.ClientID%>'].value+'.jpg';
                                }
                                            </script>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <%=Globals.Text["UpdateDir_Share"]%></td>
                                        <td align="left">
                                            <asp:DropDownList ID="dropSelectShare" runat="server" onchange="showvisititem()"  Width="250px">
                                                <asp:ListItem Value="0">共享关闭</asp:ListItem>
                                                <asp:ListItem Value="1" Selected="true">共享开放</asp:ListItem>
                                            </asp:DropDownList>

                                            <script>
                                                                                function showvisititem(){
if(document.all['<%=dropSelectShare.ClientID %>'].value =="0" ){ visititem.style.display = "none"; visitpass.style.display = "block";} else{ visititem.style.display = "block";visitpass.style.display = "none"; } };
                                                                              
                                            </script>

                                        </td>
                                    </tr>
                                    <tr style="display: block" id="visititem" name="visititem">
                                        <td align="left">
                                            <%=Globals.Text["UpdateDir_GuessLimit"]%>
                                        </td>
                                        <td align="left">
                                            <asp:DropDownList ID="dropLimits" runat="server"  Width="250px">
                                                <asp:ListItem Value="L" Selected="true">只能浏览</asp:ListItem>
                                                <asp:ListItem Value="LR">允许下载</asp:ListItem>
                                                <asp:ListItem Value="LRC">下载|上传</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr style="display: none" id="visitpass" name="visitpass">
                                        <td align="left">
                                            <%=Globals.Text["UpdateDir_GuessPassword"]%></td>
                                        <td align="left">
                                            <asp:TextBox ID="txtFolderPassword" runat="server"  MaxLength="18"  Width="250px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" valign="top">
                                            <%=Globals.Text["UpdateDir_Note"]%></td>
                                        <td align="left">
                                            <asp:TextBox ID="txtFolderDesc" runat="server"  Width="250px" Rows="3" TextMode="MultiLine"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                        </td>
                                        <td align="left">
                                            <asp:Button ID="btnUpdateFolder" runat="server" Text="完成 >>" />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>

                            <script>

function Init(){
if(document.all['<%=txtFolderPassword.ClientID %>'].value =="" )
{
visitpass.style.display = "none";
visititem.style.display = "block";

document.all['<%=dropSelectShare.ClientID %>'].value="1";
} 
else
{ 
visitpass.style.display = "block";
visititem.style.display = "none";
document.all['<%=dropSelectShare.ClientID %>'].value="0";
}
 }
     Init();                                                                         
                            </script>

                     
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </cc1:Form>
