<%@ Language=VBScript %> <% selectedserverid=0'默认首选的服务器ID 'canselectdb=true'改成false时将会送两个数据库(此设置在2008-2-19后改为在管理区,产品管理,虚拟主机中设置) isagentpd=false If session("agentusername")<>"" Then Response.Redirect "/agent/admhost2.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 dsHostpdlist = 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_HostProductlist where id='"&Request.QueryString ("id")&"'" if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then Response.Write "非法字符!" Response.End end if dsHostpdlist.Open Sql,conn,1,1 if dsHostpdlist.Eof then ef=True ec="产品不存在!" Else Hosttype=dsHostpdlist("Hosttype") If dsHostpdlist("cantwodb")=true Then canselectdb=false else canselectdb=true End If If dsHostpdlist ("isagentpd")=True Then isagentpd=true'代理的产品 '读取月付 PAY_Month=dsHostpdlist("PAY_Month") PAY_Season=dsHostpdlist("PAY_Season") PAY_halfyear=dsHostpdlist("PAY_halfyear") PAY_Nextyear=dsHostpdlist("PAY_Nextyear") PAY_2year=dsHostpdlist("PAY_2year") PAY_3year=dsHostpdlist("PAY_3year") PAY_4year=dsHostpdlist("PAY_4year") PAY_5year=dsHostpdlist("PAY_5year") end if end if if not ef then if agentname<>"n" then Set agnserverid = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_HostProductlist_AGN where id='"&dsHostpdlist ("id")&"' and agent1='"&agentname&"'" agnserverid.Open Sql,conn,1,1 dim isAgnHostSer if not agnserverid.Eof then Hosttype=agnserverid("Hosttype") 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 then%> <%end if%>
  填写资料:  产品名:  <%=Hosttype%>
 绑定域名: <%if Application("openmustre")=true then%> 请您在开通虚拟主机后,再到自助管理中绑定域名 <%else%> <%end if%>
   FTP用户名:
(6至14个字母或数字)
 FTP密 码: 由系统自动分配 <% If canselectdb then Set dsSqlpdlist = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_SqlProductlist where Hosttype='"&dsHostpdlist("Hosttype")&"' and isbyhost='y' order by orderbyid desc" dsSqlpdlist.Open Sql,conn,1,1 if not dsSqlpdlist.Eof Then havesql=true%>   附送: 注意选择后不能更改<%End if%> <%dsSqlpdlist.close End if %>
 有效期限: "> <% usermoney=dsHostpdlist("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="&dsHostpdlist("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="&dsHostpdlist("id")&"" dsagnpri.Open Sql,conn,1,1 if dsagnpri.eof then usermoney=dsHostpdlist("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_Serverlist where agent1='n' order by orderbyid desc" if isAgnHostSer then Sql="Select * from FreeHost.FreeHost_Serverlist where agent1='"&agentname&"' 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%>