📄 domain_reg_class.asp
字号:
<!--#include file="../../include/socket.asp"-->
<!--#include file="../../include/GetSysParam.asp"-->
<%'#############################################'%>
<%'# 域名注册类操作 #'%>
<%'# reg_domain #'%>
<%'#############################################'%>
<%
class reg_domain
public db
public socket
public err_code
public reg_name,reg_name_m,reg_org,reg_org_m,reg_street1,reg_street2,reg_street3,reg_city,reg_sp,reg_pc,reg_cc,reg_voice,reg_fax,reg_email
public admin_name,admin_name_m,admin_org,admin_org_m,admin_street1,admin_street2,admin_street3,admin_city,admin_sp,admin_pc,admin_cc,admin_voice,admin_fax,admin_email
public tech_name,tech_name_m,tech_org,tech_org_m,tech_street1,tech_street2,tech_street3,tech_city,tech_sp,tech_pc,tech_cc,tech_voice,tech_fax,tech_email
public billing_name,billing_name_m,billing_org,billing_org_m,billing_street1,billing_street2,billing_street3,billing_city,billing_sp,billing_pc,billing_cc,billing_voice,billing_fax,billing_email
public domain,domaintype,appPurpose,nexuscategory
public clID,pwd
public customer_id,customer_password
public period,dns1,dns2,pwd1,pwd2
public term_id,item_id
public temp_cart_id
public reg_id,admin_id,tech_id,billing_id
public contact_reg,contact_admin,contact_tech,contact_billing
public reg_name_cn,reg_org_cn,admin_name_cn,admin_org_cn,tech_name_cn,tech_org_cn,billing_name_cn,billing_org_cn
public mode_id,order_type
public domain_tail
public industry,manager
%>
<%
'************************************'
' 初始化数据库连接 '
'************************************'
' sub initdb()
' set db=server.createobject("adodb.connection")
' db.connectionstring= odbc
' db.open
'
' end sub
%>
<%
'************************************'
' 初始化SOCKET连接 '
'************************************'
public function initsocket()
on error resume next
host=Sys_Opt_CCIP
port=Sys_Opt_CCPort
clID=Sys_Opt_CCUID
pwd=Sys_Opt_CCPWD
'建立socket
set socket=new socketclient
'建立连接
call socket.socket_conn(host,port)
if not socket.err_code=0 then
err_code=socket.err_code
else
call socket.socket_login(clID,pwd)
err_code=socket.err_code
dim file_open,path,fs
path="c:\log\reg_conn_log.txt"
set fs=createobject("scripting.filesystemobject")
set file_open=fs.opentextfile(path,8,true)
file_open.writeline "member_id:"&customer_id
file_open.writeline "datetime:"&now()
file_open.writeline "domain:"&domain
file_open.writeline "SendEpp:"&socket.send_client
file_open.writeline "ReceiveEpp:"&socket.re_server
file_open.writeline "#-------------------------------------------#"
file_open.close
end if
end function
%>
<%
'************************************'
' 对domain检查 '
'************************************'
public function domaincheck()
'dim dbstrin,rs
'dbstring="select count(*) as tempcount from domain_info where domain_name='"&domain&"' and state=0"
'set rs=db.execute(dbstring)
'if rs("tempcount")>0 then
' err_code=10018
' exit function
'end if
call socket.socket_check_domain(clID,pwd,domaintype,domain)
dim file_open,path,fs
path="c:\log\reg_check_log.txt"
set fs=createobject("scripting.filesystemobject")
set file_open=fs.opentextfile(path,8,true)
file_open.writeline "member_id:"&customer_id
file_open.writeline "datetime:"&now()
file_open.writeline "domain:"&domain
file_open.writeline "SendEpp:"&socket.send_client
file_open.writeline "ReceiveEpp:"&socket.re_server
file_open.writeline "#-------------------------------------------#"
'response.write socket.err_code
'response.write socket.re_server
if not socket.err_code=0 then
err_code=socket.err_code
else
err_code=0
end if
end function
%>
<%
'************************************'
' 数据合法性检查 '
'************************************'
public function datacheck()
if reg_name="" and reg_org="" and reg_name_m="" and reg_org_m and reg_street1="" and reg_city="" and reg_sp="" and reg_pc="" and reg_cc="" and reg_voice="" and reg_fax="" and reg_email="" then
err_code=10005
exit function
else
if admin_name="" and admin_org="" and admin_name_m="" and admin_org_m and admin_street1="" and admin_city="" and admin_sp="" and admin_pc="" and admin_cc="" and admin_voice="" and admin_fax="" and admin_email="" then
err_code=10006
exit function
else
if tech_name="" and tech_org="" and tech_name_m="" and tech_org_m and tech_street1="" and tech_city="" and tech_sp="" and tech_pc="" and tech_cc="" and tech_voice="" and tech_fax="" and tech_email="" then
err_code=10007
exit function
else
if billing_name="" and billing_org="" and billing_name_m="" and billing_org_m and billing_street1="" and billing_city="" and billing_sp="" and billing_pc="" and billing_cc="" and billing_voice="" and billing_fax="" and billing_email="" then
err_code=10008
exit function
else
if not check_email(reg_email)=0 and not check_email(admin_email)=0 and not check_email(tech_email)=0 and not check_email(billing_email)=0 then
err_code=10000
exit function
else
if not check_tel(reg_voice)=0 and not check_tel(admin_voice)=0 and not check_tel(tech_voice)=0 and not check_tel(billing_voice)=0 then
err_code=10001
exit function
else
if not check_fax(reg_fax)=0 and not check_fax(admin_fax)=0 and not check_fax(tech_fax)=0 and not check_fax(billing_fax)=0 then
err_code=10002
exit function
else
if not check_password(pwd1)=0 and not pwd1=pwd2 then
err_code=10004
exit function
else
err_code=0
end if
end if
end if
end if
end if
end if
end if
end if
end function
%>
<%
'************************************'
' 产生发送联系人 '
'************************************'
public function create_contactor()
on error resume next
dim dbstring
'发送注册人
call socket.socket_create_contactor(clID,pwd,domaintype,reg_name,reg_name_m,reg_org,reg_org_m,reg_street1,reg_street2,reg_city,reg_sp,reg_pc,reg_cc,reg_voice,reg_fax,reg_email,pwd1,apppurpose,nexuscategory)
err_code=socket.err_code
'下面两句是来检错误的
'response.write socket.send_client
'response.write socket.re_server
dim file_open,path,fs
path="c:\log\reg_contactor_log.txt"
set fs=createobject("scripting.filesystemobject")
set file_open=fs.opentextfile(path,8,true)
file_open.writeline "member_id:"&customer_id
file_open.writeline "datetime:"&now()
file_open.writeline "domain:"&domain
file_open.writeline "SendEpp:"&socket.send_client
file_open.writeline "ReceiveEpp:"&socket.re_server
file_open.writeline "#-------------------1------------------------#"
if err_code=0 then
reg_id=socket.user_id
' dbstring="insert into contacts(password,reg_name,org,address1,address2,address3,city,province,country,postalcode,telephone,fax,email,reg_name_cn,org_cn)values("&pwd1&",'"®_name&"','"®_org&"','"®_street1&"','"®_street2&"','"®_street3&"','"®_city&"','"®_sp&"','"®_cc&"','"®_pc&"','"®_voice&"','"®_fax&"','"®_email&"','"®_name_cn&"','"®_org_cn&"')"
' db.execute(dbstring)
' if db.errors.count>0 then
' err_code=10011
' exit function
' else
' err_code=0
' end if
' dbstring="select max(contact_id) as contact_id from contacts"
' set rs=db.execute(dbstring)
' contact_reg=rs("contact_id")
end if
'发送管理人
call socket.socket_create_contactor(clID,pwd,domaintype,admin_name,admin_name_m,admin_org,admin_org_m,admin_street1,admin_street2,admin_city,admin_sp,admin_pc,admin_cc,admin_voice,admin_fax,admin_email,pwd1,apppurpose,nexuscategory)
err_code=socket.err_code
path="c:\log\reg_contactor_log.txt"
set fs=createobject("scripting.filesystemobject")
set file_open=fs.opentextfile(path,8,true)
file_open.writeline "member_id:"&customer_id
file_open.writeline "datetime:"&now()
file_open.writeline "domain:"&domain
file_open.writeline "SendEpp:"&socket.send_client
file_open.writeline "ReceiveEpp:"&socket.re_server
file_open.writeline "#--------------------2-----------------------#"
if err_code=0 then
admin_id=socket.user_id
' dbstring="insert into contacts(password,reg_name,org,address1,address2,address3,city,province,country,postalcode,telephone,fax,email,reg_name_cn,org_cn)values("&pwd1&",'"&admin_name&"','"&admin_org&"','"&admin_street1&"','"&admin_street2&"','"&admin_street3&"','"&admin_city&"','"&admin_sp&"','"&admin_cc&"','"&admin_pc&"','"&admin_voice&"','"&admin_fax&"','"&admin_email&"','"&admin_name_cn&"','"&admin_org_cn&"')"
' db.execute(dbstring)
' if db.errors.count>0 then
' err_code=10012
' exit function
' else
' err_code=0
' end if
' dbstring="select max(contact_id) as contact_id from contacts"
' set rs=db.execute(dbstring)
' contact_admin=rs("contact_id")
end if
'发送技术人
call socket.socket_create_contactor(clID,pwd,domaintype,tech_name,tech_name_m,tech_org,tech_org_m,tech_street1,tech_street2,tech_city,tech_sp,tech_pc,tech_cc,tech_voice,tech_fax,tech_email,pwd1,apppurpose,nexuscategory)
err_code=socket.err_code
path="c:\log\reg_contactor_log.txt"
set fs=createobject("scripting.filesystemobject")
set file_open=fs.opentextfile(path,8,true)
file_open.writeline "member_id:"&customer_id
file_open.writeline "datetime:"&now()
file_open.writeline "domain:"&domain
file_open.writeline "SendEpp:"&socket.send_client
file_open.writeline "ReceiveEpp:"&socket.re_server
file_open.writeline "#-------------------3------------------------#"
if err_code=0 then
tech_id=socket.user_id
' dbstring="insert into contacts(password,reg_name,org,address1,address2,address3,city,province,country,postalcode,telephone,fax,email,reg_name_cn,org_cn)values("&pwd1&",'"&tech_name&"','"&tech_org&"','"&tech_street1&"','"&tech_street2&"','"&tech_street3&"','"&tech_city&"','"&tech_sp&"','"&tech_cc&"','"&tech_pc&"','"&tech_voice&"','"&tech_fax&"','"&tech_email&"','"&tech_name_cn&"','"&tech_org_cn&"')"
' db.execute(dbstring)
' if db.errors.count>0 then
' err_code=10013
' exit function
' else
' err_code=0
' end if
' dbstring="select max(contact_id) as contact_id from contacts"
' set rs=db.execute(dbstring)
' contact_tech=rs("contact_id")
end if
'
'发送付费人
call socket.socket_create_contactor(clID,pwd,domaintype,billing_name,billing_name_m,billing_org,billing_org_m,billing_street1,billing_street2,billing_city,billing_sp,billing_pc,billing_cc,billing_voice,billing_fax,billing_email,pwd1,apppurpose,nexuscategory)
err_code=socket.err_code
path="c:\log\reg_contactor_log.txt"
set fs=createobject("scripting.filesystemobject")
set file_open=fs.opentextfile(path,8,true)
file_open.writeline "member_id:"&customer_id
file_open.writeline "datetime:"&now()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -