<%@ 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 %>  云服务器自助开通
<%if isAgnHostSer=False And isagentpd=false then%> <%end if%>
 产品名:  <%=VPStype%>
 云服务器自命名:  
 云服务器 密码:   (3至14个字母或数字)
 有效期限:   "> <% usermoney=dsHost("usermoney") if agentname<>"n" then Set dsendmoney = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='云服务器产品' and username='"&agentname&"' and id="&dsHost("id")&"" dsendmoney.Open Sql,conn,1,1 if not dsendmoney.eof then usermoney=dsendmoney("usermoney") end if dsendmoney.close end If if canshowagnpric then%>    (代理成本价格 <% Set dsagnpri = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='云服务器产品' and username='"&agentname&"' and id="&dsHost("id")&"" dsagnpri.Open Sql,conn,1,1 if dsagnpri.eof then usermoney=dsHost("usermoney")*dsagnettype("pers") else usermoney=dsagnpri("usermoney") end if dsagnpri.close %> ) <%End if%> <% If canshowagnpric And isAgnHostSer then%> (当前此产品为独立模式产品) <% usermoney=0 End if%>
 请选择机房: <% Set dsX = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_ServerVPSlist where agent1='n' order by orderbyid desc" if isAgnHostSer then Sql="Select * from FreeHost.FreeHost_ServerVPSlist where agent1='"&agentname&"' order by orderbyid desc" dsX.Open Sql,conn,1,1 If dsX.Eof Then%> 默认机房 <%else%> <%end if%>
 请选择预装的操作系统: <% Set dsX = Server.CreateObject("ADODB.Recordset") Sql="Select top 1 * from FreeHost.FreeHost_ServerVPSlist where agent1='n' and (id="&dsHost("ServerlistID")&" or id="&dsHost("ServerlistID2")&" or id="&dsHost("ServerlistID3")&" or id="&dsHost("ServerlistID4")&" or id="&dsHost("ServerlistID5")&") order by orderbyid desc" dsX.Open Sql,conn,1,1 If dsX.eof then%> <%else%> <%End if%>
 


<%end if if ef then Response.Redirect "e.asp?e="&ec end if%>