<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" MasterPageFile="../Global.Master" CodeBehind="Default.aspx.cs" Inherits="Web.AdminManager.Product.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/Product.default.js"></script>
    <script src="/Common/js/Common_Class.js" type="text/javascript"></script>
    <script src="/Common/js/Common.js" type="text/javascript"></script>
    <%if (Action == "Edit" || Action == "Add")
      { %>
    <script src="/Common/UEditor/editor_config.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_all_min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Common/UEditor/themes/default/ueditor.css" />
    <link href="../ColorPicker/colorpicker.css" rel="stylesheet" />
    <script src="../ColorPicker/colorpicker.js"></script>
    <%} %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
        <ul class="ui-nav-tabs clearfix">
            <%=CommonLib.Helper.StringFromEnum(typeof(CommonLib.Enums.ClassType), "<li {2}><a href=\"default.aspx?ClassType={1}\">{0}</a></li>", clstype, "class=\"active\"",new int[]{
CommonLib.Enums.ClassType.域名.GetHashCode(),
CommonLib.Enums.ClassType.成功案例.GetHashCode(),
CommonLib.Enums.ClassType.会员级别.GetHashCode(),
CommonLib.Enums.ClassType.栏目.GetHashCode(),
CommonLib.Enums.ClassType.文章.GetHashCode(),
CommonLib.Enums.ClassType.下载.GetHashCode(),
CommonLib.Enums.ClassType.有问必答.GetHashCode()})%>
        </ul>
    </div>
    <div class="h8"></div>
    <div id="UI_Edit" runat="server" visible="false">
        
        <form action="" method="post" class="ui-form ui-form-vertical" enctype="multipart/form-data">
            <%if (AgentUserId == 1)
          { %><fieldset>
                <legend>基本信息</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">产品名称</label><div class="ui-form-ctrls">
                        <input type="text" name="ProductName" id="ProductName"
                            class="text ui-widget-content ui-corner-all" value="<%=mp.ProductName %>" /><span
                                class="ProductName ui-help-inline">产品名称</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">标题颜色</label><div class="ui-form-ctrls">
                        <input type="text" name="TitleColor" id="TitleColor"
                            class="ui-input-small" value="<%=mp.TitleColor %>" /><span
                                class="Title ui-help-inline">选择标题颜色</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">缩略图</label><div class="ui-form-ctrls">
                        <input type="file" name="FacePic" /><span class="FacePic ui-help-inline">产品缩略图</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">所属分类</label><div class="ui-form-ctrls">
                        <%=ClassIdSelect%><span class="sClassId ui-help-inline">选择产品分类</span>
                    </div>
                </div>
                <div class="ui-form-group"><%=PlaceIdsSelect %></div>
                <div class="ui-form-group">
                    <label class="ui-form-label">所属模版</label><div class="ui-form-ctrls">
                        <input id="TempDefaultId" type="hidden" value="<%=mp.TempId %>" /><span
                            class="TempSelect red"><%=TempIdSelect%></span><span class="TempId ui-help-inline">选择产品模版</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">注册条款</label><div class="ui-form-ctrls">
                        <select size="1" name="BuyAgreement" id="BuyAgreement">
                            <option value="0">请选择</option>
                            <%=AgreementString%>
                        </select><span class="BuyAgreement ui-help-inline">选择注册条款，<a href="../Setting/Agreement.aspx"
                            target="_blank">点击这里设置条款</a></span>
                    </div>
                </div>
                <legend>开关</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">试用天数</label><div class="ui-form-ctrls">
                        <input type="text"
                            name="FreeDays" id="FreeDays"
                            value="<%=mp.FreeDays %>" class="text ui-widget-content ui-corner-all"
                            style="width: 50px;" /><span
                                class="FreeDays ui-help-inline">0为不支持试用，最大2147483647</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">促销</label><div class="ui-form-ctrls">
                        <select size="1" name="BeSlp" id="BeSlp">
                            <option value="false" <%=mp.BeSlp?"":"selected" %>>否</option>
                            <option value="true" <%=mp.BeSlp?"selected":"" %>>是</option>
                        </select><span class="BeSlp ui-help-inline">该产品是否为促销产品</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">产品升级</label><div class="ui-form-ctrls">
                        <select size="1" name="CanUpdate" id="CanUpdate">
                            <option value="false" <%=mp.CanUpdate?"":"selected" %>>不允许</option>
                            <option value="true" <%=mp.CanUpdate?"selected":"" %>>允许</option>
                        </select><span class="CanUpdate ui-help-inline">是否允许升级</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">赠送积分</label><div class="ui-form-ctrls">
                        <select size="1" name="vCurrency" id="vCurrency">
                            <option value="false" <%=mp.vCurrency?"":"selected" %>>无</option>
                            <option value="true" <%=mp.vCurrency?"selected":"" %>>有</option>
                        </select><span class="vCurrency ui-help-inline">是否赠送积分</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">代理出售</label><div class="ui-form-ctrls">
                        <select size="1" name="DisAgent" id="DisAgent">
                            <option value="false" <%=mp.DisAgent?"":"selected" %>>不允许</option>
                            <option value="true" <%=mp.DisAgent?"selected":"" %>>允许</option>
                        </select><span class="DisAgent ui-help-inline">该产品是否允许代理出售</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">限量购买</label><div class="ui-form-ctrls">
                        <select size="1" name="IsOneOf" id="IsOneOf">
                            <option value="false" <%=mp.IsOneOf?"":"selected" %>>不限</option>
                            <option value="true" <%=mp.IsOneOf?"selected":"" %>>一个</option>
                        </select><span class="DisAgent ui-help-inline">每个账户是否指允许购买一个</span>
                    </div>
                </div>
                <%} %>

                <legend>产品价格（0为免费，-1为不支持，单位：元）&nbsp;&nbsp;<a href="../Setting/Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>"
                    target="_blank">点击设置会员级别</a></legend>
                <div class="PriceSetting">
                    <%=EditPriceSettingStr%>
                </div>
                <div id="OtherPrice">
                </div>
                <%if (AgentUserId == 1)
                  { %>
                <legend>产品介绍</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">产品介绍：</label><div class="ui-form-ctrls">
                        <script id="ProInfo" type="text/plain"><%=mp.ProductInfo %></script>
                        <script type="text/javascript" language="javascript">
                            var editor = new baidu.editor.ui.Editor({
                                textarea: 'ProInfo'
                            });
                            editor.render("ProInfo");
                        </script>
                    </div>
                </div>
                <%} %>
                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                        <button type="submit" class="ui-btn ui-btn-primary">提交保存</button>
                        <button type="button" class="ui-btn" onclick="history.back()">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <div class="NowClassType" style="display: none;"><%=clstype %></div>
    <div id="UI_List" runat="server" visible="false">
        <%if (AgentUserId == 1)
          { %>
        <form action="" method="post" class="ui-form ui-form-vertical">
            <%} %>
            <table class="ui-table ui-table-bordered">
                <thead>
                    <%if (AgentUserId == 1)
                      { %>

                    <tr>
                        <td colspan="5">
                            <a class="ui-btn ui-btn-primary" href="?Action=Add&ClassType=<%=clstype %>">添加产品</a>
                        </td>
                    </tr>
                    <%} %>
                    <tr>
                        <th>ID编号</th>
                        <th>产品名称
                        </th>
                        <th>产品类型
                        </th>
                        <th>排序
                        </th>
                        <th>操作
                        </th>
                    </tr>
                </thead>
                <%=ShowList%>
                <%if (AgentUserId == 1)
                  { %>
                <tr>
                    <td colspan="5">
                        <button class="ui-btn ui-btn-primary" type="submit">
                            保存排序</button><span class="IndexOrderMsg"></span>
                    </td>
                </tr>
                <%} %>
            </table>
            <%if (AgentUserId == 1)
              { %>
        </form>
        <%} %>
    </div>
</asp:Content>
