<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true"
    CodeBehind="FileManage.aspx.cs" Inherits="BingoWebsiteCollector.Web.Management.FileManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="right" style="text-align: center; margin-top: 10px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        静态文件管理</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="errorInfo" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="260px">
                                <div align="right">
                                    文件地址（请输入你在浏览器中看见的地址）：</div>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="tbUrl" runat="server" CausesValidation="True" EnableViewState="False"
                                    Width="100%" Wrap="False" />
                                <validation targetid="<%=tbUrl.ClientID%>" targetname="文件地址" type="text" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right">
                                    操作类型：</div>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlOperationType" runat="server">
                                    <asp:ListItem Value="0">编辑</asp:ListItem>
                                    <asp:ListItem Value="1">删除</asp:ListItem>
                                </asp:DropDownList>
                                &nbsp;<asp:LinkButton ID="lbOperate" runat="server" Text="【操作】" OnClientClick="return validateForm()"
                                    OnClick="lbOperate_Click" />
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                    <table width="100%">
                        <tr style="display: <%=fileContent%>">
                            <td align="left">
                                <asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine" Style="display: none"></asp:TextBox>
                                <iframe width="100%" id="fileContent" frameborder="0" height="420px" src="<%=contentPage%>">
                                </iframe>
                            </td>
                        </tr>
                        <tr>
                            <td align="center">
                                <asp:LinkButton ID="lbSave" runat="server" Text="【保存】" Visible="False" OnClick="lbSave_Click"
                                    OnClientClick="getContent();eval(this.attributes['href'].value)" />
                                &nbsp;<asp:LinkButton ID="lbCancel" runat="server" Text="【取消】" Visible="False" OnClick="lbCancel_Click" />
                                <script type="text/javascript">
                                    function getContent() {
                                        var doc = fileContent.contentWindow;
                                        if (doc == undefined) {
                                            doc = fileContent;
                                        }
                                        document.getElementById("<%=tbContent.ClientID %>").value = doc.getContent();
                                    }
                                </script>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear">
    </div>
    <div class="clear" style="margin-top: 10px;">
    </div>
</asp:Content>
