<%@ Page Title="添加新闻" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Addnews.aspx.cs" Inherits="Portal.Admin.Addnews" %>
<%@ Register src="~/UserControls/HtmlEdit.ascx" tagname="HtmlEdit" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

 <div class="result-wrap">


 
            <div class="result-title">
                <h1>添加新闻</h1>
            </div>

 
 <div>
   
 

 
  <table class="table">
   <tr>
   <th width=150px>新闻类别：
   </th>
    <td>
   <asp:DropDownList id="parentname"  Width="250px"  runat="server"     CssClass="form-control" >
			  <asp:ListItem Text="做为顶级目录" Value="0"></asp:ListItem>
          </asp:DropDownList> <asp:HyperLink runat="server" ID="hlcat" Visible="false"></asp:HyperLink>
      </td>
    </tr>
   

   <tr>
     <th>新闻标题：</th>
     <td><asp:TextBox ID="title" runat="server" Width="370" CssClass="form-control"  ></asp:TextBox>
     
         <asp:RequiredFieldValidator Display="Dynamic" ID="RequiredFieldValidator1" ControlToValidate="title" ForeColor="Red" runat="server" ErrorMessage="新闻标题不能为空"></asp:RequiredFieldValidator>
     
     </td>
   </tr>

   <tr style="display:none">
     <th>短&nbsp;标&nbsp;题&nbsp;&nbsp;：</th>
     <td><asp:TextBox ID="littletitle"  runat="server" CssClass="form-control" Width="300"></asp:TextBox></td>
   </tr>


    <tr>
     <th>站外URL：</th>
     <td class=" form-inline"><asp:TextBox ID="url" CssClass="form-control"  Width="300px"  runat="server"></asp:TextBox>
           <a href="#" onclick="window.open('../SimlpeUploadFile.aspx?f=news&cid=<%=url.ClientID%>'); return false;">上传</a>
     </td>
   </tr>



    <tr>
     <th>新闻Tags：</th>
     <td><asp:TextBox ID="tags" CssClass="form-control" Width="300px"  runat="server"></asp:TextBox> 
     </td>
   </tr>



    <tr>
     <th>内容与分页：</th>
     <td>
      
     <asp:DropDownList ID="pagecount" Width=60px runat="server" AutoPostBack="True" onselectedindexchanged="pagecount_SelectedIndexChanged">
    </asp:DropDownList>
  &nbsp;  <asp:Button ID="insert" runat="server" Text="插入页" class="btn  btn-success   btn-sm " onclick="insert_Click" />
          <asp:Button ID="remove" runat="server" Text="删除页" class="btn btn-danger btn-sm  " onclick="remove_Click" />
   &nbsp;&nbsp; 
          <asp:CheckBox Checked="false" runat="server" ID="cb_autodownpic" Text="自动下载站外图片" />
  

     </td>
   </tr>



    <tr>
     <th>新闻内容</th>
     <td> 
       <uc1:HtmlEdit runat="server" ID="contents" />
     </td>
   </tr>


    <tr>
     <th>新闻简介：</th>
     <td> <asp:TextBox ID="intro"   TextMode="MultiLine" Width='600px' Height="100px" runat="server"></asp:TextBox></td>
   </tr>



    <tr>
     <th>新闻来源名称：</th>
     <td><asp:TextBox ID="source" runat="server" CssClass="form-control"  Width="300px"></asp:TextBox> </td>
   </tr>


    <tr>
     <th>新闻来源URL：</th>
     <td><asp:TextBox ID="sourcelink" runat="server" CssClass="form-control"  Width="300px"></asp:TextBox></td>
   </tr>



    <tr>
     <th>新闻来源作者：</th>
     <td><asp:TextBox ID="author" runat="server" CssClass="form-control"  Width="300px"></asp:TextBox></td>
   </tr>
  
  <tr>
  <td colspan="2">
  
  <div class="btnc">
    <asp:Button ID="submits" runat="server" Text="提交"  class="btn btn-primary" onclick="submits_Click" />
    <asp:Button id="cancelButton" Text="取消" CausesValidation="False" runat="server" OnClick="CancelBtn_Click" CssClass="btn"  />
     </div>

  </td>
  </tr>
  </table>
 
  
 
  

 <div runat="server" id="div_div" visible="false" style=" display:none">

