<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%'on error resume next
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf RegExpTest("[^A-Za-z0-9]",Request.QueryString ("username")) Then
	ef=True
	ec="用户名中有非法字符！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request.QueryString ("vpsname")) Then
	ef=True
	ec="云服务器名中有非法字符！"	
ElseIf RegExpTest("[^A-Za-z0-9]",Replace(Request.QueryString ("NetCardinfos"),".","")) Then
	ef=True
	ec="IP信息名中有非法字符！"	
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="产品ID应该是数字！"
ElseIf Request.QueryString("ip")<>"" and not IsNumeric(Replace(Request.QueryString("ip"),".",""))  Then
	ef=True
	ec="IP不对！"
elseIf session("canadmvpsset")="" and session("canadmvps")="" and session("canadmvpsch")="" and session("canadmvpsmidsub")="" and session("canadmvpsmiddomain")="" and session("canadmvpsmidcpu")="" and session("canadmvpsmidrepay")="" and session("canadmvpsdel")=""  and session("canadmvpsoth")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if

if not ef then
hostname=trim(replace(Request("hostname"),"http://",""))
if hostname<>"" then hostname=ComX.idntoac_7i24_com(cstr(hostname))
hostnamecheck=replace(hostname,".","")
hostnamecheck=replace(hostnamecheck,"xn--","")
If RegExpTest("[^A-Za-z0-9--]",hostnamecheck) Then
	ef=True
	ec="请输入合法的域名！"
end if
end if


if not ef Then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
If Request.QueryString("ip")<>""  Then
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_VPS_IP where ip='"&Request.QueryString ("ip")&"' and vpsid>0"
	dsph.Open Sql,conn,1,1
if dsph.Eof Then
	ef=True
	ec="IP不存在！"
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_VPS where AgnUpIP like '%"&Request.QueryString ("ip")&"%'"
	dsph.Open Sql,conn,1,1
if dsph.Eof Then
	ef=True
	ec="IP不存在！"
Else
Response.redirect "handvps1agn.asp?vpsname="&dsph("vpsname")
End if
Else
vpsid=dsph("vpsid")
dsph.close
End If
End if
End If

if not ef then
	Set dsph = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Product_VPS where username='"&Request.QueryString ("username")&"'"
if Request.QueryString ("id") <>"" then Sql="Select * from FreeHost.FreeHost_Product_VPS where id='"&Request.QueryString ("id")&"'"
if Request.QueryString ("vpsname") <>"" then Sql="Select * from FreeHost.FreeHost_Product_VPS where vpsname='"&Request.QueryString ("vpsname")&"'"
if Request.QueryString ("ip") <>"" then Sql="Select * from FreeHost.FreeHost_Product_VPS where id='"&vpsid&"'"
if Request.QueryString ("hostname")<>"" then Sql="Select * from FreeHost.FreeHost_Product_VPS where hostname like '%"&ComX.idntoac_7i24_com(cstr(hostname))&"%'"
if Request.QueryString ("NetCardinfos") <>"" then Sql="Select * from FreeHost.FreeHost_Product_VPS where NetCardinfos like '%"&Replace(Request.QueryString ("NetCardinfos"),"-","")&"%'"
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="此用户并没有开通云服务器产品！"
end if
end If

if not ef Then
if Request.QueryString ("id") <>"" then 
if dsph("isagentpd")=true Then
Response.redirect "handvps1agn.asp?"&Request.QueryString
End If
End If
End If

if not ef Then
If Request.QueryString ("id") <>"" Or Request.QueryString ("username") <>"" Or Request.QueryString ("vpsname") <>""  Or Request.QueryString ("ip") <>"" Then
ServerlistID=dsph("ServerlistID")
maxcpu=dsph("maxcpu")
cpunum=dsph("cpunum")
maxram=dsph("maxram")
StartRam=dsph("StartRam")
Maxmbps8=dsph("Maxmbps8")
Minmbps8=dsph("Minmbps8")

maxspace=dsph("maxspace")
canbackupvhd=dsph("canbackupvhd")
starttime=dsph("starttime")
endtime=dsph("endtime")
repaymoney=dsph("repaymoney")
corewhat=dsph("corewhat")

allowdomain=dsph("allowdomain")
CDNMaxMb=dsph("CDNMaxMb")
vpspassword=dsph("vpspassword")

MaxIOPS=dsph("MaxIOPS")
MaxIOPS2=dsph("MaxIOPS2")

