<%@ Page Language="C#" AutoEventWireup="true" CodeFile="new.aspx.cs" Inherits="general_email_new" %>

<%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>

<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




<html>
<head>
<title>写邮件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" runat="server" href="./../../styles/1/style.css"/>
<script Language="JavaScript">
function clear_user()
{
  document.getElementById("TEXTAREA1").value="";
  document.getElementByIdf("to_id").value="";
}
function LoadWindow()
{
  URL="../../module/user_select.aspx";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:220px;dialogHeight:350px;center:yes;");
}
function clear_user2()
{
  document.form1.COPY_TO_NAME.value="";
  document.form1.COPY_TO_ID.value="";
}
function LoadWindow2()
{
  URL="../../module/user_select.aspx?ID=2";
  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;
  loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;
  //window.open(URL,"read_notify","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=150,resizable=yes");
  window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:350px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}

function delete_attach(ATTACHMENT_NAME)
{
  msg="确定要删除文件 '"+ ATTACHMENT_NAME +"' 吗?";
  if(window.confirm(msg))
  {
    return (true);
  }
 else
    return (false);  
}
</script>
</head>

<body class="bodycolor" topmargin="5" onload="javascript:form1.SUBJECT.focus();">


<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="~/images/menu/new_email.gif" WIDTH="22" HEIGHT="20" align="absmiddle" id="IMG1" runat="server"><span class="big3"> 写邮件</span>
    </td>
  </tr>
</table>
<form id="form1" runat="server" >
    <anthem:Panel ID="Panel1" runat="server">
   
  <table border="0" width="90%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">

    <tr>
      <td nowrap class="TableData">收件人：</td>
      <td class="TableData">
        <input type="hidden" name="TO_ID" id="to_id" value="" />
        <textarea cols=45 name="TO_NAME" rows="3" class="BigStatic" wrap="yes"  readonly="" id="TEXTAREA1" runat="server"></textarea>
        &nbsp;&nbsp;<input type="button" value="添 加" class="SmallButton" onClick="LoadWindow()" title="添加收件人" name="button">
        &nbsp;<input type="button" value="清 空" class="SmallButton" onClick="clear_user()" title="清空收件人" name="button">
          <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TEXTAREA1"
              ErrorMessage="收件人必须填写"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
      <td nowrap class="TableData"> 邮件主题：</td>
      <td class="TableData">
        <input type="text" name="SUBJECT" size="53" maxlength="100" class="BigInput"  value="" id="Text1" runat="server">
          <anthem:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Text1"
              ErrorMessage="主题必须填写"></anthem:RequiredFieldValidator>
          &nbsp;&nbsp;
          <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Editor1"
              ErrorMessage="内容必须要填写"></asp:RequiredFieldValidator></td>
    </tr>
    <tr>
      <td valign="top" nowrap class="TableData">邮件内容：</td>
      <td class="TableData">
          <CE:Editor ID="Editor1" runat="server" AutoConfigure="Minimal" CodeViewTemplateItemList="Print,Cut,Copy,Paste,Find,ToFullPage,FromFullPage,SelectAll,SelectNone"
              ShowBottomBar="False" ThemeType="Office2000">
              <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                  CssClass="CuteEditorFrame" Height="100%" Width="100%" />
          </CE:Editor>
       
      </td>
    </tr>
   <%-- <tr>
      <td nowrap class="TableData">附件：</td>
      <td class="TableData">
         <anthem:PlaceHolder ID="PlaceHolder1" runat="server">
          
              <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  ShowHeader="False" BorderWidth="0" BorderStyle="None">
                  <Columns>
                      <asp:TemplateField>
                          <ItemTemplate>
                              <img src="../../images/email_atta.gif"  alt="附件"/>
                              
                          </ItemTemplate>
                      </asp:TemplateField>
                      <asp:HyperLinkField DataNavigateUrlFields="ATTACHMENT_ID,ATTACHMENT_NAME" DataNavigateUrlFormatString="~\attachment\{0}\{1}" Target="_blank"
                          DataTextField="ATTACHMENT_NAME" />
         
                  </Columns>
              </asp:GridView>         
      </anthem:PlaceHolder>
          </td>
    </tr>
    <tr>
      <td nowrap class="TableData">附件上传：</td>
      <td class="TableData">
          <anthem:FileUpload ID="ATTACHMENT" CssClass="BigInput" ToolTip="选择上传符件" runat="server" />
          <anthem:Button ID="upload_at" CssClass="BigButton"  ToolTip="上传附件"  runat="server" Text="上传附件" EnabledDuringCallBack="false" TextDuringCallBack="uploading..." OnClick="upload_at_Click" Visible="False" />
          <anthem:Label ID="sta" runat="server"></anthem:Label>&nbsp; (附件小于1M)&nbsp;&nbsp;&nbsp;
     </td>
    </tr>--%>
    <%--<tr>
      <td nowrap class="TableData">提醒：</td>
      <td class="TableData">
        <input type="checkbox" name="SMS_REMIND" id="SMS_REMIND" checked><label for="SMS_REMIND">使用内部短信提醒收件人</label>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableData">重要程度：</td>
      <td class="TableData">
        <input type="radio" name="IMPORTANT" id="IMPORTANT1" value="0" checked><label for="IMPORTANT1">一般</label>
        <input type="radio" name="IMPORTANT" id="IMPORTANT2" value="1" ><label for="IMPORTANT2">重要</label>
        <input type="radio" name="IMPORTANT" id="IMPORTANT3" value="2" ><label for="IMPORTANT3">非常重要</label>
      </td>
    </tr>--%>
    <tr align="center" class="TableControl">
      <td colspan="2" nowrap>
          &nbsp;<input type="hidden" name="SEND_FLAG" value="0">

        <input type="submit" value="立即发送" class="BigButton" title="立即发送此邮件" id="Submit1" runat="server" onserverclick="Submit1_ServerClick">&nbsp;&nbsp;
      <%--  <anthem:Button ID="Button1" Text="保存到发件箱" CssClass="BigButton"  ToolTip="先将此邮件保存到发件箱，以后再发送"  runat="server" OnClick="SaveTOser_ServerClick" Visible="False"  />--%>&nbsp;&nbsp;
        <input type="reset"  value="重填" class="BigButton"  title="清空所输入的内容，重新撰写">&nbsp;&nbsp;
  <input type="button" value="返回" class="BigButton" onClick="location='default.aspx'">
      </td>
    </tr>
  </table> </anthem:Panel>
</form>
</body>
</html>
