<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Send.aspx.cs" Inherits="TotCms.Web.Office.Mail.Send" ValidateRequest="false" %>
<!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 id="Head1" runat="server">
    <title></title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <link href="../../swfupload/swfupload.css" rel="stylesheet" type="text/css" />
    <script src="../../swfupload/swfupload.js" type="text/javascript"></script>
    <script src="../js/common.js" type="text/javascript"></script>
    <script src="../../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../js/jquery-ui-1.8.10/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <link href="../../js/jquery-ui-1.8.10/css/ui-lightness/jquery-ui-1.8.10.custom.css" rel="stylesheet" type="text/css" />
    <script src="../../ckeditor/ckeditor.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/handlers.js"></script>
    <script type="text/javascript">
      var swfu;
      window.onload = function () {
        //swf upload
        swfu = new SWFUpload({
          // Backend Settings
          upload_url: "../Upload/UploadFiles.aspx",
          post_params: {
            "ASPSESSID": "<%=Session.SessionID %>"
          },

          // File Upload Settings
          file_size_limit: "200 MB",
          file_types: "*.*",
          file_types_description: "files",
          file_upload_limit: "0",    // Zero means unlimited

          // Event Handler Settings - these functions as defined in Handlers.js
          //  The handlers are not part of SWFUpload but are part of my website and control how
          //  my website reacts to the SWFUpload events.
          file_queue_error_handler: fileQueueError,
          file_dialog_complete_handler: fileDialogComplete,
          upload_progress_handler: uploadProgress,
          upload_error_handler: uploadError,
          upload_success_handler: uploadSuccess,
          upload_complete_handler: uploadComplete,

          // Button settings
          button_image_url: "../Upload/Images/XPButtonUploadText_61x22.png",
          button_placeholder_id: "spanButtonPlaceholder",
          button_width: 61,
          button_height: 22,
          button_text: '<span class="button"></span>',
          button_text_style: '.button { font-family: 宋体; font-size: 14px; } .buttonSmall { font-size: 12px; }',
          button_text_top_padding: 1,
          button_text_left_padding: 5,

          // Flash Settings
          flash_url: "../../swfupload/swfupload.swf", // Relative to this file

          custom_settings: {
            upload_target: "divFileProgressContainer",
            upload_returnobjid: "tbAttachment"
          },

          // Debug Settings
          debug: false
        });
      }
      
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="br"></div>
    <div>
        <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border">
            <tr class="suphead">
                <td colspan="2">
                    发新邮件</td>
            </tr>
            <tr>
                <td width="100" class="fields_text">
                    收件邮箱：</td>
                <td>
                    <asp:TextBox CssClass="input_middle" ID="tbEmail" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                      ControlToValidate="tbEmail" ErrorMessage="请填写收件的邮箱"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td width="100" class="fields_text">
                    标题：</td>
                <td>
                    <asp:TextBox CssClass="input_middle" ID="tbTitle" runat="server"></asp:TextBox>
                </td>
            </tr>
             <tr>
                <td class="fields_text">
                    内容：</td>
                <td>
                <asp:TextBox ID="tbContent" runat="server" TextMode="MultiLine"></asp:TextBox>
                  <script type="text/javascript">
		      //<![CDATA[
                    // Replace the <textarea id="Content"> with an CKEditor instance.
                    var editor = CKEDITOR.replace('tbContent',
			      {
			        filebrowserBrowseUrl: '../../ckfinder/ckfinder.html', //启用浏览功能
			        filebrowserImageBrowseUrl: '../../ckfinder/ckfinder.html?Type=Images',
			        filebrowserFlashBrowseUrl: '../../ckfinder/ckfinder.html?Type=Flash',
			        filebrowserUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
			        filebrowserImageUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
			        filebrowserFlashUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
			      }
            );
		      //]]>
		      </script>
                    
                </td>
            </tr>
            <tr>
      <td class="fields_text" height="45">
          附件：</td>
      <td>     
      <div id="swfu_container" style="margin: 0px 0px;">
        <asp:TextBox ID="tbAttachment" runat="server" CssClass="input_middle"></asp:TextBox>
        <span id="spanButtonPlaceholder"></span>
        <div id="divFileProgressContainer"></div>
      </div>      
      </td>
    </tr>
            <tr>
                <td align="center">&nbsp;
                    </td>
                <td align="left" height="35">
                    <asp:Button CssClass="button_blue" ID="btnSubmit" runat="server" Text="发送" OnClick="btnSubmit_Click" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
