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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/IDC.ServerHome.js"></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" />
    <%} %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="UI_Edit" runat="server" visible="false">
        <form action="" method="post" class="ui-form ui-form-vertical">
            <fieldset class="p5">
                <%if (AgentUserId == 1)
                  { %>
                <legend>添加机房</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">机房名称</label><div class="ui-form-ctrls">
                        <input type="text" name="HomeName" id="HomeName"
                            class="text ui-widget-content ui-corner-all" value="<%=mish.HomeName %>" /><span
                                class="HomeName 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" value="<%=mish.NetType %>"
                            name="NetType" id="NetType" class="text ui-widget-content ui-corner-all" /><span
                                class="NetType ui-help-inline">如：电信网络、双线网络、联通网络等</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">备注</label><div class="ui-form-ctrls">
                        <textarea rows="3" name="Memo" id="Memo" cols="34"><%=mish.Memo%></textarea><span
                            class="Memo ui-help-inline"></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">机房介绍：</label><div class="ui-form-ctrls">
                        <script id="HomeInfo" type="text/plain"><%=mish.HomeInfo %></script>
                        <script type="text/javascript">
                            var editor = new baidu.editor.ui.Editor({
                                textarea: 'HomeInfo'
                            });
                            editor.render("HomeInfo");
                        </script>
                    </div>
                </div>
                <%} %>
                <legend>IP价格（0为免费，-1为不支持，单位：元/IP）&nbsp;&nbsp;<a href="../Setting/Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>"
                    target="_blank">点击设置会员级别</a></legend>
                <%=new BLL.ProductPrice().GetPriceHTML(GetLMPP(mish.id, Web.Lib.ArtType.IPPrice), "<div class=\"ui-form-group\"><label class=\"ui-form-label\">{0}</label><div class=\"ui-form-ctrls\">月付：<input type=\"text\" value=\"{2}\" name=\"IPPrice_MonPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;季付：<input type=\"text\" value=\"{3}\" name=\"IPPrice_ThPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;半年：<input value=\"{4}\" type=\"text\" name=\"IPPrice_HfPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;年付：<input value=\"{5}\" type=\"text\" name=\"IPPrice_YearPrice_{1}\" class=\"ui-input-mini\" value=\"\" /></div></div>", AgentUserId)%>

                <legend>宽带价格（0为免费，-1为不支持，单位：元/Mbps）&nbsp;&nbsp;<a href="../Setting/Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>"
                    target="_blank">点击设置会员级别</a></legend>
                <%=new BLL.ProductPrice().GetPriceHTML(GetLMPP(mish.id, Web.Lib.ArtType.BWPrice), "<div class=\"ui-form-group\"><label class=\"ui-form-label\">{0}</label><div class=\"ui-form-ctrls\">月付：<input type=\"text\" value=\"{2}\" name=\"BWPrice_MonPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;季付：<input type=\"text\" value=\"{3}\" name=\"BWPrice_ThPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;半年：<input value=\"{4}\" type=\"text\" name=\"BWPrice_HfPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;年付：<input value=\"{5}\" type=\"text\" name=\"BWPrice_YearPrice_{1}\" class=\"ui-input-mini\" value=\"\" /></div></div>", AgentUserId)%>

                <legend>流量价格（0为免费，-1为不支持，单位：元/GB/月）&nbsp;&nbsp;<a href="../Setting/Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>"
                    target="_blank">点击设置会员级别</a></legend>
                <%=new BLL.ProductPrice().GetPriceHTML(GetLMPP(mish.id, Web.Lib.ArtType.FlowPrice), "<div class=\"ui-form-group\"><label class=\"ui-form-label\">{0}</label><div class=\"ui-form-ctrls\">月付：<input type=\"text\" value=\"{2}\" name=\"FlowPrice_MonPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;季付：<input type=\"text\" value=\"{3}\" name=\"FlowPrice_ThPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;半年：<input value=\"{4}\" type=\"text\" name=\"FlowPrice_HfPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;年付：<input value=\"{5}\" type=\"text\" name=\"FlowPrice_YearPrice_{1}\" class=\"ui-input-mini\" value=\"\" /></div></div>", AgentUserId)%>

                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                        <button class="ui-btn ui-btn-primary" type="submit">提交保存</button>
                        <button type="button" class="ui-btn" onclick="history.back();">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <div id="UI_List" runat="server" visible="false">
        <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 type="submit" class="ui-btn ui-btn-primary">保存排序</button></td>
                </tr>
                <%} %>
            </table>
        </form>
    </div>
</asp:Content>
