<%@ 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>
    <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 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 type="text/javascript">
      $(function () {
        $("#dialog:ui-dialog").dialog("destroy");
        $("#dialog-win").dialog({
          autoOpen: false,
          width: 530,
          height: 250,
          modal: true,
          close: function () {

          }
        });

      });
      function Upload_Open() {
        $("#dialog-win").dialog("open");
        document.getElementById('win_frame').src = '../Upload.aspx';
        $("#dialog-win").dialog('option', 'title', '上传图片');
      }
      function CloseFrame() {
        $("#dialog-win").dialog("close");
      }
</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" CssClass="input_middle"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
              ControlToValidate="VideoTitle" ErrorMessage="(*)"></asp:RequiredFieldValidator>
                作者：<asp:TextBox ID="Author" runat="server" Width="63px" 
            CssClass="input_mini"></asp:TextBox>
          时长：<asp:TextBox ID="VideoLen" runat="server" Width="79px" CssClass="input_mini"></asp:TextBox>
                </td>
    </tr>
    <tr>
      <td class="fields_text">
        缩略图：</td>
      <td class="fields_input">
        <asp:TextBox ID="Photo" runat="server" CssClass="input_middle"></asp:TextBox>
        <input name="UpLoad" type="button" id="UpLoad" value="上传" 
          onclick="Upload_Open()" class="btn-general" />
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          视频地址：</td>
      <td class="fields_input">
          <asp:TextBox ID="Vurl" runat="server" CssClass="input_middle"></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" CssClass="input_mini">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_text" valign="top">
                    视频介绍：</td>
      <td class="fields_input">
        <asp:TextBox ID="Content" runat="server" CssClass="hidden" 
          TextMode="MultiLine"></asp:TextBox>
          <cc1:Editor ID="Editor1" runat="server" EditorPath="../" 
          FieldName="Content" />
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          自定义字段：</td>
      <td class="fields_input">
      <div id="CustomFields" runat="server"></div>
      </td>
    </tr>    
    <tr>
      <td></td>
      <td align="left" height="50">
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="修改视频" 
                      CssClass="btn-submit" />
                    &nbsp;<input id="Button2" type="reset" value="取 消" class="btn-cancel" onclick="javascript:history.back();" />
        </td>
    </tr>
    </table>
    <div id="dialog-win" title="window">
	  <iframe id="win_frame" name="win_frame" src="../Blank.htm" width="500" height="170" frameborder="0"></iframe>	
  </div>
    </form>
    </body>
</html>