Maxbak=dsph("Maxbak")
MaxSNA=dsph("MaxSNA")
GUID=dsph("GUID")
	Set dspdl = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_VPSProductlist where VPStype='"&dsph ("VPStype")&"'"
		dspdl.Open Sql,conn,1,1
If dspdl.Eof Then
	ef=True
	ec="不存在的云服务器产品类型！"
Else
'读取月付
PAY_Month=dspdl("PAY_Month")
PAY_Season=dspdl("PAY_Season")
PAY_halfyear=dspdl("PAY_halfyear")
PAY_Nextyear=dspdl("PAY_Nextyear")
PAY_2year=dspdl("PAY_2year")
PAY_3year=dspdl("PAY_3year")
PAY_4year=dspdl("PAY_4year")
PAY_5year=dspdl("PAY_5year")
end If
else
starttime="2007-7-24"
endtime="2008-7-24"
End if
end if

if not ef then
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where username='"&dsph ("username")&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,1
if ds.eof then
	ef=True
	ec="用户不存在!"
end if
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="150"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="100" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand" onClick="t1.style.display='';"><a href="admvps.asp"><font color="#FFFFFF">云服务器管理</font></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF">
	    <table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#C8DAFF">
          <tr height="24">
            <td width="13%" align="right" bgcolor="#ECF2FF"> 用户名：</td>
            <td width="87%" align="left" bgcolor="#FAFAFA">　<%=ds("username")%> 　 <a href="javascript:document.formTop.action='/user/changeuser.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">切换成此用户角色>>>(用户区点注销会自动退回管理区)</font></a> </td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 金额：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("usermoney")%> 　</td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 电子邮件：</td>
            <td align="left" bgcolor="#FAFAFA">　<a href=mailto:<%=ds("email")%>><font color="#000000"><%=ds("email")%></font></a> 　<a href="emailone.asp?email=<%=ds("email")%>&title=<%=ds("username")%>用户您好" target="_blank">发邮件给这个用户&gt;&gt;&gt;</a></td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> QQ：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("qq")%> 　<a href="tencent://message/?uin=<%=ds("qq")%>&Site=<%=Request.ServerVariables("SERVER_NAME")%>&Menu=yes" title="发送即时消息给用户"" target="_blank">发送即时消息给用户&gt;&gt;</a>　　　　　　　　　　　　　　　　<a href="deluser.asp?username=<%=ds("username")%>"><font color="#000000">马上删除此用户&gt;&gt;&gt;</font></a>　 </td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right">代理名：</td>
            <td align="left" bgcolor="#FAFAFA">　
                <%if ds("agent1")<>"n" then%>
                <a href="searchagent.asp?username=<%=ds("agent1")%>" target="_blank"><font color="blue"><%=ds("agent1")%></font></a>
                <%end if%></td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"><div align="right">中文名：</div></td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("truename")%> </td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 联系地址：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("address")%> 　联系人：<%=ds("contact")%> 邮编：<%=ds("postid")%> </td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 电话：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("tel")%> 　手机：<%=ds("mobi")%> 传真：<%=ds("fax")%> </td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 手机：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("mobi")%>　 <a href="smsone.asp?SendNum=<%=ds("mobi")%>&Content=<%=ds("username")%>用户您好" target="_blank">发短信给这个手机&gt;&gt;&gt;</a></td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 备注：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("coreinfo")%>　<a href="javascript:document.formTop.action='/user/changeuser.asp?gourl=/user/modify.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">修改用户资料>>>(用户区点注销会自动退回管理区)</font></a></td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 身份证号码：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("perid")%></td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 注册ip：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("regip")%> </td>
          </tr>
          <tr height="24">
            <td bgcolor="#ECF2FF" align="right"> 注册时间：</td>
            <td align="left" bgcolor="#FAFAFA">　<%=ds("regtime")%> </td>
          </tr>
        </table>
	    <form action="handvps2.asp" method="post" name="form1">
