<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="TotCms.Web.Admin.Shop.Add" 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 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 type="text/javascript">
      var swfu;
      window.onload = function () {
        //swf upload
        swfu = new SWFUpload({
          // Backend Settings
          upload_url: "../UploadFace/UploadImg.aspx?issmall=1",
          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: "../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: "Photo"
          },

          // 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>
          &lt;&lt;-提示：点击左侧“栏目导航”中的栏目名称来选择。
     </td>
    </tr>
    <tr>
      <td class="fields_text">
          名称：</td>
      <td class="fields_input">
          <asp:TextBox ID="ShopTitle" runat="server" Width="431px" CssClass="input_long"></asp:TextBox>
                </td>
    </tr>
    <tr>
      <td class="fields_text">
          价格：</td>
      <td class="fields_input">
          原价：<asp:TextBox ID="MPrice" runat="server" 
            Width="47px" CssClass="input_mini">0.00</asp:TextBox>
&nbsp;现价：<asp:TextBox ID="Price" runat="server" Width="51px" CssClass="input_mini">0.00</asp:TextBox>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
              runat="server" ControlToValidate="Price" ErrorMessage="限数字" 
              ValidationExpression="\d+\.?\d*"></asp:RegularExpressionValidator>
          折扣：<asp:TextBox ID="Discount" runat="server" Width="36px" CssClass="input_mini">1</asp:TextBox>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
            ErrorMessage="限数字" ValidationExpression="\d+\.?\d*" 
            ControlToValidate="Discount"></asp:RegularExpressionValidator>
                (请填写1以下的数字)</td>
    </tr>
    <tr>
      <td class="fields_text">
        星级：</td>
      <td class="fields_input">
        <asp:DropDownList ID="Stars" runat="server" CssClass="select">
          <asp:ListItem Value="5">★★★★★</asp:ListItem>
          <asp:ListItem Value="4">★★★★</asp:ListItem>
          <asp:ListItem Value="3">★★★</asp:ListItem>
          <asp:ListItem Value="2">★★</asp:ListItem>
          <asp:ListItem Value="1">★</asp:ListItem>
        </asp:DropDownList>
&nbsp;库存量：<asp:TextBox ID="Nums" runat="server" CssClass="input_normal">1</asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
          ControlToValidate="Nums" ErrorMessage="限数字" ValidationExpression="(\d+)"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td class="fields_text">
        重量：</td>
      <td class="fields_input">        
        <asp:TextBox ID="Weight" runat="server" Width="48px" CssClass="input_mini">0.00</asp:TextBox>
        kg<asp:RegularExpressionValidator ID="RegularExpressionValidator4" 
          runat="server" ControlToValidate="Weight" ErrorMessage="限数字" 
          ValidationExpression="\d+\.?\d*"></asp:RegularExpressionValidator>
      </td>
    </tr>
    <tr>
      <td class="fields_text">
        缩略图：</td>
      <td class="fields_input">
        <asp:TextBox ID="Photo" runat="server" CssClass="input_normal"></asp:TextBox>
        <span id="spanButtonPlaceholder"></span>
        <div id="divFileProgressContainer"></div>
      </td>
    </tr>
    <tr>
      <td class="fields_text">
          编辑推荐：</td>
      <td class="fields_input">
          <asp:TextBox ID="EditorRm" runat="server" TextMode="MultiLine" 
            CssClass="text_normal"></asp:TextBox>
          </td>
    </tr>
    
    <tr>
      <td class="fields_text" valign="top">
          详细内容：</td>
      <td class="fields_input" colspan="2">        
        <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="55">
                    <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="Layer1" style="position:absolute; display:none; filter:alpha(opacity=50); width:285px; height:159px; z-index:1; left: 447px; top: 381px; background-color: #003399; layer-background-color: #99FFFF; border: 1px none #000000;">
        <div align="center">
          <p>&nbsp;</p>
          <p>&nbsp;</p>
          <p><font color="#FFFFFF">视频转化中，请稍等片刻...       </div>
      </div>

    </form>
    </body>
</html>
