<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("HOSTAUID")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request("id")="" Then
	ef=True
	ec="请输入产品ID！"
ElseIf Instr(1, Request("id"), "'", 1)>0 then
	ef=True
	ec="非法产品ID！"
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="产品ID应该是数字！"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsph = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_Product_Host where id='"&session("HOSTAUID")&"'"
			if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsph.Open Sql,conn,1,1
if dsph.Eof then
	ef=True
	ec="不存在的虚拟主机ID！"
end if
end if

if not ef then
	Set dsHostpdlist = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_HostProductlist where Hosttype='"&dsph("Hosttype")&"'"
	if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dsHostpdlist.Open Sql,conn,1,1
if dsHostpdlist.Eof then
	ef=True
	ec="产品不存在！"
end if
end if

if not ef then
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_Serverlist where id='"&dsph ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
if dsserver.Eof then
	ef=True
	ec="服务器不存在！"
end if
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/template-hostadm-top.asp"-->
　虚拟主机自助管理


<br>
<form action="selfhostmodifypass.asp" method="post" name="form1">
<TABLE 
            width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
  <TBODY>
    <TR>
      <TD width="22%" vAlign=middle bgColor=#494949>&nbsp; <font color="#FFFFFF">修改FTP密码：</font></TD>
      <TD width="27%" height="35" bgColor=#ffffff>　用户名：<%=session("username")%></TD>
      <TD width="51%" height="35" bgColor=#ffffff> 　(密码为14位以内的字母和数字)</TD>
    </TR>
    <TR>
      <TD width="22%" rowspan="6" vAlign=middle bgColor=#EEEEEE>&nbsp;</TD>
      <TD height="35" bgColor=#ffffff>　FTP用户名：<%=dsph("ftpname")%></TD>
      <TD width="51%" height="35" bgColor=#ffffff>　服务器IP为： 
        <%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Product_Host_IP where HostID="&dsph("id")
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
        <%=dsserver("ip")%>
<%else
while not dsX.eof
%><%=dsX("IP")%> <%
dsX.movenext
wend
end if%> </TD>
    </TR>
    <TR>
      <TD height="35" colspan="2" bgColor=#ffffff>　当前FTP密码：<%=dsph("ftppassword")%></TD>
      </TR>
    <TR>
      <TD height="35" colspan="2" bgColor=#ffffff>　
      <input name="op1" type="submit" id="op1" value="马上修改为另一随机密码">
      <font color="#FF0000">(为了安全强烈建议您使用随机密码)</font>      <input name="id" type="hidden" value="<%=Request("id")%>"></TD>
    </TR>
    <TR>
      <TD height="35" bgColor=#ffffff>　自己输入新的密码：        </TD>
      <TD height="35" bgColor=#ffffff><input name="newpassword" type="password" id="newpassword" size="14" maxlength="14">
        (长度大于10位不超过14位)</TD>
    </TR>
    <TR>
      <TD height="35" bgColor=#ffffff>　重复输入新的密码：</TD>
      <TD height="35" bgColor=#ffffff><input name="renewpassword" type="password" id="renewpassword" size="14" maxlength="14">
        (密码必须含有数字及字母)</TD>
    </TR>
    <TR>
      <TD height="35" colspan="2" bgColor=#ffffff>　
        <input name="op2" type="submit" id="op2" value="马上修改为自己输入的密码"></TD>
    </TR>
  </TBODY>
</TABLE>
</form>

　<a href="selfhostmodify.asp?id=<%=Request("id")%>"><font color="#000000">[返回上一页]</font></a>
<!--#include virtual="/inc-freehost-function/template-hostadm-end.asp"-->
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>