<%@ page language="C#" autoeventwireup="true" inherits="admin_kztemplet, aoshuosoft" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<!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 runat="server">
    <title>扩展模板</title>
    <link href="admin.css" rel="stylesheet" type="text/css" />
</head>
<body style="font-size:12px;">
    <form id="form1" runat="server">
    <div>
        <asp:Panel ID="ac" runat="server" Height="50px" Width="100%" Visible="false">
            <table class="adminmaintable" border="0" cellpadding="3" cellspacing="1" width="100%">
                <tr>
                    <td style="height: 30px; text-align:center; font-weight:bold;" colspan="2" >
                        <asp:Literal ID="acbt" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td style="width: 89px">
                        模板名称：</td>
                    <td>
                        <asp:TextBox ID="name" runat="server"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="width: 89px">
                        模板文件地址：</td>
                    <td>
                        <asp:TextBox ID="url" runat="server"></asp:TextBox>
                        <asp:Button ID="onedit" runat="server" Text="在线编辑此模板" Visible="false" OnClick="onedit_Click" /></td>
                </tr>
                <tr>
                    <td colspan="2" align="center" style="text-align:center;">
                        <asp:Button ID="add" runat="server" Text="添加" Width="90px" OnClick="add_Click" />
                        <asp:Button ID="edit" runat="server" Text="修改" Width="90px" OnClick="edit_Click"  />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="all" runat="server" Height="50px" Width="100%" Visible="false">
            <asp:GridView ID="GridView1"  OnPageIndexChanging="GridView1_PageIndexChanging"  runat="server" AllowPaging="True" AutoGenerateColumns="False"
                CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="15">
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <Columns>
                    <asp:TemplateField HeaderText="模板名称"><ItemTemplate><a href="kztemplet.aspx?action=edit&id=<%#Eval("id") %>"><%#Eval("name") %></a></ItemTemplate></asp:TemplateField>
                    <asp:BoundField DataField="url" HeaderText="地址" />
                    <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href="kztemplet.aspx?action=edit&id=<%#Eval("id") %>">编辑</a></ItemTemplate></asp:TemplateField>
                    <asp:TemplateField HeaderText="删除"><ItemTemplate><a href="kztemplet.aspx?action=del&id=<%#Eval("id") %>" onclick="return confirm('删除将不可恢复，您真的要删除吗？')">删除</a></ItemTemplate></asp:TemplateField>
                </Columns>
                <RowStyle BackColor="#EFF3FB" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:Literal ID="tj" runat="server"></asp:Literal>
        </asp:Panel>
     <asp:Panel ID="onlinetemplet" runat="server"  Width="100%" Visible="false">
            <table id="mbae" class="adminmaintable" border="0" cellpadding="3" cellspacing="1">
                <tr class="bt">
                    <td colspan="2" style="text-align: center; height: 58px;">
                        &nbsp;编辑模板</td>
                </tr>
                <tr>
                    <td colspan="2" >
                        <FCKeditorV2:FCKeditor ID="content" runat="server" BasePath="~/FCKeditor/" EnableSourceXHTML="true"
                            EnableXHTML="true" Height="400px" >
                        </FCKeditorV2:FCKeditor>
                        </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center">
                        <asp:Button ID="save" runat="server" Text="保存" Width="115px" OnClick="save_Click" OnClientClick="mbac()"/>
                        <asp:Button ID="black" runat="server" Text="返回" Width="115px" OnClick="black_Click" />
                        </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
