<%@ Page Language="c#" Inherits="WebApp.operate" CodeBehind="operate.aspx.cs" %>

<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>网站数据备份恢复</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <script language="javascript">
			function openwin(name)
			{
				var arr = showModalDialog("../editor/Dialog/imgFile.htm?directory=banner&name=time&FileId=0", window, "dialogWidth:400px;dialogHeight:150px;help:no;scroll:no;status:no");
				if(arr!=null)
				{
					var module=eval("document.system."+name);
					module.value=arr;		    
				}
			}
			function swf(name)
			{
				var arr = showModalDialog("../editor/Dialog/flashFile.htm?directory=banner&name=time&FileId=0", window, "dialogWidth:400px;dialogHeight:150px;help:no;scroll:no;status:no");
				if(arr!=null)
				{
					var module=eval("document.system."+name);
					module.value=arr;		    
				}
			}
			function showInfoZip(pkId)
			{
				arr = showModalDialog("showInfo.aspx?pkId="+pkId , window,"dialogWidth:25.5em; dialogHeight:23.5em; status:0");
			}
    </script>

    <link href="../../Css/public.css" type="text/css" rel="stylesheet" />
    <link href="../css/adminfunc.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <div class="edit-func-box func-box">
        <div class="hd">
            系统备份</div>
        <form id="system" method="post" runat="server">
        <div class="bd">
            <%--<div class="function-hd">
                <div class="search-box fr">
                </div>
                <!--/search-box-->
                <div class="action-field">
                </div>
                <!--/action-field-->
            </div>--%>
            <asp:DataGrid ID="pageGrid" runat="server" CssClass="list-table" AutoGenerateColumns="False"
                OnItemCommand="pageGrid_ItemCommand">
                <Columns>
                    <asp:BoundColumn DataField="pkId" HeaderText="ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="backupName" HeaderText="名称" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="updatetime" HeaderText="备份时间" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                    <asp:BoundColumn HeaderText="文件大小" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="执    行" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            <asp:LinkButton ID="dell" runat="server" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.backupName") %>'
                                CausesValidation="False" CommandName="del1">删 除</asp:LinkButton>
                            <asp:LinkButton ID="copyy" runat="server" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.backupName") %>'
                                CommandName="copy1" Visible="False">恢复</asp:LinkButton>
                            <asp:HyperLink ID="downBackup" runat="server" NavigateUrl='<%# "./down.aspx?pkId="+DataBinder.Eval(Container, "DataItem.pkId") %>'
                                Target="_blank">下  载</asp:HyperLink>
                            <asp:LinkButton ID="view" runat="server" CommandName="view1">查看信息</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="zipName" HeaderText="zipName" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
        </div>
        <div class="ft">
            <div class="pagination">
            </div>
        </div>
        <table class="edit-table">
            <tr>
                <th width="25%">
                    备份名称：
                </th>
                <td width="75%">
                    <asp:TextBox ID="bannerName" runat="server" Width="152px"></asp:TextBox><asp:Button
                        ID="add" runat="server" Text="备份" OnClick="add_Click"></asp:Button>(注意：本版本暂不提供系统数据恢复功能！)
                </td>
            </tr>
            
            <tr>
            <th>上传备份管理*
                </th>
                <td>
                    <asp:Panel ID="Panel1" runat="server" Visible="False" Width="100%">
                        <table cellspacing="0" cellpadding="0" width="100%" border="0">
                            <tr>
                                <td>
                                    备份名称：
                                    <asp:TextBox ID="uploadName" runat="server" Width="153px"></asp:TextBox>&nbsp;上传备份文件：<input
                                        id="uploadfile" style="width: 362px; height: 20px" type="file" size="41" runat="server">&nbsp;
                                    <asp:Button ID="upload" runat="server" Text="备份" OnClick="upload_Click"></asp:Button>
                                </td>
                            </tr>
                            <tr>
                                <td height="30">
                                    <p>
                                        备份名称：
                                        <asp:TextBox ID="urlName" runat="server" Width="160px"></asp:TextBox>远程抓取备份URL：
                                        <asp:TextBox ID="url" runat="server" Width="296px"></asp:TextBox>
                                        <asp:Button ID="downLoad" runat="server" Text="备份" OnClick="downLoad_Click"></asp:Button></p>
                                </td>
                            </tr>
                            
                        </table>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <th>
                本地备份目录检测*
                </th>
                <td height="30">
                    <asp:Label ID="explain" runat="server" Visible="False" ForeColor="Red">Label</asp:Label><asp:Button
                        ID="auto" runat="server" Text="自动添加" Visible="False" OnClick="auto_Click"></asp:Button>
                </td>
            </tr>
        </table>
        </form>
    </div>
</body>
</html>