<%if not dsph.eof then%>
<DIV class="tableborder">
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
  <tr bgcolor="#C1BFBF" align="center">
    <td height="24" colspan="2" background="img/tablebg.gif"><font color="#FFFFFF">编号</font></td>
    <td width="23%" background="img/tablebg.gif"><font color="#FFFFFF">产品类型</font></td>
    <td width="9%" background="img/tablebg.gif"><font color="#FFFFFF">云服务器名</font></td>
    <td width="7%" background="img/tablebg.gif"><font color="#FFFFFF">所在服务器</font></td>
    <td width="18%" background="img/tablebg.gif"><font color="#FFFFFF">已分配IP 地址</font></td>
    <td width="8%" background="img/tablebg.gif"><font color="#FFFFFF">开通日期</font></td>
    <td width="8%" background="img/tablebg.gif"><font color="#FFFFFF">到期日期</font></td>
    <td width="9%" background="img/tablebg.gif"><font color="#FFFFFF">状态</font></td>
    <td background="img/tablebg.gif"><font color="#FFFFFF">实时状态</font></td>
    <td background="img/tablebg.gif"><font color="#FFFFFF">操作</font></td>
    </tr>
<%
dsphcount=dsph.recordcount
while not dsph.Eof%><%

	vpstype=dsph("vpstype")


	%>
  <tr align="center" bgcolor="#E4EAF2" title="<%=dsph("corewhat")%>">
    <td width="6%"><%=dsph("id")%></td>
    <td width="4%"><input type="radio" name="id" value="<%=dsph("id")%>" <%if dsph.RecordCount=1 then%>checked<%end if%>  onClick="window.location='handvps1<%if dsph("isagentpd")=true then%>agn<%end if%>.asp?id='+this.value"></td>
    <td><%=VPStype%>
<%if not isnull(dsph("repaymoney")) then%>
<br>此产品已设置了单独续费价格：<%=dsph("repaymoney")%>元/年
<%end if%>
</td>
    <td><%=dsph("vpsname")%> </td>
    <td><%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ServerVPSlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
	if not dsserver.eof then
%>
        <%=dsserver("ip")%>
<br>域名：<br>
<%
hostname=dsph("hostname")
If IsNull(hostname) Then hostname=""
hostname=replace(hostname, ":80:","")
hostname_arry=Split(hostname, ",")

if dsph ("allowdomain")>0 then%>
<%for idname=0 to ubound(hostname_arry)%>
<a href="http://<%=hostname_arry(idname)%>" target="_blank">
<%if ComX.actoidc_7i24_com(cstr(hostname_arry(idname)))<>hostname_arry(idname) then%>
<%=ComX.actoidc_7i24_com(cstr(hostname_arry(idname)))%> (<%=hostname_arry(idname)%>)
<%else%>
<%=hostname_arry(idname)%>
<%end if%>
</a><br>
<%next%>
<%end if
end if
%>
        
    </td>
    <td><%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_VPS_IP where VPSID="&dsph("id")
		dsX.Open Sql,conn,1,1
If not dsX.Eof Then
while not dsX.eof
%>
        <%=dsX("IP")%><br>
        <%
if dsX("portstart")>0 then%>
外网的:Win远程端口:<%=dsX("portstart")%><br>
外网的:Linux远程端口:<%=dsX("portstart")+1%><br>
外网的:FTP端口:<%=dsX("portstart")+3%><br>
外网的:其他可以端口:<%=dsX("portstart")+4%>-<%=dsX("portstart")+9%><br>
<%end if		
dsX.movenext
wend
else%>
        无,请马上分配
        <%end if%>
<%
if not isnull(dsph("ADSLName")) then
%>拨号资源(手工录入)：<%=dsph("ADSLName")%>/<%=dsph("ADSLpass")%><br>
<%else
	Set dsADSL = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_VPS_ADSL where VPSID="&dsph("id")
		dsADSL.Open Sql,conn,1,1
while not dsADSL.eof%>
   拨号资源：<%=dsADSL("ADSLName")%>/<%=dsADSL("ADSLpass")%><br>
<%		
dsADSL.movenext
wend
end if%></td>
    <td><%=formatdatetime(dsph("starttime"),1)%></td>
    <td><%if Application("VPStestHour")>0 then%>
      <%=dsph("endtime")%>
      <%else%>
      <%=formatdatetime(dsph("endtime"),1)%>
      <%end if%>      <br>
      <a href="moneyalllist.asp?op=search&selecttype=全部&usertype=用户或代理名&whichProduct=云服务器产品&pdid=<%=dsph("id")%>" target="_blank">此产品财务信息</a></td>
    <td><%if dsph("endtime")>NOW then%>
      <%if dsph("istest")="y" then%>
      <font color="#FF0000">试用</font>
      <%else%>
      <%=dsph("status")%>
      <%end if%>
      <%else%>
      <font color="#FF0000">过期</font><%=dsph("status")%>
      <%end if%></td>
    <td><%if dsph("isagentpd")=true then%>代理产品<%else%><a href="vpsstatus.asp?id=<%=dsph("id")%>" target="_blank">马上查看</a><br><br>

	服务器上数据：<br>
