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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/IDC.VPS.js"></script>
</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>
                <legend>基本信息</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">模版名称</label><div class="ui-form-ctrls">
                        <input type="text" name="VPSName" id="VPSName"
                            class="ui-input-small" value="<%=miv.VPSName %>" /><span
                                class="VPSName 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="Server" id="Server" class="ui-input-small"
                            value="<%=miv.Server %>" /><span
                                class="Server ui-help-inline">服务器简要介绍，如：戴尔 PowerEdge 1950/R410</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">操作系统</label><div class="ui-form-ctrls">
                        <%=SystemTypeString %><span
                            class="system ui-help-inline">VPS允许运行的操作系统</span>
                    </div>
                </div>
                <%--                    <div class="ldiv">
                        <span class="ltit">所属机房</span><span><%=new BLL.IDC_ServerHome().GetSelectList("ServerHome", miv.ServerHome)%></span><span
                            class="ServerHome">*<a href="Default.aspx" target="_blank">点击设置机房资源</a></span></div>--%>
                <div class="ui-form-group">
                    <label class="ui-form-label">CPU核心</label><div class="ui-form-ctrls">
                        <input type="text" name="CPUNum" id="CPUNum" class="ui-input-mini"
                            value="<%=miv.CPUNum %>" /><span
                                class="CPUNum ui-help-inline">CPU核心数</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">内存容量</label><div class="ui-form-ctrls">
                        <input type="text" name="DDR" id="DDR" class="ui-input-mini"
                            value="<%=miv.DDR %>" /> MB<span
                                class="DDR 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="SATA" id="SATA" class="ui-input-mini"
                            value="<%=miv.SATA %>" /> GB<span
                                class="SATA 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="BW" id="BW" class="ui-input-mini"
                            value="<%=miv.BW %>" />
                        Mbps<span class="BW ui-help-inline">带宽速率</span><span class="serverpricelink"><%//=miv.ServerHome == 0 ? "" : "<a href=\"Default.aspx?Action=Edit&Id=" + miv.ServerHome + "\">查看价格</a>"%></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">IP数</label><div class="ui-form-ctrls">
                        <input type="text" name="Ips" id="Ips" class="ui-input-mini"
                            value="<%=miv.Ips %>" />
                        个<span class="Ips ui-help-inline">IP数量</span><span class="serverpricelink"><%//=miv.ServerHome == 0 ? "" : "<a href=\"Default.aspx?Action=Edit&Id=" + miv.ServerHome + "\">查看价格</a>"%></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">流量</label><div class="ui-form-ctrls">
                        <input type="text" name="Flow" id="Flow" class="ui-input-mini"
                            value="<%=miv.Flow %>" />
                        GB/月<span class="Flow ui-help-inline">0为不限制</span><span class="serverpricelink"><%//=miv.ServerHome == 0 ? "" : "<a href=\"Default.aspx?Action=Edit&Id=" + miv.ServerHome + "\">查看价格</a>"%></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">允许升级</label><div class="ui-form-ctrls">
                        <select id="Diy" name="Diy">
                            <option value="false" <%=miv.Diy?"":"selected" %>>禁止</option>
                            <option value="true" <%=miv.Diy?"selected":"" %>>允许</option>
                        </select><span class="Diy 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"><%=miv.Memo%></textarea><span class="Memo"></span>
                    </div>
                </div>

                <legend>内存价格（0为免费，-1为不支持，单位：元/MB）&nbsp;&nbsp;<a href="../Setting/Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>"
                    target="_blank">点击设置会员级别</a></legend>
                <%=new BLL.ProductPrice().GetPriceHTML(GetLMPP(miv.id,Web.Lib.ArtType.VPSDDRPrice), "<div class=\"ui-form-group\"><label class=\"ui-form-label\">{0}</label><div class=\"ui-form-ctrls\">月付：<input type=\"text\" class=\"ui-input-mini\" value=\"{2}\" name=\"VPSDDRPrice_MonPrice_{1}\" value=\"\" />&nbsp;季付：<input type=\"text\" value=\"{3}\" name=\"VPSDDRPrice_ThPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;半年：<input value=\"{4}\" type=\"text\" name=\"VPSDDRPrice_HfPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;年付：<input value=\"{5}\" type=\"text\" name=\"VPSDDRPrice_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(miv.id, Web.Lib.ArtType.VPSSATAPrice), "<div class=\"ui-form-group\"><label class=\"ui-form-label\">{0}</label><div class=\"ui-form-ctrls\">月付：<input type=\"text\" class=\"ui-input-mini\" value=\"{2}\" name=\"VPSSATAPrice_MonPrice_{1}\" value=\"\" />&nbsp;季付：<input type=\"text\" value=\"{3}\" name=\"VPSSATAPrice_ThPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;半年：<input value=\"{4}\" type=\"text\" name=\"VPSSATAPrice_HfPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;年付：<input value=\"{5}\" type=\"text\" name=\"VPSSATAPrice_YearPrice_{1}\" class=\"ui-input-mini\" value=\"\" /></div></div>", AgentUserId)%>

                <legend>CPU价格（0为免费，-1为不支持，单位：元/核心）&nbsp;&nbsp;<a href="../Setting/Class.aspx?ClassType=<%=CommonLib.Enums.ClassType.会员级别.GetHashCode() %>"
                    target="_blank">点击设置会员级别</a></legend>
                <%=new BLL.ProductPrice().GetPriceHTML(GetLMPP(miv.id, Web.Lib.ArtType.VPSCPUPrice), "<div class=\"ui-form-group\"><label class=\"ui-form-label\">{0}</label><div class=\"ui-form-ctrls\">月付：<input type=\"text\" class=\"ui-input-mini\" value=\"{2}\" name=\"VPSCPUPrice_MonPrice_{1}\" value=\"\" />&nbsp;季付：<input type=\"text\" value=\"{3}\" name=\"VPSCPUPrice_ThPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;半年：<input value=\"{4}\" type=\"text\" name=\"VPSCPUPrice_HfPrice_{1}\" class=\"ui-input-mini\" value=\"\" />&nbsp;年付：<input value=\"{5}\" type=\"text\" name=\"VPSCPUPrice_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">
        <table class="ui-table ui-table-bordered">
            <thead>
                <tr>
                    <td colspan="3">
                        <a href="?Action=Add" class="ui-btn ui-btn-primary">添加模版</a>
                    </td>
                </tr>
                <tr>
                    <th>模版名称
                    </th>
                    <th>服务器
                    </th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <%=ShowList%>
        </table>
    </div>

</asp:Content>
