主机管理
<%
conn.open constr
p_id=requesta("p_id")
act=requesta("act")
if len(p_id)<=0 then url_return "参数错误",-1
sql="select * from mailsitelist where m_sysid="& p_id &" and m_ownerid=" & session("u_sysid")
rs.open sql,conn,1,3
if rs.eof and rs.bof then rs.close:conn.close:url_return "没有找到此产品",-1
s_comment=rs("m_bindname")
s_ftppassword=rs("m_password")
s_serverIP=rs("m_serverip")
s_buydate=rs("m_buydate")
s_expiredate=rs("m_expiredate")
s_ProductId=rs("m_productId")
if act="changepwd" then
newpwd=requesta("p_pwd")
if not checkRegExp(newpwd,"^[\w]{5,20}$") then url_return "密码("& newpwd &")应为字母数字或_组成,长度在5-20位之间",-1
commandstr="corpmail" & vbcrlf & _
"mod" & vbcrlf & _
"entityname:mmasterpass" & vbcrlf & _
"domainname:" & s_comment & vbcrlf & _
"upassword:" & newpwd & vbcrlf & _
"." & vbcrlf
renewdata=pcommand(commandstr,session("user_name"))
if left(renewdata,3)="200" then
alert_redirect "修改密码成功",request("script_name") & "?p_id=" & p_id
else
alert_redirect "修改密码失败:"& renewdata ,request("script_name") & "?p_id=" & p_id
end if
rs.close
conn.close
response.end
elseif act="syn" then
returnstr=doUserSyn("mail",s_comment)
if left(returnstr,3)="200" then
alert_redirect "重置数据成功",request("script_name") & "?p_id=" & p_id
else
alert_redirect "重置数据失败" & returnstr,request("script_name") & "?p_id=" & p_id
end if
end if
''''''''''''''''''''''''''''''''''''''赠品相关''''''''''''''''''''''''''''''''''''
set prs=server.CreateObject("adodb.recordset")
domainFree=false
hostFree=false
mssqlFree=false
mysqlFree=false
preSql="select top 1 a.*,b.pre1,b.pre2,b.pre3,b.pre4 from protofree a inner join mailsitelist b on (b.m_buytest=false and a.proid=b.m_productId and b.m_ownerid=" & session("u_sysid") & " and b.m_sysid=" & p_id & " and a.type='mail') where not exists(select sysid from protofree where b.m_productid in (freeproid1,freeproid2,freeproid3,freeproid4) and type='mail')"
prs.open preSql,conn,3
if not prs.eof then
if len(trim(prs("pre1")&""))=0 and len(prs("freeproid1")&"")>0 and dateDiff("d",s_buydate,date)<=15 and isgetFreeProduct("mail",s_comment,prs("freeproid1")) then domainFree=true
if len(trim(prs("pre2")&""))=0 and len(prs("freeproid2")&"")>0 and isgetFreeProduct("mail",s_comment,prs("freeproid2")) then hostFree=true
if len(trim(prs("pre3")&""))=0 and len(prs("freeproid3")&"")>0 and isgetFreeProduct("mail",s_comment,prs("freeproid3")) then mysqlFree=true
if len(trim(prs("pre4")&""))=0 and len(prs("freeproid4")&"")>0 and isgetFreeProduct("mail",s_comment,prs("freeproid4")) then mssqlFree=true
end if
prs.close
set prs=nothing
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
rs.close
conn.close
%>