<%if not isnull(dsph("netcardinfos")) then%><%=Replace(Replace(Replace(Replace(dsph("netcardinfos"),"!","<br>MAC："),"@","<br>IP:"),"[",""),"]","")%><br><%end if%>

      <%if dsph("CDNMBthismonth")>0 then%>
流量月上限<%=dsph("CDNMaxMb")%>MB,已用<%=dsph("CDNMBthismonth")%>MB
<%end if%><%end if%></td>
    <td><a href="vpsadm2.asp?id=<%=dsph("id")%>&go=a" target="_blank">用户区面板</a></td>
    </tr>
<%username=dsph("vpsname")


if (instr(1,returnstr,"用户不存在！")>0) then %>
<font color=red>服务器上没有找到此用户，修复此用户</font>
<input type="submit" name="Submit" value="马上重开此用户"><br>
<%end if
if returnstr="" then
%>
<!--无法连接此服务器，请检查-->
<%=returnstr%><%
end if 
%>

<%
dsph.movenext
wend%></table>
</div>

<%dsph.close
set dsph=nothing
else%>
<DIV class="tableborder"><br>
<br>
没有相关的记录。<br>
<br>
</div>
<%end if
If dsphcount=1 Then%>
<br>
<DIV class="tableborder">
<table width="100%" border="0" cellspacing="1" cellpadding="2" align="center">
  <tr bgcolor="#C1BFBF" align="center">
    <td width="15%" height="24" background="img/tablebg.gif"><font color="#FFFFFF">类型</font></td>
    <td height="24" background="img/tablebg.gif"><font color="#FFFFFF">
      <input name="username" type="hidden" value="<%=ds("username")%>">
      操作</font></td>
    </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td height="70">更改数据库中的状态</td>
    <td height="30" align="left">　
      <input type="submit" name="Submit" value="恢复">
<input type="submit" name="Submit" value="暂停">
<input type="submit" name="Submit" value="停止">
　GUID：<%=GUID%></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td height="70">更改服务器上的VPS的状态</td>
    <td height="30" align="left">　
        <input type="submit" name="Submit" value="启动VPS" onClick="if (confirm('请您确认本次操作？')==false){return false;}">　　　
        <input type="submit" name="Submit" value="关机VPS" onClick="if (confirm('请您确认本次操作？')==false){return false;}">　　　　
        <input type="submit" name="Submit" value="软关机VPS" onClick="if (confirm('请您确认本次操作？')==false){return false;}">　　　　
        <input type="submit" name="Submit" value="硬重启VPS" onClick="if (confirm('请您确认本次操作？')==false){return false;}">
    　    </td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>删除</td>
    <td height="30" align="left">　
      
      <input type="button" name="Submit" value="删除"  onclick="JavaScript:if(confirm('确定删除吗？')){document.form1.dodel.value = '删除';this.disabled=true;this.value='请您稍等，正在删除中....';document.form1.submit();}">
<input type="hidden" name="dodel" value="">
(删除是不可恢复的删除)
<script language=JavaScript>
<!--
	function chkForm(theform)
	{
			if(! confirm("请确认是否要删除?\n注意，如果删除是没有办法恢复的。"))
				return false;
	}
//-->
</script></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>转移产品</td>
    <td height="30" align="left">　转移此产品给新用户：
      <input name="newusername" type="text" id="newusername" size="14">
      <input type="submit" name="Submit" value="马上转移"></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>重开VPS</td>
    <td height="30" align="left">　在特殊情况下，您可以
        <input type="submit" name="Submit" value="马上重开此VPS" onClick="if (confirm('请您确认本次操作？')==false){return false;}"></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>预装操作系统</td>
    <td height="30" align="left">
<%If Request.QueryString ("id") <>"" Or Request.QueryString ("username") <>"" Or Request.QueryString ("vpsname") <>""  Or Request.QueryString ("ip") <>"" Then%>
<%
y=0
for i=1 to 25
if not isnull(dsserver("osfile"&i)) then
y=y+1
%>

        <input type="radio" name="osid" value="<%=i%>" <%If i=1 then%>checked<%End if%>>
        <%=i%>.<%=dsserver("osname"&i)%>
