📄 domain_manage_class.asp
字号:
db.execute(dbstring)
dbstring="update contacts set country='"&cc&"' where contact_id="&contact_id
db.execute(dbstring)
dbstring="update contacts set telephone='"&voice&"' where contact_id="&contact_id
db.execute(dbstring)
dbstring="update contacts set fax='"&fax&"' where contact_id="&contact_id
db.execute(dbstring)
dbstring="update contacts set email='"&email&"' where contact_id="&contact_id
db.execute(dbstring)
if db.errors.count>0 then
err_code=8004
else
err_code=0
end if
else
err_code=socket.err_code
exit function
end if
call socket.socket_close()
end function
%>
<%
'************************************'
' 修改PWD '
'************************************'
public function ChangePWD()
call socket.socket_update_domain(clID,pwd,domaintype,domain,dns1,dns2,pw)
'以下两句为测试用
dim tempfile,temppath,tempfs
temppath="c:\log\manage_changepwd_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_password='"&pw&"' where domain_name='"&domain&"' and member_id="&customer_id
' db.execute(dbstring)
'
' if db.errors.count>0 then
' err_code=8005
' reponse.write "用户已经更改PW,但入库过程中发生错误!请查看LOG信息!"
' dim file_open,path,fs
' path=server.mappath(".\changednslog.txt")
' set fs=createobject("scripting.filesystemobject")
' set file_open=fs.opentextfile(path,2)
' file_open.writeline "用户:"&customer_id
' file_open.writeline "更新域名:"&domain
' file_open.writeline "更改pw:"&PW
' fiel_open.writeline "#-------------------------------------------#"
' file_open.close
' else
' err_code=0
' end if
else
err_code=socket.err_code
end if
call socket.socket_close()
end function
%>
<%
'************************************'
' 修改reginformation '
'************************************'
public function ChangeReg()
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\socket_update_contactor.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
err_code=0
else
err_code=socket.err_code
end if
end function
%>
<%
'************************************'
' 查询框select '
'************************************'
public function domainselect()
response.write "<center><table class='uaeww' cellspacing='1' cellpadding='1' bgcolor='#e2e2e2' border='1'>"
response.write "<form method='post' action=''>"
response.write "<tr><td><select name='selectedname'>"
response.write "<option>add_date</option>"
response.write "<option>end_date</option>"
response.write "<option>domain_name</option>"
response.write "<option>domain_code</option>"
response.write "</select></td><td>"
response.write "<select name='selectedtype'>"
response.write "<option>=</option>"
response.write "<option>like</option>"
response.write "</select></td><td>"
response.write "<input type='text' size=20 name='selectedtext'></td>"
response.write "<td><input type='submit'></td></tr>"
response.write "</form></table></center>"
end function
%>
<%
'************************************'
' 列表函数list '
'************************************'
public function domainlist()
on error resume next
dim page_size,page_no,page_total,dbstring,rs
page_size=pagenum()
if not request("submit")="" then
dim startyear,startmonth,startday,toyear,tomonth,today
startyear=request("startyear")
startmonth=request("startmonth")
startday=request("startday")
toyear=request("toyear")
tomonth=request("tomonth")
today=request("today")
dim domain_name,domain_list
domain_name=request("domain_name")
domain_list=request("selectedname")
if not startyear="年" and not startmonth="月" and not startday="日" and not toyear="年" and not tomonth="月" and not today="日" then
dim startdate,todate
startdate=cdate(startyear&"-"&startmonth&"-"&startday)
todate=cdate(toyear&"-"&tomonth&"-"&today)
if domain_name="" then
dbstring="select domain_password,domain_name,domain_dns1,domain_dns2,domain_code,add_date,add_date+domain_year*365 as end_date from domain_info where state=0 and member_id="&session("real_member_id")&" and add_date between '"&startdate&"' and '"&todate&"' ordey by "&domain_list
else
dbstring="select domain_password,domain_name,domain_dns1,domain_dns2,domain_code,add_date,add_date+domain_year*365 as end_date from domain_info where state=0 and member_id="&session("real_member_id")&" and add_date between '"&startdate&"' and '"&todate&"' and domain_name='"&domain_name&"' order by "&domain_list
end if
else
if domain_name="" then
dbstring="select domain_password,domain_name,domain_dns1,domain_dns2,domain_code,add_date,add_date+domain_year*365 as end_date from domain_info where state=0 and member_id="&session("real_member_id")&" order by "&domain_list
else
dbstring="select domain_password,domain_name,domain_dns1,domain_dns2,domain_code,add_date,add_date+domain_year*365 as end_date from domain_info where state=0 and member_id="&session("real_member_id")&"and domain_name='"&domain_name&"' order by "&domain_list
end if
end if
else
dbstring="select domain_password,domain_name,domain_dns1,domain_dns2,domain_code,add_date,add_date+domain_year*365 as end_date from domain_info where state=0 and member_id="&session("real_member_id")
end if
set rs=server.createobject("adodb.recordset")
rs.open dbstring,db,1
if rs.bof or rs.eof then
response.write "数据库没有记录!"
else
response.write "<center>"
response.write "<table align=center border=0 cellpadding=0 cellspacing=2 width='80%' class='uaeww'>"
response.write "<tr bgcolor='#ddddd' align='center'>"
response.write "<td nowrap><b>选择</b></td>"
response.write "<td nowrap><b>域名</b></td>"
response.write "<td nowrap><b>DNS1</b></td>"
response.write "<td nowrap><b>DNS2</b></td>"
response.write "<td nowrap><b>注册时间</b></td>"
response.write "<td nowrap><b>到期时间</b></td>"
response.write "<td nowrap><b>操作</b></td>"
response.write "</tr>"
if request.querystring("page_no")="" then
page_no=1
else
page_no=cint(request.querystring("page_no"))
end if
rs.pagesize=page_size
page_total=rs.pagecount
rs.absolutepage=page_no
dim i
i=page_size
response.write "<form action='' method='post'>"
do while not rs.eof and i>0
i=i-1
if i mod 2 =1 then
response.write "<tr bgcolor='#F2F8FD' align='center' >"
else
response.write "<tr bgcolor='white' align='center'>"
end if
response.write "<td nowrap><input type='radio' name='selected' value='"&rs("domain_name")&"' checked></td>"
response.write "<td nowrap><a href='.\domain_manage_changewhois.asp?domain_name="&trim(rs("domain_name"))&"'>"&rs("domain_name")&"</a></td>"
response.write "<td nowrap><a href='.\domain_manage_changedns.asp?domain_name="&trim(rs("domain_name"))&"'>"&rs("domain_dns1")&"</a></td>"
response.write "<td nowrap>"&rs("domain_dns2")&"</td>"
response.write "<td nowrap><a href='.\domain_manage_renew.asp?domain_name="&trim(rs("domain_name"))&"'>"&rs("add_date")&"</a></td>"
response.write "<td nowrap>"&rs("end_date")&"</td>"
response.write "<td nowrap><a href='.\domain_manage_resolve.asp?domain_name="&trim(rs("domain_name"))&"'>解析域名</a></td>"
response.write "</tr>"
rs.movenext
loop
response.write "</table>"
response.write "<input type='submit' name='renew' value='续费'>"
response.write "<input type='submit' name='delete' value='删除'>"
response.write "<input type='submit' name='modify' value='修改密码'><br>"
response.write "</form>"
if not request("renew")="" then
response.redirect "..\domain_manage\domain_manage_renew.asp?domain_name="&trim(request("selected"))
end if
if not request("delete")="" then
response.redirect "..\domain_manage\domain_manage_delete.asp?domain_name="&trim(request("selected"))
end if
if not request("modify")="" then
response.redirect "..\domain_manage\domain_manage_changepwd.asp?domain_name="&trim(request("selected"))
end if
response.write "<center><p><t>请选择数据页:</t>"
for i=1 to page_total
if i=page_no then
response.write i&" "
else
response.write "<a href='domain_manage_list.asp?page_no="&i&"'>"&i&"</a> "
end if
next
response.write "</center></center>"
end if
end function
%>
<%
function domainresolve()
dim resolve_domain,resolve_type,resolve_ip,mail_ip
resolve_domain=request("resolve_domain")
resolve_type=request("resolve_type")
resolve_ip=request("resolve_ip")
mail_ip=request("mail_ip")
dim dbstring,rs
dbstring="select count(*) as temp from domain_info where domain_name='"&resolve_domain&"' and member_id="&session("real_member_id")
set rs=db.execute(dbstring)
if rs("temp")=0 then
err_code=10023
exit function
end if
dbstring="select count(*) as temp from domain_resolve where resolve_domain='"&resolve_domain&"' and member_id="&session("real_member_id")
set rs=db.execute(dbstring)
if not rs("temp")=0 then
dbstring="update domain_resolve set resolve_ip='"&resolve_ip&"' where resolve_domain='"&resolve_domain&"'"
db.execute(dbstring)
dbstring="update domain_resolve set mail_ip='"&mail_ip&"' where resolve_domain='"&resolve_domain&"'"
db.execute(dbstring)
dbstring="update domain_resolve set flag=0 where resolve_domain='"&resolve_domain&"'"
db.execute(dbstring)
else
dbstring="insert into domain_resolve (member_id,resolve_domain,resolve_type,resolve_ip,mail_ip,flag,create_time) values ("&session("real_member_id")&",'"&resolve_domain&"',"&resolve_type&",'"&resolve_ip&"','"&mail_ip&"',0,'"&now()&"')"
db.execute(dbstring)
end if
end function
%>
<%
'************************************'
' 退出函数logout '
'************************************'
function logout()
end function
%>
<%
end class
%>
<%
'下面为错误信息处理
'8000 数据库domainquery错误
'8001 得用户余额chkbalance错误
'8002 用户余额不足
'8003 续费扣款入库错误
'8004 修改DNS入库时错误
'8005 修改PW入库时错误
'8006 删除域名入库错误
'
'
'
'
'
'
'
'
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -