<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Video_Edit.aspx.cs" Inherits="TotCms.Web.Admin.Video_Edit" ValidateRequest="false" %>
<%@ Register src="../UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>
<%@ Register assembly="TotCms.Controls" namespace="TotCms.Controls" tagprefix="cc1" %>
<!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">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>添加视频</title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
    <script src="../js/common.js" type="text/javascript"></script>
    <script src="../../ckeditor/ckeditor.js" type="text/javascript"></script>
    <link href="../../swfupload/swfupload.css" rel="stylesheet" type="text/css" />
    <script src="../../swfupload/swfupload.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: "../UploadFace/UploadFiles.aspx",
          post_params: {
            "ASPSESSID": "<%=Session.SessionID %>"
          },

          // File Upload Settings
          file_size_limit: "0",
          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: "../UploadFace/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: "Vurl"
          },

          // Debug Settings
          debug: false
        });
      }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
      <uc1:main_top ID="main_top1" runat="server" />
    
    </div>
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="black_border">
      <tr class="suphead">
        <td colspan="2">
                                        编辑视频</td>
    </tr>
    <tr>
      <td class="fields_text" width="100">
        选择栏目：</td>
      <td class="fields_input">
          <asp:Label ID="CategoryTitle" runat="server" CssClass="category"></asp:Label>
          <asp:TextBox ID="CategoryId" runat="server" CssClass="hidden"></asp:TextBox>
          <input id="Button4" type="button" value="..." onclick="popupWindow('Category_Tree.aspx?datamodule=<%=(int)TotCms.FrameWork.Enums.DataModule.Video %>','category_tree',400,300,1)" />
     </td>
    </tr>
    <tr>
      <td class="fields_text">
          视频名称：</td>
      <td class="fields_input">
          <asp:TextBox ID="VideoTitle" runat="server"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
              ControlToValidate="VideoTitle" ErrorMessage="(*)"></asp:RequiredFieldValidator>
                作者：<asp:TextBox ID="Author" runat="server" Width="63px"></asp:TextBox>
          时长：<asp:TextBox ID="VideoLen" runat="server" Width="79px"></asp:TextBox>
                </td>
    </tr>
    <tr>
      <td class="fields_text">
        缩略图：</td>
      <td class="fields_input">
        <asp:TextBox ID="Photo" runat="server"></asp:TextBox>
        <input name="UpLoad" type="button" id="UpLoad" value="上传" onclick="popupWindow('../Upload.aspx','UpLoad',420,130,1)" />
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          视频地址：</td>
      <td class="fields_input">
          <asp:TextBox ID="Vurl" runat="server"></asp:TextBox>
          <span id="spanButtonPlaceholder"></span>
        <div id="divFileProgressContainer"></div>
          支持的视频格式有：avi,mpeg,wav,asf,quicktime,mp3,mp4等</td>
    </tr>
    <tr>
      <td class="fields_text">
          视频收费：</td>
      <td class="fields_input">
          <asp:RadioButtonList ID="IsFree" runat="server" RepeatDirection="Horizontal" 
              RepeatLayout="Flow">
              <asp:ListItem Selected="True" Value="1">免费</asp:ListItem>
              <asp:ListItem Value="0">收费</asp:ListItem>
          </asp:RadioButtonList>
&nbsp;<asp:TextBox ID="NeedMoney" runat="server" Width="51px">0.00</asp:TextBox>
          元<asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
              runat="server" ControlToValidate="NeedMoney" ErrorMessage="限数字" 
              ValidationExpression="\d+\.?\d*"></asp:RegularExpressionValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
                    摘要：</td>
      <td class="fields_input">
        <asp:TextBox ID="Fdesc" runat="server" CssClass="text_normal" 
          TextMode="MultiLine"></asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_input" colspan="2">
        <asp:TextBox ID="Content" runat="server" CssClass="hidden" 
          TextMode="MultiLine">视频介绍</asp:TextBox>
          <!-- This div will hold the editor. -->
	        <div id="editor"></div>
          <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 class="fields_text">
          自定义字段：</td>
      <td class="fields_input">
      <div id="CustomFields" runat="server"></div>
      </td>
    </tr>    
    <tr>
      <td align="center" colspan="2">
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="修改视频" />
        </td>
    </tr>
    </table>
    </form>
    </body>
</html>