<%
end if
next
if y>0 then
%>
        <input type="submit" name="Submit" value="马上预装操作系统" onClick="if (confirm('本操作会造成用户所有数据掉失,请您确认本次操作？')==false){return false;}"> 预装操作系统后的密码为：<%=vpspassword%><%
end if
end if%></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>资源调整</td>
    <td height="30" align="left">　
        内存
      <input name="maxram" type="text" id="maxram" value="<%=maxram%>" size="5" maxlength="7">
    M(所有内存总和不能超过物理内存2倍)　初始内存
      <input name="StartRam" type="text" id="StartRam" value="<%=StartRam%>" size="4" maxlength="6">
    M(所有内存总和不能超过物理内存)　CPU上限
    <input name="MaxCPU" type="text" id="MaxCPU" value="<%=maxcpu%>" size="2" maxlength="3"> 
    %　CPU个数
    <input name="CPUnum" type="text" id="CPUnum" value="<%=cpunum%>" size="2" maxlength="3">
    个　硬盘：
    <input name="maxspace" type="text" id="maxspace" value="<%=maxspace%>" size="3" maxlength="6">
G(不能比原来小)<br>　
绑定域名数：
<input name="allowdomain" type="text" id="allowdomain" size="3" value="<%=allowdomain%>">
个 (共享ＩＰ类)　流量：
<input name="CDNMaxMb" type="text" id="CDNMaxMb" size="3" value="<%=CDNMaxMb%>">
M/月(共享ＩＰ类)　带宽：
<input name="Maxmbps8" type="text" id="Maxmbps8" value="<%=Maxmbps8%>" size="3" maxlength="3">
Mbps　IOPS1(第一硬盘)：
<input name="MaxIOPS" type="text" id="MaxIOPS" value="<%=MaxIOPS%>" size="4" maxlength="6">
　IOPS2：
<input name="MaxIOPS2" type="text" id="MaxIOPS2" value="<%=MaxIOPS2%>" size="4" maxlength="6">
<input type="submit" name="Submit" value="设置资源" onClick="if (confirm('调整资源会强行停止VPS的运行，请您确认本次操作？')==false){return false;}"></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>备份还原快照</td>
    <td height="30" align="left">　
        设置每周自动备份保留
      <input name="Maxbak" type="text" id="Maxbak" value="<%=Maxbak%>" size="1" maxlength="1">
个　设置最多允许的快照
<input name="MaxSNA" type="text" id="MaxSNA" value="<%=MaxSNA%>" size="1" maxlength="1">
个　　<input type="submit" name="Submit" value="设置备份还原及快照">
        </td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>单独设置<br>
      它的续费价格</td>
    <td height="30" align="left">　
        <input name="repaymoney" type="text" id="repaymoney" value="<%=repaymoney%>" size="3" maxlength="5">
        元/年
        <input type="submit" name="Submit" value="单独设置续费价格">　
        <input type="submit" name="Submit" value="取消单独价格"></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>更改VPS的备注信息</td>
    <td height="30" align="left">　
        <input name="corewhat" type="text" id="corewhat" value="<%=corewhat%>" size="50">
        <input type="submit" name="Submit" value="更改VPS的备注信息">
        </td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>修改云服务器密码</td>
    <td height="30" align="left">　新密码：
        <input name="vpspassword" type="text" id="vpspassword" size="14" maxlength="14">
        <input type="submit" name="Submit" value="重设云服务器密码" onClick="if (confirm('本操作会强行重启VPS，请您确认本次操作？')==false){return false;}"></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td height="70">转移服务器</td>
    <td height="30" align="left">　 请注意，以下操作将自动删除旧服务器上的VPS文件，并在新服务器上开通VPS，因此，<br>
      　 需要先备份旧的VHD文件，转移成功后停止新的VPS，将VHD文件复制回去，同时要登陆VPS后手工设置IP。<br>
    　 新的服务器为：
    <select name="newServerlistID">
      <%Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerVPSlist order by orderbyid desc,id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
      
      
  
服务器列表为空.

  
      
      <%else%>
      <%while not dsX.Eof%>
      <option value="<%=dsX("id")%>" <%If ServerlistID=dsX("id") then%>selected<%End if%>><%=dsX("id")%>.<%=dsX("servername")%> (<%=dsX("ip")%>)</option>
      <br>
      <%
dsX.movenext
wend%>
    </select>
    <%end if%>
    <input type="submit" name="Submit" value="删除旧VPS并更换服务器" onClick="return chkFormmov(this)">
    <script language=JavaScript>
