<%@ Language=VBScript %> <% If session("agentusername")="" Then ef=True ec="授权非法,有可能是超时造成的。" ElseIf Request.QueryString ("id")="" 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 dsdom = Server.CreateObject("ADODB.Recordset") sql="Select * from FreeHost.FreeHost_Product_Domain where id='"&Request.QueryString ("id")&"' and (agent1='"&session("agentusername")&"' or agent2='"&session("agentusername")&"') order by id desc" if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then Response.Write "非法字符!" Response.End end if dsdom.Open sql,conn,1,3 if dsdom.eof then ef=True ec="不存在的域名!" end if end if if not ef then 'If trim(lcase(dsdom ("username")))=trim(lcase(session("agentusername"))) Then ' ef=True ' ec="如果作为代理给自己开通产品,请在代理区--用户管理,用代理名作用户名切换到用户模式!" 'end if end if if not ef then if dsdom("status")<>"预注册成功" then ef=True ec="处于预注册状态的域名才能确认,请您联系管理员处理。" end if end if if not ef then if dsdom("Domain_API")=4 then If TOLOGINZP()=true then ef=True ec="登陆API4域名接口失败,可能是网络忙的原因造成的,请再试一次,或请联系管理员。相关出错信息为:"&server.URLEncode(ZPEC) end if end if end If if not ef Then Dim enc Enddomaintypeid=GetDomaintype(dsdom("Domain")) end if if not ef then Set dsDlist = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_DomainProductlist where id='"&Enddomaintypeid&"'" dsDlist.Open Sql,conn,1,1 if dsDlist.eof then ef=True ec="管理员没有定义域名的价格,请联系管理员!" else usermoney=dsDlist("usermoney") myrealcost=dsDlist("usermoneyagn") end if end if if not ef then yearstr=dsdom("years") if yearstr="" then ef=True ec="未能找到注册的时间长度!" 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='"&dsdom ("username")&"'" ds.Open Sql,conn,3,2 if ds.eof then ef=True ec="此用户不是您名下的用户!"&dsdom ("username") end if end if if not ef then Set dspre = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_Preopen_Product where username='"&ds ("username")&"' and haveget='n' and type1='"&dsDlist("Domaintype")&"'" dspre.Open Sql,conn,1,3 if not dspre.Eof then if Clng(yearstr)=1 then havehostget=true havehostgetcon="赠送" end if end if end if if not ef then if DateDiff("s", Application("domainoptime"),NOW )"n" then dsphemail("agent1")=ds("agent1") else dsphemail("agent1")="n" end if dsphemail.update dsphemail.close Set dsphemail = Server.CreateObject("ADODB.Recordset") Sql="Select * from FreeHost.FreeHost_Product_Email where starttime='"&starttime&"' and username='"&ds("username")&"'" dsphemail.Open Sql,conn,1,1 FreeHost_oplog session("agentusername"),"信息","代理帮用户"&dsphemail ("username")&"开通域名"&dsdom("Domain")&"赠送邮箱产品ID:"&dsphemail("id") retemail="赠送的邮箱产品已开通" end if '结束赠送 dsdom("status")="失败" dsdom.update Application.lock Application("domainoptime")=now Application("domainoplock")=true Application.unlock dim returncodevalue,failreason RegisterDomainNow() Application.lock Application("domainoplock")=false Application.unlock dsdom.update end if if not ef then 'UPDATE dsdom("starttime")=starttime dsdom("endtime")=temptime dsdom("agent1")=ds("agent1") dsdom("Domaintype")="" dsdom("status")="正常" dsdom.update 'action 'pass if Application("DNS_API")=1 then dsdom("DNS_API")=Application("DNS_API") end if dsdom.update 'mail dim Subject,body emaildomainopen ret=Send2Mail(conn,ds("username"),Subject,body) If Application("smsdomainopen")=True And (ds("agent1")="n" Or Application("agncangetsms")=True) Then Dim username username=ds("username") mobi=Trim(ds("mobi")) smsContent=Application("smsdomainopencon") '恭喜!您的域名已开通了!用户名:#用户名#域名:#域名#到期时间是:#到期时间#您的帐户余款是:#金额# 元 smsContent=Replace(smsContent,"#用户名#",ds("username")) smsContent=Replace(smsContent,"#域名#",dsdom("domain")) smsContent=Replace(smsContent,"#到期时间#",formatdatetime(dsdom("endtime"),1)) smsContent=Replace(smsContent,"#金额#",newuser_money) If Application("smsByint")=2 Then'阿里云处理 '开通${product}成功,产品帐号${proname},密码${propass},到期${endtime},余款${usermoney}元,备注${info} smsContent="{""product"":""域名"",""proname"":"""&Replace(dsdom("domain"),".","_")&""",""propass"":"""&ds("inipass")&""",""endtime"":"""&formatdatetime(dsdom("endtime"),1)&""",""usermoney"":"""&newuser_money&""",""info"":"":用户名"&Replace(ds("username"),"qq","QQ")&"""}" End if ret=SendSms(mobi,smsContent,0,Now,Application("smsdomainopen_code")) End if end if if not ef then %> <%session("FreeHostCom").FreeHost_WR("html5")%> 操作结果 <%session("FreeHostCom").FreeHost_WR("html6")%>

<%If Right(dsdom("Domain"),"7")=".gov.cn" then%> <%End if%> <%If Right(dsdom("Domain"),"3")=".cn" then%> <%End if%>
   域名开通成功,以下是用户的资料<%if havehostget then%><%=havehostgetcon%><%end if%>:
    用户的原金额: <%=olduser_money%>元
    用户的金额变化: <%=moneych%> 元
    用户的新金额: <%=newuser_money%> 元
    我的原金额: <%=oldagn_money%> 元
    我的金额变化: <%=newagn_money-oldagn_money%>
    我的新金额: <%=newagn_money%> 元
    域名是: <%=dsdom("Domain")%>
    到期时间是: <%=temptime%>
新注册的域名会在24小时后生效,
域名的管理密码请五分钟后使用"重置密码功能"修改一个初始密码。
注意:
您注册的是.gov.cn类域名,请您联系管理员提交审核材料才能注册成功。
注意:
您注册的是.cn类域名,请马上上传身份证等注册材料,6天内不上传材料到CNNIC则域名将会注册失败。



<%session("FreeHostCom").FreeHost_WR("html7")%> <%end if if ef then Response.Redirect "e.asp?e="&ec end if%>