<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewsAdd.aspx.cs" Inherits="WstWeb.Admin.News.NewsAdd"
    ValidateRequest="false" %>

<%@ Register Src="../UC/ClassRelationSelect.ascx" TagName="ClassRelationSelect" TagPrefix="uc1" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <script src="../Js/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../Js/easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Js/easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../Js/PublicComm.js" type="text/javascript"></script>
    <script src="../Js/WinFuns.js" type="text/javascript"></script>
    <script src="../Js/pageloader.js" type="text/javascript"></script>
    <script src="../kindeditor/kindeditor-min.js" type="text/javascript"></script>
    <script src="../kindeditor/lang/zh_CN.js" type="text/javascript"></script>
    <script src="../Js/CommonHtmlEditInit.js" type="text/javascript"></script>
    <script type="text/javascript">
        var editor;
        KindEditor.ready(function (K) {
            editor = K.create('textarea[id="txtContent"]', _kindeditoritemsJson);
        });
    </script>
    <script type="text/javascript">
        var AddBackAction = function (v_IsContinue) {
            var _from = '<%=Request["from"]%>';
            if (v_IsContinue) {
                location.href = 'NewsAdd.aspx?timespan=' + new Date().getTime();
            }
            else {
                if (_from == 'main') {
                    top.RunIFrameFuns("RefreshPage", false);
                    top.IndexCloseNewWindow();
                }
                else {
                    location.href = 'NewsList.aspx';
                }
            }
        }
        var EditBackAction = function () {
            top.RunIFrameFuns("RefreshPage", false);
            top.IndexCloseNewWindow();
        }
        var DelPics = function (v_id) {
            document.getElementById("hdnPicNo").value = v_id;
            __doPostBack('lbtnDelPic', '');
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="ctright">
        <asp:Literal ID="litLinks" runat="server" Visible="false">
   <div class="map"><h3><strong class="left">新增新闻</strong><strong class="right search_icon"><a href="JavaScript:void(0)" onclick="EditInfo(-1)"></a></strong></h3></div>
        </asp:Literal>
        <div class="formclum">
        </div>
        <div class="form">
            <table class="table1" width="100%" border="1" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td width="150" bgcolor="f1f7fc">
                            是否获取远程新闻：
                        </td>
                        <td>
                            <asp:DropDownList runat="server" ID="webyuancheng" AutoPostBack="True" OnSelectedIndexChanged="webyuancheng_OnSelectedIndexChanged">
                                <asp:ListItem Value="0">否</asp:ListItem>
                                <asp:ListItem Value="1">是</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <asp:Panel runat="server" ID="hidwebstring" Visible="false">
                        <tr>
                            <td width="150" bgcolor="f1f7fc">
                                新闻获取源：
                            </td>
                            <td>
                                <asp:DropDownList runat="server" ID="ddlHtmlSou" AutoPostBack="true" OnSelectedIndexChanged="ddlHtmlSou_OnSelectedIndexChanged">
                                    <asp:ListItem Value="">---请选择---</asp:ListItem>
                                </asp:DropDownList>
                                &nbsp;<asp:Label ID="lblyuan" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="150" bgcolor="f1f7fc">
                                远程新闻地址：
                            </td>
                            <td>
                                <asp:TextBox runat="server" CssClass="inp1" ID="txtWebUrl"></asp:TextBox>&nbsp;<asp:Button
                                    runat="server" ID="btnHuoQu" OnClick="btnHuoQu_Click" Text="获取新闻" />
                            </td>
                        </tr>
                    </asp:Panel>
                    <tr>
                        <td width="150" bgcolor="f1f7fc">
                            <span class="mag">标题<font color='red'>*</font>：</span>
                        </td>
                        <td>
                        <asp:TextBox ID="txtTitle" CssClass="inp1" runat="server" MaxLength="200" Width="250"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">所属分类<font color='red'>*</font>：</span>
                        </td>
                        <td style="padding-left: 5px">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <uc1:ClassRelationSelect ID="ClassRelationSelect1" _tableName="NewsClass" runat="server" />
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">详细内容<font color='red'>*</font>：</span>
                        </td>
                        <td style="padding-left: 5px">
                            <asp:TextBox ID="txtContent" CssClass="inp1" runat="server" TextMode="MultiLine"
                                Width="750" Height="250"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">图片新闻：</span>
                        </td>
                        <td>
                            &nbsp;<img src="../images/nopic.gif" id="imgPicurl1" width="120" height="100" runat="server" />
                            <a href="javascript:void()" onclick="DelPics(1)">删除</a> &nbsp;<img src="../images/nopic.gif"
                                id="imgPicurl2" width="120" height="100" runat="server" />
                            <a href="javascript:void()" onclick="DelPics(2)">删除</a> &nbsp;<img src="../images/nopic.gif"
                                id="imgPicurl3" width="120" height="100" runat="server" />
                            <a href="javascript:void()" onclick="DelPics(3)">删除</a> &nbsp;<img src="../images/nopic.gif"
                                id="imgPicurl4" width="120" height="100" runat="server" />
                            <a href="javascript:void()" onclick="DelPics(4)">删除</a>
                            <br />
                            &nbsp;<asp:FileUpload ID="FileLoUrl" Width="290px" runat="server" />
                            <asp:Button ID="Button1" runat="server" Text="点击上传" OnClick="Button1_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">新闻属性</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:DropDownList ID="ddlInfoAttribute" Width="80" CssClass="inp1" runat="server">
                                <asp:ListItem Value="1">普通</asp:ListItem>
                                <asp:ListItem Value="2">热点</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">信息状态：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:DropDownList ID="ddlStatus" Width="80" CssClass="inp1" runat="server">
                                <asp:ListItem Value="1">正常</asp:ListItem>
                                <asp:ListItem Value="2">备用</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">发布人：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:Label ID="txtIssueOpCode" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">发布时间：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:Label ID="dateTxtIssueTime" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">显示点击量：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:TextBox ID="txtHits" CssClass="inp1" Text="0" runat="server" MaxLength="4" Width="120"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">实际点击量：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:Label ID="txtRealHits" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">Seo标题：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:TextBox ID="txtSeoTitle" CssClass="inp1" runat="server" MaxLength="200" Width="250"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">Seo关键词：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:TextBox ID="txtSeoKey" CssClass="inp1" runat="server" TextMode="MultiLine" Width="200"
                                Height="50"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">Seo描述：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:TextBox ID="txtSeoDesc" CssClass="inp1" runat="server" TextMode="MultiLine"
                                Width="200" Height="50"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td bgcolor="f1f7fc">
                            <span class="mag">新闻来源：</span>
                        </td>
                        <td>
                            &nbsp;
                            <asp:TextBox ID="txtNewsSource" CssClass="inp1" runat="server" MaxLength="100" Width="120"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                            <asp:Button ID="btnSave" runat="server" CssClass="button3" Text="" OnClick="btnSave_Click" />
                            <asp:CheckBox ID="chkIsAddContiue" Text="是否继续" runat="server" />
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <input type="hidden" id="hdnId" runat="server" value="-1" />
    <asp:LinkButton ID="lbtnDelPic" runat="server" OnClick="lbtnDelPic_Click"></asp:LinkButton>
    <input type="hidden" id="hdnPicNo" runat="server" />
    </form>
</body>
</html>
