<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="html.aspx.cs" Inherits="Oykx.admin.html" %>

<!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 id="Head1" runat="server">
    <title>DIV页面 -
        <%=Resources.zhouxiang.adminTitle %></title>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <link href="editor/themes/default/default.css" rel="stylesheet" type="text/css" />

    <script src="js/jQuery.v1.4.2.js" type="text/javascript"></script>

    <script src="editor/kindeditor.js" charset="utf-8" type="text/javascript"></script>

    <script src="editor/plugins/code/prettify.js" type="text/javascript"></script>

    <link href="editor/plugins/code/prettify.css" rel="stylesheet" type="text/css" />

    <script src="editor/lang/zh_CN.js" type="text/javascript"></script>

    <script>
        KindEditor.ready(function(K) {
            var editor1 = K.create('#editor_id', {
                cssPath: 'editor/plugins/code/prettify.css',
                uploadJson: 'editor/upload_json.ashx',
                fileManagerJson: 'editor/file_manager_json.ashx',
                allowFileManager: true,
                afterCreate: function() {
                    var self = this;
                    K.ctrl(document, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function() {
                        self.sync();
                        K('form[name=example]')[0].submit();
                    });
                }
            });
            prettyPrint();
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    DIV页面
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                    
                    <asp:GridView ID="GridView_div" runat="server" Width="100%" 
                        AutoGenerateColumns="False" DataSourceID="ObjectData_DIV" 
                        onrowdatabound="GridView_div_RowDataBound" 
                        onrowcommand="GridView_div_RowCommand" AllowPaging="True">
                        <Columns>
                            <asp:TemplateField HeaderText="网页ID" SortExpression="DID">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("DID") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("DID") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="网页标题" SortExpression="Title">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="编辑" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="false" 
                                        CommandName="ed" ImageUrl="~/admin/image/edit.png" Text="编辑" CommandArgument='<%# Bind("DID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="false" 
                                        CommandName="del" ImageUrl="~/admin/image/del.png" Text="删除"  CommandArgument='<%# Bind("DID") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    
                </td>
            </tr>
        </table>
    </div>
    <div style=" height:5px;">&nbsp;</div>
    <div>
     <table cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="td_title">
                    <asp:Label ID="lblbiaoti" runat="server" Text="添加页面"></asp:Label>
                &nbsp;</td>
            </tr>
            <tr>
                <td class="tableTd">
                 <textarea id="editor_id" runat="server" name="content" style="width: 100%; height: 100px;"></textarea>
                </td>
            </tr>
            <tr>
                <td class="tableTd">
                
                    <asp:Label ID="lbldqID" runat="server" Text="当前ID:" Visible="False"></asp:Label>
                    <asp:Label ID="lblID" runat="server" style="color: #FF0000; font-weight: 700" 
                        Visible="False"></asp:Label>
&nbsp;
                
                    网页标题:<asp:TextBox ID="txttitle" runat="server"></asp:TextBox>
&nbsp;&nbsp;
                    <asp:Button ID="Button1" runat="server" Text="提交" onclick="Button1_Click" />
                
                &nbsp;
                    <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="取消" 
                        Visible="False" />
                
                </td>
            </tr>
        </table>
    </div>
    
    <asp:ObjectDataSource ID="ObjectData_DIV" runat="server" SelectMethod="get" 
        TypeName="OykxBLL.DIVManager">
    </asp:ObjectDataSource>
     <div style=" height:5px;">&nbsp;</div>
     <table width="100%">
     <tr>
                <td class="td_title" colspan="2">
                    友情提示</td>
            </tr>
            <tr>
                <td class="tableTd" colspan="2">
                    1.按ESC键可以进行全屏编辑</td>
            </tr>
            <tr>
                <td class="tableTd" colspan="2">
                    2.鼠标放到编辑框右下角可以自由改变大小.</td>
            </tr>
            <tr>
                <td class="tableTd" colspan="2">
                    3.网页标题为必填项,导航调用地址 请输入htm.aspx?id=网页ID.</td>
            </tr>
       
    </table>
    </form>
</body>
</html>