<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="TotCms.Web.Admin.Shop.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 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">
      var swfu;
       $(function () {
        $("#dialog:ui-dialog").dialog("destroy");
        $("#dialog-win").dialog({
          autoOpen: false,
          height: 350,
          width: 400,
          modal: true,
          buttons: {
            "确定": function () {
              $(this).dialog("close");
            },
            "取消": function () {
              $(this).dialog("close");
            }
          },
          close: function () {

          }
        });

        $("#selclass").click(function () {
          $("#dialog-win").dialog("open");
        });

        //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
        });
      });
      function CloseFrame() {
        $("#dialog-win").dialog("close");
      }
    </script>
    
</head>
<body>
  <div id="dialog-win" title="选择分类" style="display:none;">
	  <iframe src="../Category/Get_Tree.aspx?datamodule=<%=(int)TotCms.FrameWork.Enums.DataModule.Shop %>" width="370" height="350" frameborder="0" scrolling="auto"></iframe>	
   </div>
    <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:TextBox ID="CategoryId" runat="server" CssClass="hidden"></asp:TextBox>
          <asp:Label ID="CategoryTitle" runat="server" CssClass="category"></asp:Label>
          <input id="selclass" name="selclass" type="button" value="请选择" class="selclass" />          
     </td>
    </tr>
    <tr>
      <td class="fields_text">
          名称：</td>
      <td class="fields_input">
          <asp:TextBox ID="ShopTitle" runat="server" Width="437px" CssClass="input_long"></asp:TextBox>
                </td>
    </tr>
    <tr>
      <td class="fields_text">
          价格：</td>
      <td class="fields_input">
          原价：<asp:TextBox ID="MPrice" runat="server" 
            Width="53px" 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_mini">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" CssClass="input_normal"></asp:TextBox>
      </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="Hits" runat="server" CssClass="input_mini"></asp:TextBox>
      </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">        
        <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>    

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