%@ Language=VBScript %>
<%
If session("agentusername")="" Then
ef=True
ec="授权非法,有可能是超时造成的。"
ElseIf not IsNumeric(Request("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 id='"&Request("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="不存在的云服务器产品ID!"
end if
end If
if not ef then
if dsph("agent1")<>session("agentusername") then
ef=True
ec="此云服务器产品ID并不是当前代理名下所有!"
end If
end if
if not ef then
Set ds = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_USER where (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') and 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
Set dsagent = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_AGENT where username='"&ds("agent1")&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符!"
Response.End
end if
dsagent.Open Sql,conn,1,3
If dsagent.Eof Then
ef=True
ec="代理会员名不存在或密码出错了!"
end if
end if
if not ef then
Set dsHost = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_VPSProductlist where VPStype='"&dsph("VPStype")&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符!"
Response.End
end if
dsHost.Open Sql,conn,1,1
if dsHost.Eof then
ef=True
ec="产品不存在!"
Else
'读取月付
PAY_DAY=dsHost("PAY_DAY")
PAY_WEEK=dsHost("PAY_WEEK")
PAY_Month=dsHost("PAY_Month")
PAY_Season=dsHost("PAY_Season")
PAY_halfyear=dsHost("PAY_halfyear")
PAY_Nextyear=dsHost("PAY_Nextyear")
if dsph("istest")="y" then PAY_Nextyear="1"
PAY_2year=dsHost("PAY_2year")
PAY_3year=dsHost("PAY_3year")
PAY_4year=dsHost("PAY_4year")
PAY_5year=dsHost("PAY_5year")
end if
end If
if not ef then
if Not dsph("isagentpd")=true Then
ef=True
ec="不是代理上级的产品不能用这个功能!"
End If
End If
if not ef Then
if dshost("cancloud")=true then'是弹性购买产品
Dim cloudAddmoney
cloudAddmoney=0
if (dsph("CpuNum")>dsHost("CpuNum")) then cloudAddmoney=cloudAddmoney+((dsph("CpuNum")-dsHost("CpuNum"))/dsHost("addCpuNum"))*dsHost("addCpuCost")
if (dsph("MAXRAM")>dsHost("MAXRAM")) then cloudAddmoney=cloudAddmoney+((dsph("MAXRAM")-dsHost("MAXRAM"))/dsHost("addRamNum"))*dsHost("addRamCost")
if (dsph("Maxspace")>dsHost("Maxspace")) then cloudAddmoney=cloudAddmoney+((dsph("Maxspace")-dsHost("Maxspace"))/dsHost("addVHDNum"))*dsHost("addVHDCost")
if (dsph("Maxmbps8")>dsHost("Maxmbps8")) then cloudAddmoney=cloudAddmoney+((dsph("Maxmbps8")-dsHost("Maxmbps8"))/dsHost("addMbpsNum"))*dsHost("addMbpsCost")
If dsHost("CDNMaxMb")>0 then'如果限制流量
if (dsph("CDNMaxMb")>dsHost("CDNMaxMb")) then cloudAddmoney=cloudAddmoney+((dsph("CDNMaxMb")-dsHost("CDNMaxMb"))/1000/dsHost("addNGBNum"))*dsHost("addNGBCost")
End If
If dsHost("MaxIOPS")>0 then'如果限制IOPS
if (dsph("MaxIOPS")>dsHost("MaxIOPS")) then cloudAddmoney=cloudAddmoney+((dsph("MaxIOPS")-dsHost("MaxIOPS"))/dsHost("addIOPSNum"))*dsHost("addIOPSCost")
End if
if (dsph("MaxSNA")>dsHost("MaxSNA")) then cloudAddmoney=cloudAddmoney+((dsph("MaxSNA")-dsHost("MaxSNA"))/dsHost("addSnaNum"))*dsHost("addSnaCost")
if (dsph("MaxBak")>dsHost("MaxBak")) then cloudAddmoney=cloudAddmoney+((dsph("MaxBak")-dsHost("MaxBak"))/dsHost("addBakNum"))*dsHost("addBakCost")
if (dsph("MaxIP")>dsHost("MaxIP")) then cloudAddmoney=cloudAddmoney+((dsph("MaxIP")-dsHost("MaxIP"))/dsHost("addIpNum"))*dsHost("addIPCost")
cloudAddmoney=Clng(FormatNumber(cloudAddmoney,0,-1,0,0))'四舍五入
end if
end if
if not ef then%>
<%session("FreeHostCom").FreeHost_WR("html5")%>
云服务器管理
<%session("FreeHostCom").FreeHost_WR("html6")%>
代理 <%=session("agentusername")%> 管理名下用户 <%=dsph("username")%> 的云服务器 <%=dsph("vpsname")%>
续费/升级
| 用户名: | " target="_blank"><%=ds("username")%> |
| 金额: | <%=ds("usermoney")%> 元 |
| 电子邮件: | ><%=ds("email")%> |
| QQ: | <%=ds("qq")%> |
| 代理名: | <%if ds("agent1")<>"n" then%> " target="_blank"><%=ds("agent1")%> <%end if%> |
中文名: |
<%=ds("truename")%> |
| 联系地址: | <%=ds("address")%> 邮编:<%=ds("postid")%> |
| 电话: | <%=ds("tel")%> 传真:<%=ds("fax")%> |
| 备注: | <%=ds("coreinfo")%> |
| 身份证号码: | <%=ds("perid")%> |
| 注册ip: | <%=ds("regip")%> |
| 注册时间: | <%=ds("regtime")%> |