标题属性：  <asp:CheckBox ID="bold" Text="粗体" runat="server" />
<asp:CheckBox ID="italic" Text="斜体" runat="server" />
 <asp:CheckBox ID="underline" Text="下划线" runat="server" />

颜色 <asp:DropDownList ID="color" runat="server">
     <asp:ListItem style=" background-color:#FFFFFF" Value="#ffffff" Selected="true"></asp:ListItem>
    <asp:ListItem style=" background-color:#000000" Value="#000000"></asp:ListItem>
     <asp:ListItem style=" background-color:#EE1B2E" Value="#EE1B2E"></asp:ListItem>
      <asp:ListItem style=" background-color:#EE5023" Value="#EE5023"></asp:ListItem>
       <asp:ListItem style=" background-color:#996600" Value="#996600"></asp:ListItem>
        <asp:ListItem style=" background-color:#3C9D40" Value="#3C9D40"></asp:ListItem>
         <asp:ListItem style=" background-color:#2897C5" Value="#2897C5"></asp:ListItem>
          <asp:ListItem style=" background-color:#2B65B7" Value="#2B65B7"></asp:ListItem>
           <asp:ListItem style=" background-color:#8F2A90" Value="#8F2A90"></asp:ListItem>
            <asp:ListItem style=" background-color:#EC1282" Value="#EC1282"></asp:ListItem>
       </asp:DropDownList>
 字体大小：<asp:TextBox ID="size" Width="50" runat="server"></asp:TextBox>  
 标题图片：   <asp:TextBox ID="titleimg"  Width="300px"  runat="server"></asp:TextBox>

  <span style=" display:none">




 <a  onmousemove="disThum()"    onmouseout="hidThum()"  >预览缩略图</a>  <span id="spanprev"></span>  
 
  <a href="#" style="color:Blue" onclick="window.open('UpLoadImg.aspx');return false;">上传图片或附件</a>
  
  </span>



  
 
评论设置：
    <asp:DropDownList ID="comment" runat="server">
    <asp:ListItem Text="不允许评论" Value="0"></asp:ListItem>
    <asp:ListItem Text="允许任何评论" Value="1"></asp:ListItem>
    <asp:ListItem Text="允许任何人评论但需要审核" Value="2"></asp:ListItem>
    <asp:ListItem Text="仅限会员评论" Value="3"></asp:ListItem>
    
    </asp:DropDownList>

 
       <asp:DropDownList ID="toptype" runat="server">
       <asp:ListItem Text="不置顶" Value="0"></asp:ListItem>
         <asp:ListItem Text="一级置顶" Value="0"></asp:ListItem>
           <asp:ListItem Text="二级置顶" Value="0"></asp:ListItem>
             <asp:ListItem Text="三级置顶" Value="0"></asp:ListItem>
       </asp:DropDownList>

       
 
 <script  type="text/javascript">
     function disThum() {

         var imgpath = document.getElementById("<%=titleimg.ClientID %>").value;

         if (imgpath != "") {
             s = document.getElementById("spanprev");
             s.innerHTML = "<img src='" + imgpath + "' >";
             s.style.display = "block";
         }
     }

     function hidThum() {

         s = document.getElementById("spanprev");
         s.innerHTML = "";
         s.style.display = "none";
     }


     function SetThum(imgPath) {
         var o = document.getElementById('<%=titleimg.ClientID %>');

         if (o.value == "") {
             o.value = imgPath;
         }
     }
</script>

 </div>
 
 
 

       

 </div>



    </div>
</asp:Content>
