<!--#include file="conn.asp" -->
<% adm_power_page="7" %>
<!--#include file="admin_dn.asp" -->
<!--#include file="../inc/hostconfig.asp" -->
<!--#include file="../inc/ftp.asp" -->
<% 
function rz(ch)
  if ch="" then
   rz="所有数据请写完整"
  end if
end function

if Trim(Request.QueryString("w"))="add" then
 User_Name=Trim(Request.Form("User_Name"))
 User_pass=Trim(Request.Form("User_pass"))
 ftp_host=Trim(Request.Form("ftp_host"))
 ftp_path=Trim(Request.Form("ftp_path"))
 ftp_dat=Trim(Request.Form("ftp_dat"))
 
 msg=msg&rz(User_Name)
 msg=msg&rz(User_pass)
 msg=msg&rz(ftp_host)
 msg=msg&rz(ftp_path)
 msg=msg&rz(ftp_dat)
 
  msg=trim(msg)
   if msg="" then
    ss=auto_ftp(User_Name,User_pass,ftp_host,ftp_path,seuv_filepath,ftp_dat)	
	if ss<>"ok" then
	msg=ss
	else
	'写入日志
	 msg="当前FTP开设成功!!!"
	 sql="insert into web_logo(bh,userid,log,sl,je,ftp_user,ftp_password,ftp_path,web_dns) values (000000,'管理员"&session("adm_us")&"','管理员开设FTP/|FtpName="&User_Name&"',"&ftp_dat&",0,'"&User_Name&"','"&User_pass&"','"&ftp_path&"','空')"
     conn.execute(sql)
	 Response.Write "<script>alert('ftp开设成功')</script>"
	end if
  end if
end if

 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>:::管理页面:::</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="4" topmargin="4">
<p><strong><font color="#990000">在线开通FTP绑定域名</font></strong> </p>
<form name="form1" method="post" action="host_ftp.asp?w=add">
  <table width="81%" height="154" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="" bordercolordark="ffffff">
    <tr bgcolor="#FAFAFA"> 
      <td height="18" colspan="2">带<font color="#FF0000"> *</font> 的为必须填项</td>
    </tr>
    <tr> 
      <td width="25%">Ftp用户名:</td>
      <td width="75%"><input name="User_Name" type="text" id="User_Name" size="15">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td height="23">Ftp密码:</td>
      <td><input name="User_pass" type="text" id="User_pass" size="15">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>Ftp空间大小:</td>
      <td><input name="ftp_host" type="text" id="ftp_host" value="100" size="10">
        M <font color="#FF0000">* 只能为数字</font></td>
    </tr>
    <tr> 
      <td>所在目录:</td>
      <td><input name="ftp_path" type="text" id="ftp_path" value="d:\ftp" size="20">
        请与绝对路径 如： c:\ftp,请先建立物理路径</td>
    </tr>
    <tr> 
      <td>开设年限:</td>
      <td><input name="ftp_dat" type="text" id="ftp_dat" value="1" size="5">
        <font color="#FF0000">*</font> 只能为数字</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="-注册-"></td>
    </tr>
  </table>
</form>
<p align="center"><font color="#FF0000"><%= msg %></font> </p>
</body>
</html>
