<%@ page language="C#" autoeventwireup="true" inherits="admin_share, 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="简体中文";
tbname.style.display="";
tbkeywords.style.display="";
tbdescription.style.display="";
tbcontent.style.display="";
}
else
{
document.getElementById("ms").value="双语模式";
tbname.style.display="none";
tbkeywords.style.display="none";;
tbdescription.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" id="ae" border="0" cellpadding="3" cellspacing="1">
            <tr>
                <td class="bt" colspan="3" style="text-align: center; height: 35px;">
                    <asp:Label ID="actionbt" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr>
                <td style="width: 82px">
                    模式选择：</td>
                <td>
                    <input id="ms" type="button" value="双语模式" onclick="sy()" /></td>
            </tr>
            <tr>
                <td style="width: 82px">
                    连接名称：</td>
                <td colspan="2">
                    share-<asp:TextBox ID="url" runat="server" CssClass="textput" Width="83px"></asp:TextBox>.aspx
                    如：share-***.aspx</td>
            </tr>
            <tr>
                <td style="width: 82px">
                    单页标题：</td>
                <td colspan="2">
                    <asp:TextBox ID="name" CssClass="textput" runat="server" Width="273px"></asp:TextBox></td>
            </tr>
            <tr class="en" id="tbname" style="display:none;">
                <td style="width: 82px">
                    单页标题：<br />
                    （英文）</td>
                <td colspan="2">
                    <asp:TextBox ID="enname" runat="server" CssClass="textput" Width="273px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 82px">
                    单页关键词：</td>
                <td colspan="2">
                    <asp:TextBox ID="keywords" runat="server" CssClass="textput" Height="40px" TextMode="MultiLine"
                        Width="521px"></asp:TextBox></td>
            </tr>
            <tr class="en" id="tbkeywords" style="display: none">
                <td style="width: 82px">
                    单页关键词：<br />
                    （英文）</td>
                <td colspan="2">
                    <asp:TextBox ID="enkeywords" runat="server" CssClass="textput" Height="40px" TextMode="MultiLine"
                        Width="521px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 82px">
                    单页描述：</td>
                <td colspan="2">
                    <asp:TextBox ID="description" runat="server" CssClass="textput" Height="40px" TextMode="MultiLine"
                        Width="521px"></asp:TextBox></td>
            </tr>
            <tr class="en" id="tbdescription" style="display: none">
                <td style="width: 82px">
                    单页描述：<br />
                    （英文）</td>
                <td colspan="2">
                    <asp:TextBox ID="endescription" runat="server" CssClass="textput" Height="40px" TextMode="MultiLine"
                        Width="521px"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 82px">
                    单页内容：</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: 82px">
                    单页内容：<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="add"   runat="server" Text="添加" Visible="false" Width="100px" OnClick="add_Click" OnClientClick="acadd()" />
                    <asp:Button ID="edit"   runat="server" Text="修改" Visible="false" Width="100px" OnClick="edit_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="share.aspx?action=edit&id=<%#Eval("id") %>"><%#Eval("name") %></a></ItemTemplate></asp:TemplateField>              
                <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href="share.aspx?action=edit&id=<%#Eval("id") %>">编辑</a></ItemTemplate></asp:TemplateField>
                <asp:TemplateField HeaderText="删除"><ItemTemplate><a href="share.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>
