<%@ page language="C#" autoeventwireup="true" inherits="admin_placard, 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>
<script language="javascript">
function sy()
{
if(document.getElementById("ms").value=="双语模式")
{
document.getElementById("ms").value="简体中文";
tbtitlel.style.display="";
tbcontent.style.display="";
}
else
{
document.getElementById("ms").value="双语模式";
tbtitlel.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="addedit" runat="server"  Width="100%" Visible="false" >       
          <table class="adminmaintable" border="0" cellpadding="3" cellspacing="1" id="ae">
              <tr>
                  <td class="bt" colspan="2" style="text-align: center; height: 35px;">
                      <asp:Literal ID="actionbt" runat="server"></asp:Literal></td>
              </tr>
              <tr>
                <td style="width: 89px">
                    模式选择：</td>
                <td>
                    <input id="ms" type="button" value="双语模式" onclick="sy()" />
                    <a id="sff" ></a>
                    </td>
            </tr>
              <tr>
                  <td style="width: 89px" >
                      标题：</td>
                  <td>
                  <asp:TextBox ID="titlel" CssClass="textput" runat="server" Width="348px"></asp:TextBox></td>
              </tr>
              <tr id="tbtitlel" class="en" style="display:none;">
                  <td style="width: 89px">
                      标题（英文）：</td>
                  <td>
                      <asp:TextBox ID="entitlel" runat="server" CssClass="entextput" Width="348px"></asp:TextBox></td>
              </tr>
              <tr>
                  <td style="width: 89px">
                      内容&nbsp;</td>
                  <td><fckeditorv2:FCKeditor BasePath="~/FCKeditor/" EnableSourceXHTML="true" EnableXHTML="true" Height="400px" ID="content" runat="server" ToolbarSet="self">
                  </FCKeditorV2:FCKeditor>
                  </td>
              </tr>
              <tr id="tbcontent" class="en" style="display:none;">
                  <td style="width: 89px">
                      内容（英文）</td>
                  <td>
                      <fckeditorv2:FCKeditor BasePath="~/FCKeditor/" EnableSourceXHTML="true" EnableXHTML="true" Height="400px" ID="encontent" runat="server" ToolbarSet="self">
                      </FCKeditorV2:FCKeditor>
                  </td>
              </tr>
              <tr>
                  <td colspan="2" style="text-align: center; height: 13px;">
                      <asp:Button ID="add" runat="server" Text="添 加" OnClick="add_Click" OnClientClick="acadd()"/>
                      <asp:Button ID="edit" runat="server" Text="修 改" OnClick="edit_Click" OnClientClick="acadd()" /></td>
              </tr>
          </table>
        </asp:Panel>    
        <asp:Panel ID="placard" runat="server" Width="100%" Visible="false">
            <asp:GridView  ID="GridView1" runat="server" OnPageIndexChanging="GridView1_PageIndexChanging" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="20">
                <Columns>
                    <asp:TemplateField HeaderText="标题"><ItemTemplate><a href="placard.aspx?action=edit&id=<%#Eval("id") %>"><%#Eval("titlel") %></a></ItemTemplate></asp:TemplateField>
                    <asp:BoundField DataField="sj" HeaderText="发布时间" />
                    <asp:BoundField DataField="admin" HeaderText="发布人" />
                    <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href="placard.aspx?action=edit&id=<%#Eval("id") %>">编辑</a></ItemTemplate></asp:TemplateField>
                    <asp:TemplateField HeaderText="删除"><ItemTemplate><a href="placard.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></asp:Panel>    
    </div>
    </form>
</body>
</html>
