<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dbbackuplist.aspx.cs" Inherits="Focus.Admin.dbbackuplist" %>

<%@ Register TagPrefix="cc2" Namespace="Focus.Control" Assembly="Focus.Control" %>
<!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="styles/fntmanager.css" type="text/css" rel="stylesheet">
    <link href="styles/datagrid.css" type="text/css" rel="stylesheet">

    <script type="text/javascript" src="js/common.js"></script>
    
        <script language="javascript" type="text/javascript">

        function Recovery(pathname)
	    {
	        if(confirm("您确定要恢复此备份数据库吗？")) 
	        {
	            document.getElementById('success').style.display = 'block';
	            document.getElementById('Layer5').innerHTML='<BR /><table><tr><td valign=top><img border=0 src=images/ajax_loading.gif  /></td><td valign=middle style=font-size:14px;>正在解压文件, <BR />请稍等...<BR /></td></tr></table><BR />';
	            window.location="?dbback=" + pathname;
	        }
	    }
        
    </script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="Navbutton" style="width: 98%;">
        <table cellspacing="1" cellpadding="4" align="left">
            <tr>
                <td align="left">
                    <input title="选中/取消选中 本页所有Case" onclick="CheckAll(this.form)" type="checkbox" name="chkall"
                        id="chkall" />全选/取消全选
                    <cc2:Button ID="DelRec" runat="server" Text="删除选定" 
                        ButtonImgUrl="images/dell.gif" onclick="DelRec_Click"></cc2:Button>
                    <cc2:Button ID="DbBackup" runat="server" Text="备份当前" 
                        ButtonImgUrl="images/backup.gif" onclick="DbBackup_Click"></cc2:Button>
                </td>
            </tr>
        </table>
    </div>
    <cc2:DataGrid ID="Grid1" runat="server" ColumnSpan="4">
        <Columns>
            <asp:TemplateColumn HeaderText="选择">
                <HeaderStyle Width="5%" />
                <ItemTemplate>
                    <input id="id" onclick="javascript:SH_SelectOne(this)" type="checkbox" value="<%# DataBinder.Eval(Container, "DataItem.id").ToString() %>"
                        name="id" />
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="id" HeaderText="id [递增不重复]" Visible="false"></asp:BoundColumn>
            <asp:BoundColumn DataField="filename" HeaderText="文件名"></asp:BoundColumn>
            <asp:BoundColumn DataField="size" HeaderText="文件大小"></asp:BoundColumn>
            <asp:BoundColumn DataField="createtime" HeaderText="备份日期"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="操作">
                <ItemTemplate>
                    <a href="javascript:Recovery('<%# DataBinder.Eval(Container, "DataItem.filename").ToString()%>')">
                        恢复</a>&nbsp;&nbsp; <a href="downloads.ashx?url=<%=webpath%><%# DataBinder.Eval(Container, "DataItem.fullname").ToString()%>">
                            下载</a>
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
    </cc2:DataGrid>
    </form>
</body>
</html>
