%@ Language=VBScript %>
<%
selectedserverid=0'默认首选的服务器ID
isagentpd=False
If session("agentusername")<>"" Then Response.Redirect "/agent/admvps2.asp?username="&session("agentusername")&"&id="&Request.QueryString ("id")
If session("username")="" Then
If Application("hpsystem")=false And Application("canuseorder")=true and Request.ServerVariables("HTTP_FreeHostAPI")<>"7i24.com" Then Response.Redirect "order.asp?type=云服务器产品&id="&Request.QueryString ("id")
ef=True
ec="请您先登陆会员区。"
ElseIf Request.QueryString ("id")="" Then
ef=True
ec="请选择产品!"
ElseIf Instr(1, Request.QueryString ("id"), "'", 1)>0 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 dsHost = Server.CreateObject("ADODB.Recordset")
agentname=session("agentname")
if session("AgnRunasUser")=True then
Set dsagent = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_Agent where username='"&agentname&"'"
dsagent.Open Sql,conn,1,1
if Not dsagent.eof then
Set dsagnettype = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_Agent_pers where agenttype='"&dsagent("agenttype")&"'"
dsagnettype.Open Sql,conn,1,1
if Not dsagnettype.eof Then
canshowagnpric=True
Else
canshowagnpric=false
End if
end If
dsagent.close
end If
Sql="Select * from FreeHost.FreeHost_VPSProductlist where id='"&Request.QueryString ("id")&"'"
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
If dsHost ("isagentpd")=True Then isagentpd=true'代理的产品
VPStype=dsHost("VPStype")
'读取月付
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")
PAY_2year=dsHost("PAY_2year")
PAY_3year=dsHost("PAY_3year")
PAY_4year=dsHost("PAY_4year")
PAY_5year=dsHost("PAY_5year")
end if
end If
'弹性部分1
if not ef then
if dshost("cancloud")=true then
ef=True
ec="弹性购买产品请用另一个购买界面"
end if
end If
if not ef then
if agentname<>"n" then
Set agnserverid = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_VPSProductlist_AGN where id='"&dsHost ("id")&"' and agent1='"&agentname&"'"
agnserverid.Open Sql,conn,1,1
dim isAgnHostSer
if not agnserverid.Eof then
VPStype=agnserverid("VPStype")
if agnserverid ("ServerlistID")<>0 then
ServerlistID=agnserverid ("ServerlistID")
isAgnHostSer=true
else
isAgnHostSer=false
end if
end if
end if
end if
if not ef then
%>
云服务器自助开通