<!--#include file="conn.asp" -->
<% adm_power_page="7" %>
<!--#include file="admin_dn.asp" -->
<!--#include file="../inc/hostconfig.asp" -->
<!--#include file="../inc/iis.asp" -->
<% 

function rz(ch)
  if ch="" then
   rz="所有数据请写完整"
  end if
end function

if Trim(Request.QueryString("w"))="add" then
  IPAddress=Trim(Request.Form("IPAddress"))
  RootDirectory=Trim(Request.Form("RootDirectory"))
  ServerComment=Trim(Request.Form("ServerComment"))
  HostName=Trim(Request.Form("dns1"))
  PortNum=Trim(Request.Form("PortNum"))
  Computer=Trim(Request.Form("Computer"))
  AnonymousUserName=Trim(Request.Form("AnonymousUserName"))
  AnonymousUserPass=Trim(Request.Form("AnonymousUserPass"))
  LogFileDirectory=Trim(Request.Form("LogFileDirectory"))
  web_default=Trim(Request.Form("web_default"))
  HostName2=Trim(Request.Form("dns3"))

  msg=rz(RootDirectory)
  msg=rz(ServerComment)
  msg=rz(HostName)
  msg=rz(PortNum)
  msg=rz(Computer)
  msg=rz(AnonymousUserName)
  msg=rz(AnonymousUserPass)
  msg=rz(LogFileDirectory)
  msg=rz(web_default)
  msg=rz(HostName2)
  
  msg=trim(msg)
   if msg="" then
    ss=ASTCreateWebSite(IPAddress, RootDirectory, ServerComment, HostName, PortNum, Computer,True,AnonymousUserName,AnonymousUserPass,LogFileDirectory,web_default,HostName2)
    if ss="" then
	  msg="对不起 iis开设失败"
	  else
	  msg="开设成功当前iis id为"&ss 
	  sql="insert into web_logo(bh,userid,log,sl,je,ftp_user,ftp_password,ftp_path,web_dns) values (000000,'管理员"&session("adm_us")&"','管理员开设主机/|iisID="&ss&"',0,0,'空','空','"&RootDirectory&"','"&HostName&"')"
     conn.execute(sql)
	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">在线开通WEB绑定域名</font></strong></p>
<p>&nbsp;</p>
<form name="form1" method="post" action="host_web.asp?w=add">
  <table width="81%" height="266" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bordercolorlight="" bordercolordark="ffffff">
    <tr> 
      <td height="16" colspan="2" bgcolor="#F6F6F6">在线开通WEB <font color="#FF0000">★　* 
        的不能为空</font></td>
    </tr>
    <tr> 
      <td width="27%">服务器ip:</td>
      <td width="73%"><input name="IPAddress" type="text" id="IPAddress" size="16">
        如果不绑定ip请留空 </td>
    </tr>
    <tr> 
      <td height="22">文件路径:</td>
      <td><input name="RootDirectory" type="text" id="RootDirectory" value="c:\">
        绝对路径 如：c:\web<font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>WEB站点说明:</td>
      <td><input name="ServerComment" type="text" id="ServerComment" value="我的站点">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>绑定的域名1:</td>
      <td>http:// <input name="dns1" type="text" id="dns1" size="15">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>绑定的域名2:</td>
      <td>http:// <input name="dns3" type="text" id="dns3" size="15">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>端口号:</td>
      <td><input name="PortNum" type="text" id="PortNum" value="80" size="4">
        一般不需修改只能为数字<font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>计算机名:</td>
      <td><input name="Computer" type="text" id="Computer" value="localhost" size="15">
        一般不需修改 <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>匿名访问的用户名:</td>
      <td><input name="AnonymousUserName" type="text" id="AnonymousUserName" size="10">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>匿名访问的密码:</td>
      <td><input name="AnonymousUserPass" type="text" id="AnonymousUserPass" size="10">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr>
      <td>日志文件地址:</td>
      <td><input name="LogFileDirectory" type="text" id="LogFileDirectory" value="c:\" size="20">
        绝对路径<font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>默认文件:</td>
      <td><input name="web_default" type="text" id="web_default" value="Default.htm,Default.asp,Index.htm,Index.asp,index.html" size="40">
        <font color="#FF0000">*</font></td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="-提交-"></td>
    </tr>
  </table>
</form>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><%= msg %>&nbsp;</td>
  </tr>
</table>
<p><font color="#FF0000">★如果你需要开设空间，请先用web在线开通ftp再来开设web,在这里所开设的空间将不加入到用户订单中</font></p>
<p>&nbsp; </p>
</body>
</html>
