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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../ColorPicker/colorpicker.css" rel="stylesheet" />
    <script src="../ColorPicker/colorpicker.js"></script>
    <script src="../js/Product.Domain.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="UI_List" runat="server" visible="false">
        <%if (AgentUserId == 1)
          { %><form action="" method="post">
                      <%} %>
                      <table class="ui-table ui-table-bordered">
                          <thead>
                              <%if (AgentUserId == 1)
                                { %>
                              <tr>
                                  <td colspan="4">
                                      <a href="?Action=Add" class="ui-btn ui-btn-primary">添加域名产品</a>
                                  </td>
                              </tr>
                              <%} %>
                              <tr>
                                  <th>产品名称
                                  </th>
                                  <th>域名
                                  </th>
                                  <th>排序</th>
                                  <th>操作
                                  </th>
                              </tr>
                          </thead>
                          <%=ShowList%>
                          <%if (AgentUserId == 1)
                        { %>
                          <tr>
                              <td colspan="4">
                                  <button class="ui-btn ui-btn-primary" type="submit">保存排序</button><span class="IndexOrderMsg"></span></td>
                          </tr><%} %>
                      </table>
                      <%if (AgentUserId == 1)
                        { %>
        </form>
        <%} %>
    </div>
    <div id="UI_Edit" runat="server" visible="false">
        <form class="ui-form ui-form-vertical" action="" method="post">
        <%if (AgentUserId == 1)
          { %>
            <legend>基本信息</legend>
            <fieldset class="p5">

                <div class="ui-form-group">
                    <label class="ui-form-label">产品名称</label><div class="ui-form-ctrls">
                        <input type="text" name="ProductName" id="ProductName"
                            class="ui-input-small" value="<%=mdl.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="<%=mdl.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="text" name="DomainRoot" id="DomainRoot"
                            class="ui-input-small" value="<%=mdl.DomainRoot %>" /><span
                                class="DomainRoot ui-help-inline">域名，如.com</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">域名类型</label><div class="ui-form-ctrls">
                        <select size="1" name="DomainType"><%=CommonLib.Helper.StringFromEnum(typeof(CommonLib.Enums.DomainType),"<option value=\"{1}\" {2}>{0}</option>",mdl.DomainType,"selected") %></select><span
                            class="DomainType 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="DefaultCheck">
                            <option value="true" <%=mdl.DefaultCheck?"selected":"" %>>是</option>
                            <option value="false" <%=mdl.DefaultCheck?"":"selected" %>>否</option>
                        </select><span
                            class="DefaultCheck 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">
                            <option value="true" <%=mdl.DisAgent?"selected":"" %>>允许</option>
                            <option value="false" <%=mdl.DisAgent?"":"selected" %>>禁止</option>
                        </select><span
                            class="DisAgent ui-help-inline">是否允许代理销售，选否代理网站将不显示</span>
                    </div>
                </div>
                <%} %>
                </fieldset>
                <%=PriceHTML%>
                <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>
            
        </form>
    </div>
    <div id="UI_Info" runat="server" visible="false">
        <form action="" method="post">
        <table class="ui-table ui-table-bordered">
            <tr>
                <td style="width:100px;">域名</td>
                <td><%=DomainUser[0]["Domain"]+DomainUser[0]["DomainRoot"].ToString() %></td>
            </tr>
            <tr>
                <td>状态</td>
                <td>
                    <span class="_show1">
                    <%=Enum.Parse(typeof(CommonLib.Enums.OrderState),DomainUser[0]["State"].ToString()).ToString() %>
                    </span>
                    <span class="_show2" style="display:none;">
                        <select name="newstate">
                            <%=CommonLib.Helper.StringFromEnum(typeof(CommonLib.Enums.OrderState),"<option {2} value=\"{1}\">{0}</option>",(int)DomainUser[0]["State"],"selected=\"selected\"") %>
                        </select>
                    </span>

                    <label><input type="checkbox" name="hand" class="hand" value="on" />手动修改</label>
                </td>
            </tr>
            <tr>
                <td>接口回调信息</td>
                <td><%=Server.HtmlEncode(DomainUser[0]["APIBackStr"].ToString()) %></td>
            </tr>

            <tr>
                <td></td>
                <td><%=CommonLib.Enums.OrderState.已完成.GetHashCode()!=(int)DomainUser[0]["State"]?"<button type=\"submit\" class=\"ui-btn ui-btn-primary\">重新开通</button>":"" %> &nbsp;  &nbsp; <button class="ui-btn" type="button" onclick="location.href='orders.aspx?SClassType=2'">返回</button></td>
            </tr>
        </table></form>
    </div>
</asp:Content>
