<%@ Page Language="C#" AutoEventWireup="true" Inherits="System_SqlWebAdmin_BackupDataBase, QianboCMS" 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>
    <title>备份网站数据库</title>
    <link href="../Css/layout.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../../Scripts/Common.js"></script>
</head>

<body>
    <form id="WebForm1" method="post" runat="server" enctype="multipart/form-data">
        <table cellspacing="1" cellpadding="0" class="wzdh" align="center">
            <tr>
                <td class="wzlist">
					您现在的位置：<a href="../SystemInfo.aspx">后台管理</a> &gt;&gt; 备份网站数据库
					<asp:Literal ID="LitNav" runat="server"></asp:Literal>
				</td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="1" class="border" align="center">
            <tr class="title">
                <td colspan="2">备份网站数据库</td>
            </tr>
            <tr>
                <td class="bqleft">备份路径：</td>
                <td class="bqright">
                    <asp:TextBox ID="txtBackPath" runat="server" Width="180px" EnableViewState="False" onfocus="this.blur();"></asp:TextBox>
                    <asp:Button ID="btnShowBakFile" runat="server" CssClass="btn" OnClick="btnShowBakFile_Click" OnClientClick="this.form.submit();this.value='操作执行中…';this.disabled=true" UseSubmitBehavior="False" Text="查看备份文件" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtBackPath" Display="Dynamic" EnableViewState="False" ErrorMessage="数据库备份目录不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" Display="Dynamic" runat="server" ControlToValidate="txtBackPath" EnableViewState="False" ErrorMessage="数据库备份目录仅允许英文字符、数字、'_'、'/'字符" ValidationExpression="^\/?\w*\/?"></asp:RegularExpressionValidator>
				</td>
            </tr>
            <tr>
                <td class="bqleft">备份文件名：</td>
                <td class="bqright">
                    <asp:TextBox ID="txtBakFileName" runat="server" Width="274px" EnableViewState="False"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtBakFileName" Display="Dynamic" EnableViewState="False" ErrorMessage="数据库备份文件名不能为空"></asp:RequiredFieldValidator>
				</td>
            </tr>
            <tr>
                <td class="bqleft"></td>
                <td class="bqright">
                    <asp:Button runat="server" ID="backupButton" CssClass="btn" Text="备份网站数据库" OnClick="backupButton_Click" OnClientClick="this.form.submit();this.value='操作执行中…';this.disabled=true" UseSubmitBehavior="False"></asp:Button>
                    <asp:Label ID="lblMessage" runat="server"></asp:Label>
                    <asp:Label ID="backSuccessLabel" runat="server" Visible="False" ForeColor="Green"></asp:Label>
                    <asp:Label ID="backErrorLabel" runat="server" Visible="False" ForeColor="Red"></asp:Label>
				</td>
            </tr>
        </table>
        <br />
        <asp:Panel ID="panBakList" runat="server">
            <table cellpadding="0" cellspacing="1" class="border" align="center">
                <asp:Repeater ID="repFile" runat="server">
                    <HeaderTemplate>
                        <tr class="title">
                            <td>备份文件名</td>
                            <td width="120px">文件大小</td>
                            <td width="180px">备份时间</td>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr class="tdbg">
                            <td align="left" style="padding-left: 5px;"><%#Eval("Name")%></td>
                            <td><%#Eval("Size")%></td>
                            <td><%#Eval("UpdateTime")%></td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </asp:Panel>
    </form>
    <br />
</body>
</html>