<%@ page language="C#" autoeventwireup="true" inherits="admin_tag, 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 rel="stylesheet" href="admin.css" type="text/css" />
</head>
<script language="javascript">
function sy()
{
if(document.getElementById("ms").value=="双语模式")
{
document.getElementById("ms").value="简体中文";
tbname.style.display="";
tbcontent.style.display="";

}
else
{
document.getElementById("ms").value="双语模式";
tbname.style.display="none";
tbcontent.style.display="none";
}
}
function acadd()
{
one.style.display="";
two.style.display="";
ae.style.display="none";
}
</script>
<body>
    <form id="form1" runat="server">
    <div>
     <table border='0' width='100%' id='one' style="display:none;" >
      <tr height='150'>
      <td>      
      </td>
      </tr>
      </table>
      <table id='two' style="display:none;" align='center' cellspacing='1' border='0' bgcolor='#CCFF66'><tr bgcolor='#FFFF99'><td>
      <table  class='actionadd' border='0' height='30' bgcolor='#FFFF99' style="width: 365px">
         <tr style='font-size:12px;'><td style="text-align: right">
             <asp:Image ID="Image1" runat="server" ImageUrl="~/image/ac.gif" /></td><td>
             &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 请稍后，正在保存数据...</td></tr>
         </table></td></tr>
      </table>
        <asp:Panel ID="tag" runat="server" Width="100%" Visible="False">        
        <table class="adminmaintable" id="ae" border="0" cellpadding="3" cellspacing="1">
            <tr>
                <td class="bt" colspan="3" style="text-align: center; height: 35px;">
                    <asp:Label ID="actiontag" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr>
                <td style="width: 76px">
                    模式选择：</td>
                <td>
                    <input id="ms" type="button" value="双语模式" onclick="sy()" /></td>
            </tr>
            <tr>
                <td style="width: 61px">
                    标签名称：</td>
                <td colspan="2">
                    <asp:TextBox ID="name" CssClass="name" runat="server" Width="273px"></asp:TextBox>
                    建议标签名称这样写{$你的标签名称}</td>
            </tr>
            <tr class="en" id="tbname" style="display:none;">
                <td style="width: 61px">
                    标签名称：<br />
                    （英文）</td>
                <td colspan="2">
                    <asp:TextBox ID="enname" runat="server" CssClass="textput" Width="273px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 61px">
                    标签内容：</td>
                <td colspan="2"><fckeditorv2:fckeditor id="content" runat="server"  EnableXHTML="true" EnableSourceXHTML="true" basepath="~/FCKeditor/" height="400px">
                </FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr class="en" id="tbcontent" style="display:none;">
                <td style="width: 61px">
                    标签内容：<br />
                    （英文）</td>
                <td colspan="2">
                    <fckeditorv2:fckeditor id="encontent" runat="server"  EnableXHTML="true" EnableSourceXHTML="true" basepath="~/FCKeditor/" height="400px">
                    </FCKeditorV2:FCKeditor>
                </td>
            </tr>
            <tr>
                <td style="text-align: center;" colspan="3" rowspan="2">
                    <asp:Button ID="addtag"   runat="server" Text="添加" Visible="false" Width="100px" OnClick="addtag_Click" OnClientClick="acadd()" />
                    <asp:Button ID="edittag"   runat="server" Text="修改" Visible="false" Width="100px" OnClick="edittag_Click" OnClientClick="acadd()"  /></td>
            </tr>
            <tr>
            </tr>
        </table>
        </asp:Panel>
        <asp:GridView OnPageIndexChanging="GridView1_PageIndexChanging" ID="GridView1" runat="server" Width="100%" AutoGenerateColumns="False" Visible="False" CellPadding="4" ForeColor="#333333" GridLines="None" AllowPaging="True" PageSize="20">
            <Columns>
                <asp:BoundField DataField="id" HeaderText="编号" />
                <asp:TemplateField HeaderText="标签名称"><ItemTemplate><a href="tag.aspx?action=edit&id=<%#Eval("id") %>"><%#Eval("name") %></a></ItemTemplate></asp:TemplateField>              
                <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href="tag.aspx?action=edit&id=<%#Eval("id") %>">编辑</a></ItemTemplate></asp:TemplateField>
                <asp:TemplateField HeaderText="删除"><ItemTemplate><a href="tag.aspx?action=del&id=<%#Eval("id") %>" onclick="return confirm('删除将不可恢复，您确认要删除吗？')">删除</a></ItemTemplate></asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <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>&nbsp;
    </div>
    </form>
</body>
</html>
