<%@ Page Language="c#" Inherits="WebApp.Admin.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" />
    <link type="text/css" rel="stylesheet" href="../../Css/public.css" />
    <link type="text/css" rel="stylesheet" href="../Css/adminfunc.css" />

    <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, path)
{
arr = showModalDialog(path + "showInfo.aspx?pkId="+pkId , window,"dialogWidth:25.5em; dialogHeight:20.5em; status:0");

}

function showRemark(pkId, isEdit)
{
w=400;
h=240;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no';
window.open("ShowRemark.aspx?pkId="+pkId+"&isEdit="+isEdit ,"" ,settings);

}

function previewTemplate(pkId, path)
{
w=800;
h=500;
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no';
window.open (path + "showTemplatePreview.aspx?pkId="+pkId ,"",settings);
}
    </script>

</head>
<body>
    <form id="system" method="post" runat="server">
    <div class="edit-func-box func-box">
        <div class="hd">主站模板包共享</div>
        <div class="bd">
            <asp:DataGrid ID="pageGrid" runat="server" class="list-table" AutoGenerateColumns="False"
                OnItemCommand="pageGrid_ItemCommand">
                <Columns>
                    <asp:BoundColumn DataField="pkId" HeaderText="ID" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="name" HeaderText="名称" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="说明" HeaderStyle-CssClass="title">
                        <HeaderStyle Width="150px"></HeaderStyle>
                        <ItemTemplate>
                            <asp:LinkButton ID="AddInfoLinkButton" runat="server" Visible="false" CommandName="addInfo">添加说明</asp:LinkButton>
                            <asp:Label ID="InfoLabel" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.remark") %>'
                                ToolTip='<%# DataBinder.Eval(Container, "DataItem.remark") %>'>
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="updatetime" HeaderText="备份时间" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn HeaderText="文件大小" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="type" HeaderText="备份类型" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="zipName" HeaderText="zipName" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="isSystem" HeaderText="是否默认" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn Visible="False" DataField="isSystem" HeaderText="isSystem" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="执 行" HeaderStyle-CssClass="title">
                        <ItemTemplate>
                            &nbsp;
                            <asp:LinkButton ID="EditLinkButton" runat="server" CommandName="edit">编辑</asp:LinkButton>&nbsp;
                            <asp:LinkButton ID="dell" runat="server" CommandName="del1" CausesValidation="False"
                                CommandArgument='<%# DataBinder.Eval(Container, "DataItem.name") %>'>删除</asp:LinkButton>&nbsp;<asp:HyperLink
                                    ID="hyDownToServer" runat="server" NavigateUrl='<%# "./DownToServer.aspx?pkId="+DataBinder.Eval(Container, "DataItem.pkId")+"&name=" + Eval("name") %>'
                                    Target="_blank">获取到本地服务器</asp:HyperLink>&nbsp;<asp:HyperLink ID="downBackup" runat="server"
                                        Target="_blank" NavigateUrl='<%# PathPrefix + "Admin/ShareBackup/down.aspx?pkId="+DataBinder.Eval(Container, "DataItem.pkId") %>'>下载</asp:HyperLink>&nbsp;
                            <asp:LinkButton ID="view" runat="server" CommandName="view1">查看信息</asp:LinkButton>&nbsp;
                            <asp:LinkButton ID="previewTemplate" runat="server" CommandName="previewTemplate1">预览模板</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="type" HeaderText="backuptype" Visible="False" HeaderStyle-CssClass="title"></asp:BoundColumn>
                </Columns>
            </asp:DataGrid>
        </div>
        <div class="ft">
            <div class="pagination">
            </div>
            <!--/action-field-->
        </div>
        <div id="trManage" runat="server">
        <table class="edit-table">
        <tr>
        <td>
        <asp:Panel ID="Panel2" runat="server">
                备份名称：<asp:TextBox ID="uploadName" runat="server" CssClass="input-txt input-txt1"></asp:TextBox>
                上传备份文件：<input id="uploadfile" type="file" runat="server">&nbsp;<asp:Button ID="upload" runat="server" Text="上传备份文件" OnClick="upload_Click" ></asp:Button>
            </asp:Panel>
        </td>
        </tr>
        <tr>
        <td>
        <asp:Label ID="lbName" runat="server" Text="备份名称：" Visible="False"></asp:Label>
            <asp:TextBox ID="txtName" runat="server" Visible="False"></asp:TextBox>
            备份说明：<asp:TextBox ID="InfoTextBox" runat="server" Width="300px" TextMode="MultiLine" Height="50px" CssClass="input-txt"></asp:TextBox>&nbsp;
            <asp:Button ID="EditButton" runat="server" Text="修改" Visible="False" OnClick="EditButton_Click">
            </asp:Button>
        </td>
        </tr>
        <tr>
        <td>
        <asp:Panel ID="Panel3" runat="server">
                <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>
            </asp:Panel>
        </td>
        </tr>
        </table>
        </div>
    </div>
    </form>
</body>
</html>
