<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="Admin_newslistedit, App_Web_gqabgzwv" enableEventValidation="false" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Assembly="Validators" Namespace="Sample.Web.UI.Compatibility" TagPrefix="cc1" %>
<%@ Register Assembly="AjaxFileUploadHelper" Namespace="Jeffz.Web" TagPrefix="cc2" %>
<!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="../css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/lib.js"></script>

    <link href="../Admin/css/Layer.css" rel="stylesheet" type="text/css" />
</head>
<body>
        <form id="form1" runat="server" onsubmit="MyObject.UpdateEditorFormValue(); return true;">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <cc2:ajaxfileuploadhelper id="AjaxFileUploadHelper1" runat="server"></cc2:ajaxfileuploadhelper>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="width:auto;">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                    <td><table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="right" background="images/lanmu1_xwen.jpg"><table width="671" height="94" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="left" background="images/lanmu_xwen.jpg"><table width="162" height="19" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="right" class="biaoti18">新闻中心</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
                    </tr>
                        <tr>
                            <td align="right"><hr />
                               <img src="images/bu.gif" width="12" height="12">　 <asp:LinkButton ID="lkbtnAddNew" runat="server" OnClick="lkbtnAddNew_Click">添加新的信息内容</asp:LinkButton></td>
                        </tr>
                        <tr>
                            <td>
                                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
                                    ForeColor="#333333" GridLines="None" Width="100%" OnRowDeleting="GridView1_RowDeleting" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" DataKeyNames="NewsID" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging">
                                    <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                                    <Columns>
                                        <asp:TemplateField>
                                        <ItemTemplate>
                                        <img src="../Images/tag2.gif" />
                                        </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="NewsTitle" HeaderText="新闻标题">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Left" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="NewsAuthor" HeaderText="作者" >
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Left" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="NewsFrom" HeaderText="来源" >
                                            <ItemStyle HorizontalAlign="Left" />
                                            <HeaderStyle HorizontalAlign="Left" />
                                        </asp:BoundField>
                                        <asp:CommandField ShowSelectButton="True">
                                            <ItemStyle HorizontalAlign="Right" />
                                        </asp:CommandField>
                                        <asp:TemplateField ShowHeader="False">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                                    Text="删除" OnClientClick="return confirm('确认删除吗？');"></asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <RowStyle BackColor="#D9EBFF" ForeColor="#333333" />
                                    <SelectedRowStyle BackColor="#637991" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#637991" ForeColor="White" HorizontalAlign="Center" />
                                    <HeaderStyle BackColor="#4A6B84" Font-Bold="True" ForeColor="White" />
                                    <AlternatingRowStyle BackColor="White" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#d9ebff">
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            新闻标题：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:TextBox ID="tbxNewsTitle" runat="server" Width="300px"></asp:TextBox>
                                            <cc1:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxNewsTitle"
                                                Display="None" ErrorMessage="信息标题不能为空" SetFocusOnError="True" ValidationGroup="content"></cc1:RequiredFieldValidator></td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            新闻内容：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <fckeditorv2:fckeditor id="FCKeditor1" runat="server" toolbarset="Defaults" Width="550px" Height="400px"></fckeditorv2:fckeditor>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            作者：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:TextBox ID="tbxNewsAuthor" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            来源：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:TextBox ID="tbxNewsFrom" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            链接地址：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:TextBox ID="tbxNewsUrl" runat="server" Width="300px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            图片：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:FileUpload ID="FileUpload1" runat="server" />
                                            <asp:Button ID="btnUpload" runat="server" Text="上传" OnClick="btnUpload_Click" /></td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            图片预览：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:Image ID="imgNewsImg" runat="server" /></td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            是否显示在首页：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:CheckBox ID="chkNewsIsIndex" runat="server" Text="在首页显示" /></td>
                                    </tr>
                                    <tr>
                                        <td align="right" bgcolor="#FFFFFF">
                                            最新/热门：
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:CheckBox ID="chkNewsIsNew" runat="server" Text="最新新闻" />(<asp:Image ID="Image1"
                                                runat="server" Height="11px" ImageUrl="~/Images/new.gif" Width="28px" />) &nbsp;
                                            &nbsp; &nbsp;&nbsp;
                                            <asp:CheckBox ID="chkNewsIsHot" runat="server" Text="热门新闻" />(<asp:Image ID="Image2"
                                                runat="server" Height="11px" ImageUrl="~/Images/hot.gif" Width="11px" />)</td>
                                    </tr>
                                    <tr>
                                        <td bgcolor="#FFFFFF">
                                        </td>
                                        <td bgcolor="#FFFFFF">
                                            <asp:Button ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" ValidationGroup="content" />
                                            <asp:Button ID="btnUpdate" runat="server" Text="修改" OnClick="btnUpdate_Click" ValidationGroup="content" />
                                            <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" />
                                            <asp:HiddenField ID="hideNewsID" runat="server" />
                                        </td>
                                    </tr>
                                </table>
                                <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
                                    TargetControlID="RequiredFieldValidator1">
                                </ajaxToolkit:ValidatorCalloutExtender>
                            </td>
                        </tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
