%@ Language=VBScript %> <% isagentpd=False If session("agentusername")="" Then ef=True ec="授权非法,有可能是超时造成的。" ElseIf Request.QueryString ("id")="" Then ef=True ec="请输入产品ID!" ElseIf not IsNumeric(Request.QueryString ("id")) Then ef=True ec="ID应该是数字!" end if if not ef then Set conn=Server.CreateObject("ADODB.Connection") conn.Open Application("FreeHostDBlink") Set dsph = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_Product_VPS where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and id='"&Request.QueryString ("id")&"'" if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then Response.Write "非法字符!" Response.End end if dsph.Open Sql,conn,1,1 if dsph.Eof then ef=True ec="不存在的云服务器!" Else If dsph ("isagentpd")=True Then isagentpd=true'代理的产品 end if end if If not ef then if (dsph("status")="停止" Or dsph("status")="暂停") And Request.QueryString ("go")<>"c" then ef=True ec="必须是处于正常状态的主机才能管理!" end if end if If Not isagentpd then If not ef Then if Request.QueryString ("go")="c" then Response.Redirect "/vpsadm/selfvpsmodifyrepay.asp?id="&dsph("id") if Request.QueryString ("go")="d" then Response.Redirect "/vpsadm/selfvpsmodifyup.asp?id="&dsph("id") session("VPSAUID")=dsph("id") if dsph("status")="等待安装操作系统" then Response.Redirect "/vpsadm/installos.asp?id="&dsph("id") if Request.QueryString ("go")="e" then Response.Redirect "/vpsadm/selfvpsmodifycorewhat.asp?id="&dsph("id") end if if not ef then session("VPSAUID")=dsph("id") if Request.QueryString ("go")="a" then Response.Redirect "/vpsadm/selfvpsmodify.asp?id="&dsph("id") end If End If If isagentpd then If not ef Then '向上级查密码及ip VPSApiName=dsph("VPSApiName") userid=dsph("Agnuserid") vpsname=dsph("vpsname") userstr=md5(dsph("Domain_Agent_nonemd5_6")&"7i24.com") yearAgn=Request.Form ("year") idc=dsph("Agnidc") productid=dsph("Agnproductid") tar="http://"&VPSApiName&"/api/cloudapi.asp?userid="&userid&"&userstr="&userstr&"&vpsname="&dsph ("vpsname")&"&action=getinfo" temp=ONLY_GET(tar,"") '得到 密码&IP&状态&到期时间 'post 上级 'Response.write temp 'Response.end vpspassword="" ip="" getinfoAry=Split(temp,"&") For i=0 To ubound(getinfoAry) If Left(getinfoAry(i),12)="vpspassword=" Then vpspassword=Replace(getinfoAry(i),"vpspassword=","") If Left(getinfoAry(i),3)="ip=" Then ip=Replace(getinfoAry(i),"ip=","") If Left(getinfoAry(i),7)="MaXRam=" Then MaXRam=Replace(getinfoAry(i),"MaXRam=","") If Left(getinfoAry(i),7)="cpunum=" Then cpunum=Replace(getinfoAry(i),"cpunum=","") If Left(getinfoAry(i),9)="maxspace=" Then maxspace=Replace(getinfoAry(i),"maxspace=","") If Left(getinfoAry(i),9)="MaxMbps8=" Then MaxMbps8=Replace(getinfoAry(i),"MaxMbps8=","") If Left(getinfoAry(i),13)="corewhatuser=" Then corewhatuser=Replace(getinfoAry(i),"corewhatuser=","") Next If vpspassword="" Then ef=True ec=" 查询上级API信息密码时返回出错!原因:"&server.urlencode(temp) End If If ip="" Then ef=True ec=" 查询上级API信息ip时返回出错!原因:"&server.urlencode(temp) End If if Not ef Then If MaXRam<>"" Then dsph("MaXRam")=MaXRam If cpunum<>"" Then dsph("cpunum")=cpunum If maxspace<>"" Then dsph("maxspace")=maxspace If MaxMbps8<>"" Then dsph("MaxMbps8")=MaxMbps8 If corewhatuser<>"" Then dsph("corewhatuser")=corewhatuser dsph("vpspassword")=vpspassword dsph("AgnUpIP")=Left(ip,499) dsph.update 'Response.write vpspassword 'Response.write ip %>
<% end If end If End If if ef then Response.Redirect "e.asp?e="&ec end if%>