⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 domain_manage_class.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
📖 第 1 页 / 共 3 页
字号:
		'on error resume next
		dim dbstring,rs,tempprice
		call socket.socket_renew_domain(clID,pwd,domaintype,domain,addperiod)
		dim tempfile,temppath,tempfs
		temppath="c:\log\manage_renew_log.txt"
		set tempfs=createobject("scripting.filesystemobject")
		set tempfile=tempfs.opentextfile(temppath,8,true)
		tempfile.writeline "member_id:"&customer_id
		tempfile.writeline "datetime:"&now()
		tempfile.writeline "domain:"&domain
		tempfile.writeline "SendEpp:"&socket.send_client
		tempfile.writeline "ReceiveEpp:"&socket.re_server
		tempfile.writeline "#-------------------------------------------#"
		'以下两句是为测试时用
		'response.write socket.send_client&"<br>"
		'response.write socket.re_server
		if socket.err_code=0 then		
			'如果成功则更新数据库的信息
					
			''===============扣除用户的续费费用================'
			''找出购物车的cart_id
			'dbstring="select * from domain_info where state=0 and domain_name='"&domain&"'"
			'set rs=db.execute(dbstring)
			'temp_cart_id=trim(rs("cart_id"))
			''找出续费所需费用
			'dbstring="select * from member_price where member_level=(select member_level from members where member_id="&session("real_member_id")&") and term_id=1000 and item_id=(select item_id from term_detail where level_id="&domaintype&" and term_id=1000 and title='"&domain_tail&"') and sum="&addperiod&" and opr_id=2"
			'set rs=db.execute(dbstring)
			'
			'tempprice=trim(rs("price"))
			'
			''检查用户余额是否够用
	    	'
			'if chkbalance()>tempprice then
			'	
			'	'插入资金记录money_info
			'	if not isnumeric(session("member_id"))=true then
			'		dbstring="insert into money_info (source_id,cart_id,ser_id,member_id,order_date,order_type,mode_id,order_amount,amount,admin_id) values ("&term_id&","&temp_cart_id&",1,"&customer_id&",'"&now()&"',2,"&mode_id&","&tempprice&","&tempprice&",99)"
			'		db.execute(dbstring)
			'	else 
			'		dbstring="insert into money_info (source_id,cart_id,ser_id,member_id,order_date,order_type,mode_id,order_amount,amount,admin_id) values ("&term_id&","&temp_cart_id&",1,"&customer_id&",'"&now()&"',2,"&mode_id&","&tempprice&","&tempprice&","&session("member_id")&")"
			'		db.execute(dbstring)
			'	end if
			'	'更新用户的余额members
			'	dbstring="update members set account=account-"&tempprice&" where member_id="&customer_id
			'	db.execute(dbstring)
			'	
			'	if db.errors.count>0 then
			'		err_code=8003
			'		reponse.write "用户已经续费,但扣费过程中发生错误!请查看LOG信息!"
	    	'		
			'		dim file_open,path,fs
			'		path=server.mappath(".\renewlog.txt")
			'		set fs=createobject("scripting.filesystemobject")
			'		set file_open=fs.opentextfile(path,8)
			'		file_open.writeline "用户:"&customer_id
			'		file_open.writeline "续费域名:"&domain
			'		file_open.writeline "续费年数:"&addperiod
			'		file_open.writeline "续费金额:"&tempprice
			'		file_open.writeline "#-------------------------------------------#"
			'		file_open.close 
			'		exit function
			'	end if 
			'
			'else
			'	err_code=8002
			'	exit function
			'end if
	    	'
			'response.write "<center>***扣除续费费用:"&tempprice&"元***<center><br>"
			'
			''更新域名的年限
			'dbstring="update domain_info set domain_year=domain_year+"&addperiod&" where domain_name='"&domain&"'"
			'db.execute(dbstring)
			'
			'if db.errors.count>0 then
			'	response.write "数据库domain_info更新错误,请检查!"
			'else
			'	err_code=0
			'end if 
			''发信过程通知管理员
			'dim Tmailto,Thostip,Tuser,Tpwd,Tcheck
			'dbstring="select * from web_config"
			'set rs=db.execute(dbstring)
			'Tmailto=trim(rs("support_email"))
			'Thostip=trim(rs("smtp_server"))
			'Tuser=trim(rs("smtp_user"))
			'Tpwd=trim(rs("smtp_password"))
			'Tcheck=trim(rs("smtp_check"))
			'dim Tsubject
			'Tsubject="(Template4.0)域名续费提示!"
			'dim Tbody
			'Tbody="您好!"&chr(13)&_
			'"会员号:"&session("real_member_id")&chr(13)&_
			'"购买产品号:"&term_id&"-"&item_id&chr(13)&_
			'"域名:"&domain&chr(13)&_
			'"价格:"&tempprice&chr(13)&_
			'"年限:"&addperiod
			'dim tempmail
			'set tempmail = new Mymail
			'tempmail.Thostip=Thostip
			'tempmail.Tsubject=Tsubject
			'tempmail.Tuser=Tuser
			'tempmail.Tpwd=Tpwd
			'tempmail.Tmailto=Tmailto
			'tempmail.Tmailfrom=Tmailto
			'tempmail.Tbody=Tbody
			'tempmail.Tcheck=Tcheck
			'call tempmail.sendmail()
		else
			err_code=socket.err_code
		end if
		call socket.socket_close()
	end function
	%>
	<%
	'######################################
	%>
	
	<%
	'************************************'
	'		域名删除	     '
	'************************************'
	public function Delete()
		'初始化参数,判断mode_id
		on error resume next
		if dateadd("d",domain_adddate,3)>date() then
			call socket.socket_delete_domain(clID,pwd,domaintype,domain)
			dim tempfile,temppath,tempfs
			temppath="c:\log\manage_delete_log.txt"
			set tempfs=createobject("scripting.filesystemobject")
			set tempfile=tempfs.opentextfile(temppath,8,true)
			tempfile.writeline "member_id:"&customer_id
			tempfile.writeline "datetime:"&now()
			tempfile.writeline "domain:"&domain
			tempfile.writeline "SendEpp:"&socket.send_client
			tempfile.writeline "ReceiveEpp:"&socket.re_server
			tempfile.writeline "#-------------------------------------------#"
			'以下两句是为测试时用
			'response.write socket.send_client&"<br>"
			'response.write socket.re_server
			if socket.err_code=0 then
				'+++++如果成功则更新数据库的信息+++++	
				'===============还给用户注册费用================'
				select case right(domain,4) 
				case ".com" mode_id=1004
				case ".net" mode_id=2004
				case ".org" mode_id=3004
				case ".biz" mode_id=4004
				end select
				
				select case right(domain,5) 
				case ".info" mode_id=5004
				end select
				
				select case right(domain,3) 
				case ".us" mode_id=6004
				case ".cn" mode_id=7004
				end select
				
				
				select case right(domain,4) 
				case ".com" mode_id=1002
				case ".net" mode_id=2002
				case ".org" mode_id=3002
				case ".biz" mode_id=4002
				end select
				
				select case right(domain,5) 
				case ".info" mode_id=5002
				end select
				
				select case right(domain,3) 
				case ".us" mode_id=6002
				case ".cn" mode_id=7002
				end select
			
				set Rs=Cn.Execute("SP_DNModify '1',"&session("UserID")&",'"&DN_ID&"','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18',',"&Request.ServerVariables("REMOTE_ADDR")&"'")
				response.write "<font color=red>&nbsp;&nbsp;&nbsp;&nbsp;" & rs("msg") & "</font><br>"
				rs.close
				set rs=nothing
			else
				err_code=socket.err_code
			end if
			'发信过程通知管理员
			'dim Tmailto,Thostip,Tuser,Tpwd,Tcheck
			'dbstring="select * from web_config"
			'set rs=db.execute(dbstring)
			'Tmailto=trim(rs("support_email"))
			'Thostip=trim(rs("smtp_server"))
			'Tuser=trim(rs("smtp_user"))
			'Tpwd=trim(rs("smtp_password"))
			'Tcheck=trim(rs("smtp_check"))
			'dim Tsubject
			'Tsubject="(Template4.0)域名删除提示!"
			'dim Tbody
			'Tbody="您好!"&chr(13)&_
			'"会员号:"&session("real_member_id")&chr(13)&_
			'"购买产品号:"&Tterm_id&"-"&temp_item_id&chr(13)&_
			'"域名:"&domain&chr(13)&_
			'"退还费用:"&Tamount&chr(13)&_
			'"删除手续费:"&Tprice
			'dim tempmail
			'set tempmail = new Mymail
			'tempmail.Thostip=Thostip
			'tempmail.Tsubject=Tsubject
			'tempmail.Tuser=Tuser
			'tempmail.Tpwd=Tpwd
			'tempmail.Tmailto=Tmailto
			'tempmail.Tmailfrom=Tmailto
			'tempmail.Tbody=Tbody
			'tempmail.Tcheck=Tcheck
			'call tempmail.sendmail()
		else 
			'超期
			err_code=8007
			exit function
		end if
		call socket.socket_close()
	end function
	%>
	
	<%
	'************************************'
	'		修改DNS		     '
	'************************************'
	public function ChangeDNS()
		call socket.socket_update_domain(clID,pwd,domaintype,domain,dns1,dns2,pw)
		'以下两句为测试用
		dim tempfile,temppath,tempfs
		temppath="c:\log\manage_changedns_log.txt"
		set tempfs=createobject("scripting.filesystemobject")
		set tempfile=tempfs.opentextfile(temppath,8,true)
		tempfile.writeline "member_id:"&customer_id
		tempfile.writeline "datetime:"&now()
		tempfile.writeline "domain:"&domain
		tempfile.writeline "SendEpp:"&socket.send_client
		tempfile.writeline "ReceiveEpp:"&socket.re_server
		tempfile.writeline "#-------------------------------------------#"
		'response.write socket.send_client&"<br>"
		'response.write socket.re_server
		if socket.err_code=0 then
		
			'dim dbstring
			'dbstring="update domain_info set domain_dns1='"&dns1&"' where domain_name='"&domain&"' and member_id="&customer_id
			'db.execute(dbstring)
			'dbstring="update domain_info set domain_dns2='"&dns2&"' where domain_name='"&domain&"' and member_id="&customer_id
			'db.execute(dbstring)
			'if db.errors.count>0 then			
			'	err_code=8004
			'	reponse.write "用户已经更改DNS,但入库过程中发生错误!请查看LOG信息!"
			'	dim file_open,path,fs
			'	path=server.mappath(".\changednslog.txt")
			'	set fs=createobject("scripting.filesystemobject")
			'	set file_open=fs.opentextfile(path,8)
			'	file_open.writeline "用户:"&customer_id
			'	file_open.writeline "更新域名:"&domain
			'	file_open.writeline "更改DNS1:"&dns1
			'	fiel_open.writeline "更改DNS2:"&dns2
			'	fiel_open.writeline "#-------------------------------------------#"
			'	file_open.close			
			'else
			'	err_code=0 
			'end if
		else
			err_code=socket.err_code
			call socket.socket_close()
			exit function
		end if
		'response.write "新的DNS如下:<br>DNS1:"&dns1
		'response.write "<br>DNS2:"&dns2&"<BR>"
		call socket.socket_close()
	end function
	%>
	<%
	'************************************'
	'		修改whois	     '
	'************************************'
	public function changewhois()
	call socket.socket_update_contactor(clID,pwd,domaintype,domain,contacttype,name,org,street1,street2,city,sp,pc,cc,voice,fax,email,pw,apppurpose,nexuscategory)
	'以下两句为测试用
	dim tempfile,temppath,tempfs
	temppath="c:\log\manage_changewhois_log.txt"
	set tempfs=createobject("scripting.filesystemobject")
	set tempfile=tempfs.opentextfile(temppath,8,true)
	tempfile.writeline "member_id:"&customer_id
	tempfile.writeline "datetime:"&now()
	tempfile.writeline "domain:"&domain
	tempfile.writeline "SendEpp:"&socket.send_client
	tempfile.writeline "ReceiveEpp:"&socket.re_server
	tempfile.writeline "#-------------------------------------------#"
	if socket.err_code=0 then
	dim dbstring
	dbstring="update contacts set org='"&org&"' where contact_id="&contact_id
	db.execute(dbstring)
	dbstring="update contacts set address1='"&street1&"' where contact_id="&contact_id
	db.execute(dbstring)
	
	dbstring="update contacts set address2='"&street2&"' where contact_id="&contact_id
	db.execute(dbstring)
	
	dbstring="update contacts set city='"&city&"' where contact_id="&contact_id
	db.execute(dbstring)
	
	dbstring="update contacts set province='"&sp&"' where contact_id="&contact_id
	db.execute(dbstring)
	
	
	dbstring="update contacts set postalcode='"&pc&"' where contact_id="&contact_id

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -