<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BBS_Add.aspx.cs" Inherits="TotCms.Web.Office.BBS.BBS_Add" 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 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>
                    <table>
                        <tr>
                            <td>
                                <img src="images/free1.jpg" />
                            </td>
                            <td>
                                <a href="BBS_List.aspx">论坛摘要</a>
                            </td>
                            <td>
                                <a href="Manage.aspx">论坛一览</a>
                            </td>
                        </tr>
                    </table>
                </div>
    <div>
         <table cellpadding="0" cellspacing="1" border="0" width="100%" class="border">
            <tr class="suphead">
                <td>
                    发起讨论
                </td>
            </tr>
            <tr>
                <td width="100">
                    标题：<asp:TextBox ID="tbTitle" runat="server" Width="260"></asp:TextBox>                    
                </td>
            </tr>
             <tr>
                <td>
                    栏目：<asp:DropDownList ID="ddlClass" runat="server"></asp:DropDownList>
                </td>
            </tr>
           <tr>
                <td>
                     <asp:TextBox ID="Content" runat="server" TextMode="MultiLine"></asp:TextBox>
                      <script type="text/javascript">
		                  //<![CDATA[
                          // Replace the <textarea id="Content"> with an CKEditor instance.
                          var editor = CKEDITOR.replace('Content',
			                  {
			                      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>
                    <label for="txtFileName">
                        上传附件:</label>
                     <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>
                    作者：<asp:Label ID="lbUserName" runat="server"></asp:Label><asp:Label ID="lbStaffId" runat="server" CssClass="hidden"></asp:Label>
                    日期：<asp:Label ID="lbPubDate" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnSubmit" runat="server" Text="发 送" OnClick="btnSubmit_Click"  />
                    &nbsp;&nbsp;<input id="Button2" type="reset" value="取 消" onclick="javascript:history.back();" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
