<%@ Page Language="C#" AutoEventWireup="true" CodeFile="editnews.aspx.cs" Inherits="etwuser_editnews" ValidateRequest="false"  %>
<%@ Register Src="../control/Left.ascx" TagName="Left" 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" />
<title>新闻列表</title>
<link type="text/css" href="images/style.css" rel="stylesheet" />
<link type="text/css" href="images/global.css" rel="stylesheet" />
<script type="text/javascript" src="js/Function.Js" ></script>
 <script type="text/javascript" src="../fckeditor/fckeditor.js"></script>  
<script type="text/javascript" src="js/showpic.js"></script> 
<script language="JavaScript">
    function addFile()
    {
        picture=document.getElementById("MyFile");
		bodytable=picture.getElementsByTagName("tbody")[0];
		newtr=document.createElement("tr"); newtd=document.createElement("td");
		trs=picture.getElementsByTagName("tr");
		if(trs.length<10){
			newtr=document.createElement("tr"); newtd=document.createElement("td");
			newtd.innerHTML="<INPUT type=\"file\" class=\"input\" size=\"50\" NAME=\"File\" >";
			newtr.appendChild(newtd);
			bodytable.appendChild(newtr);
		}else{
			alert("最多只能添加10张图片...")		
		}
    }
   
       function   sysuser(lid,pic,ar)   
  {   
    
    var  xx,yy;   
         xx=window.screen.width;   
         yy=window.screen.height;   
         xx=xx/2-250;   
         yy=yy/2-200;   
         window.open("uppic.aspx?lid="+lid+"&pic="+pic+"&ar="+ar+""   ,"ws","width=500,height=300,resizable=no,scrollbars=no,left="+xx+",top="+yy);   
  }   
    </script> 
</head>
<body>

<div class="top">
  <div class="top_b">
    <div class="top_logo"><img src="images/logo.jpg" alt="etw" /><span>{ 客户之窗 }</span></div>
    <div class="search"><a href="index.aspx">首页</a> | <a href="">加入收藏</a> | <a href="contact.aspx">联系我们</a> | <a href="loginout.aspx">退出系统</a></div>
    <div class="search">
      <form id="form2" name="form1" method="post" action="">
        <input type="text" name="textfield" id="textfield" class="input" />
        <input name="image" type="image"  src="images/btn.jpg" class="botn"  >
      </form>
    </div>
  </div>
</div>
<div class="mainbody">
  <div class="left">
    <div class="left_top">
      <div class="ll"><a href="noread_news.htm">新闻中心</a></div>
      <div class="rr"><a href="#">新闻列表</a></div>
    </div>
    <uc1:Left ID="Left1" runat="server" />
  </div>
<div class="right">
    <div class="mainn">
      <div class="main">
        <div class="main_dh"> <span class="float_l"><img src="images/top14.gif" alt="" />&nbsp;其他管理 <img src="images/ico2.gif" alt="" /> 修改新闻 </span></div>
		<form id="form1" runat="server">
        <div class="fanyi_con">
          <div class="top_title"><span><strong>修改新闻</strong></span></div>
          <table width="461" border="0" cellpadding="1" cellspacing="1" class="table1">
            <tr>
              <td width="103"><span class="red">网站名称</span></td>
                &nbsp;<td align="left">
                    <asp:TextBox ID="websitetxt" runat="server" CssClass="input" Width="228px"></asp:TextBox></td>
            </tr>
            <tr>
              <td><span class="red">*</span> 新闻标题：</td>
              <td align="left">
                  <asp:TextBox ID="titletxt" runat="server" CssClass="input" Width="227px"></asp:TextBox></td>
            </tr>
            <tr>
              <td>新闻图片：</td>
              <td align="left" valign="top"><table id="MyFile">
              <tbody>
              <tr>
              <td align="left">
               <INPUT type="file" class="input" size="50" NAME="File" id="File1" runat="server" >
              </td>
             </tr>
             </tbody>
             </table>
                  <a href="#" onclick="addFile()">更多图片</a></td>
            </tr>
              <tr>
                  <td>
                  </td>
                  <td align="left">
                  <div class="twopic">
            <ul>
             <asp:Repeater ID="Repeater1" runat="server">
		      <ItemTemplate> 
		       <li><a href="#" onclick="showpic('../newsupfile/<%#Eval("img") %>');return false;"> <img src="../newsupfile/<%#Eval("img") %>"  alt=""  id="<%#Eval("img") %>" width="80px" height="60px" onload="javascript:DrawImage(this,80,60)" /></a>	
                 <br /> <a href="delnewspic.aspx?lid=<%=id %>&pic=<%#Eval("img") %>&ar=<%# Container.ItemIndex+1%>&page=<%=page %>" onclick="return confirm('真的要删除吗？');">删除</a> <a href="#" onclick="sysuser('<%=id%>','<%#Eval("img") %>','<%# Container.ItemIndex+1%>')"   >修改</a></li>
		      </ItemTemplate>
		    </asp:Repeater>
		    </ul>
		   </div>
                  </td>
              </tr>
            <tr>
              <td>发布时间</td>
              <td align="left">
                  <asp:TextBox ID="updatetimetxt" runat="server" ></asp:TextBox></td>
            </tr>
            <tr>
              <td><span class="red">*</span> 简要描述:
                <br />
              新闻简要内容</td>
              <td align="left">
                  <asp:TextBox ID="contenttxt" runat="server" TextMode="MultiLine"></asp:TextBox></td>
            </tr>
            <tr>
              <td>详细内容:</td>
              <td align="left"> <script type="text/javascript" language="JavaScript">
			window.onload = function()
				{
				var sBasePath = "../fckeditor/"
                var oFCKeditor = new FCKeditor('descriptiontxt') ;
                oFCKeditor.BasePath	= sBasePath ;
                oFCKeditor.ToolbarSet="Basic";
                oFCKeditor.Width = '90%' ;
                oFCKeditor.Height = '220' ;	
                oFCKeditor.ReplaceTextarea() ;
               }
           </script>
            <textarea name="descriptiontxt" rows="1" cols="1" style="display: none" id="descriptiontxt" runat="server"></textarea></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td align="left">&nbsp;</td>
            </tr>
            <tr>
              <td  colspan="2"  ><asp:ImageButton ID="ImageButton1" runat="server" CssClass="btn"  ImageUrl="~/images/edit.gif" OnClick="ImageButton1_Click" />
                &nbsp;
               
               <asp:ImageButton ID="ImageButton2" runat="server" CssClass="btn" ImageUrl="~/images/return.gif" /> 
                  </td>
            </tr>
          </table>
    
        </div>
		</form>
        <div class="copyright"> Copy Rright © 2008-2010 ETW International </div>
      </div>
    </div>

  </div>
</div>
</body>
</html>