%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
主机管理
<%
conn.open constr
p_id=requesta("p_id")
act=requesta("act")
if len(p_id)<=0 then url_return "参数错误",-1
sql="select * from databaselist where dbsysid="& p_id &" and dbu_id=" & 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("dbname")
s_ftppassword=rs("dbpasswd")
s_serverIP=rs("dbserverip")
s_buydate=rs("dbbuydate")
s_expiredate=rs("dbexpdate")
s_ProductId=rs("dbproid")
if act="changepwd" then
newpwd=requesta("p_pwd")
if not checkRegExp(newpwd,"^[\w]{5,20}$") then url_return "密码("& newpwd &")应为字母数字或_组成,长度在5-20位之间",-1
commandstr="mssql" & vbcrlf & _
"mod" & vbcrlf & _
"entityname:chgpwd" & vbcrlf & _
"databasename:" & s_comment & vbcrlf & _
"databaseuser:" & s_comment & vbcrlf & _
"dbupassword:" & 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("mssql",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
rs.close
conn.close
%>