<!--
	function chkFormmov(theform)
	{
			if(! confirm("请确认是否要删除并更换?\n注意，必须要先备份旧数据，删除后数据就无法恢复。"))
				return false;
	}
//-->
</script>
    </td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>调整时间</td>
    <td height="103" align="left">　
      <%if repaymoney<>"" then%>
      <font color="red">此产品已设置了单独续费价格：<%=repaymoney%>元/年</font>
      <%end if%>
      <input type="radio" name="year" value="<%=PAY_Month%>">
一个月
<input type="radio" name="year" value="<%=PAY_Season%>">
一季
<input type="radio" name="year" value="<%=PAY_halfyear%>">
半年
<input type="radio" name="year" value="<%=PAY_Nextyear%>" checked>
一年
<input type="radio" name="year" value="<%=PAY_2year%>">
两年
<input type="radio" name="year" value="<%=PAY_3year%>">
三年
<input type="radio" name="year" value="<%=PAY_4year%>">
四年
<input type="radio" name="year" value="<%=PAY_5year%>">
五年<br>
　手工指定开通时间:
<input name="starttime" type="text" id="starttime" size="10" maxlength="20">
<%=formatdatetime(starttime,2)%>　手工指定开通时间时，必须填写到期时间及扣除金额<br>
　手工指定到期时间:
<input name="endtime" type="text" value="" size="10" maxlength="20">
<%=formatdatetime(endtime,2)%>　手工指定必须填写扣除金额<br>
　用户金额中扣除：
<input name="usermoney" type="text" id="usermoney" size="3" value="">
元(如果不填写，将按产品默认金额扣除,也可以设成0)

<input type="submit" name="Submit" value="马上调整"></td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td>升级</td>
    <td height="30" align="left">　　更产品类型:
                <%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_VPSProductlist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
产品列表为空.
<%else%>
<select name="vpstypeAuto" id="vpstypeAuto">
  <%while not dsX.Eof%>
   <option value="<%=dsX("id")%>" <%if dsX("vpstype")=vpstype then%>selected<%end if%>><%=dsX("vpstype")%></option>
  <br>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
(如果是弹性产品请不要选扣款)<br>
　
<input name="chmoneyauto" type="checkbox" id="chmoneyauto" value="checkbox">
从用户金额中扣除(如果不选将只更改而不扣费)(产品不变不会扣)<br>
　　 　价格：
<input name="usermoneyauto" type="text" id="usermoneyauto" size="4" value="">
元(不填价格将按产品差价扣除或退回)
<input name="istestch1" type="checkbox" id="istestch1" value="y">
将试用的用户变更成正式用户 <br>
　
<input name="Submit" type="submit" id="auto" value="马上升级" onClick="if (confirm('升级时会强行停止您的VPS的运行,请您确认本次操作？')==false){return false;}">
(注意，代理及代理名下用户请让代理或用户自己操作，这儿的操作不会返款给上级代理)</td>
  </tr>
  <tr align="center" bgcolor="#E4EAF2">
    <td height="70">集群中转移物理机</td>
    <td height="30" align="left">　 新的物理机为：

      <%Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerVPSlist where IsCluster=1 order by orderbyid desc,id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
      
      
      
  
集群服务器列表为空.

  
      
      
      
      <%else%>
      <select name="ClunewServerlistID" id="ClunewServerlistID">	  
      <%while not dsX.Eof%>
      <option value="<%=dsX("id")%>" <%If ServerlistID=dsX("id") then%>selected<%End if%>><%=dsX("id")%>.<%=dsX("servername")%> (<%=dsX("ip")%>)</option>
      <br>
      <%
dsX.movenext
wend%>
    </select>
    <%end if%>
    <input type="submit" name="Submit" value="只更换所属物理机ID，不转移VHDX" onClick="return chkFormmovclu(this)">
    <input type="submit" name="Submit" value="更换所属物理机ID，也转移VHDX" onClick="return chkFormmovclu(this)">    
    <script language=JavaScript>
<!--
	function chkFormmovclu(theform)
	{
			if(! confirm("请确认是否操作！"))
				return false;
	}
//-->
</script>
    </td>
  </tr>

  <tr align="center" bgcolor="#E4EAF2">
    <td height="30" colspan="2" align="right"><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a></td>
    </tr>
</table>
</div>
<%end if%>
</form></TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
