<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request("username")="" Then
	ef=True
	ec="请输入用户名！"
ElseIf RegExpTest("[^A-Za-z0-9]",Request("username")) Then
	ef=True
	ec="用户名中有非法字符！"
ElseIf not IsNumeric(Request("id"))  Then
	ef=True
	ec="ID应该是数字！"
elseIf session("canadmhostadd")="" And session("canadmhostaddtest")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where username='"&Request("username")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,1
if ds.eof then
	ef=True
	ec="用户不存在!"
end if
end if

if not ef then
	Set dshost = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_HostProductlist where id='"&Request("id")&"'"
	if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
	dshost.Open Sql,conn,1,1
if dshost.Eof then
	ef=True
	ec="产品不存在！"
else
If dshost("cantwodb")=true Then
canselectdb=false
else
canselectdb=true
End If
'读取月付
PAY_Month=dshost("PAY_Month")
PAY_Season=dshost("PAY_Season")
PAY_halfyear=dshost("PAY_halfyear")
PAY_Nextyear=dshost("PAY_Nextyear")
PAY_2year=dshost("PAY_2year")
PAY_3year=dshost("PAY_3year")
PAY_4year=dshost("PAY_4year")
PAY_5year=dshost("PAY_5year")

end if
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD align="left"><table height="59"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="7" background="img/midtop.gif">&nbsp;</td>
          <td width="90" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="admhost.asp"><font color="#FFFFFF"><strong>虚拟主机管理</strong></font></a></td>
          <td width="5" background="img/midtop2.gif">&nbsp;</td>
        </tr>
      </table></TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF">
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#C8DAFF">
  <tr height="24">
    <td width="13%" align="right" bgcolor="#ECF2FF"> 用户名：</td>
    <td width="87%" align="left" bgcolor="#FAFAFA">　<%=ds("username")%> 　 <a href="javascript:document.formTop.action='/user/changeuser.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">切换成此用户角色>>>(用户区点注销会自动退回管理区)</font></a> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 金额：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("usermoney")%> 　</td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 电子邮件：</td>
    <td align="left" bgcolor="#FAFAFA">　<a href=mailto:<%=ds("email")%>><font color="#000000"><%=ds("email")%></font></a> 　<a href="emailone.asp?email=<%=ds("email")%>&title=<%=ds("username")%>用户您好" target="_blank">发邮件给这个用户&gt;&gt;&gt;</a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> QQ：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("qq")%> 　<a href="tencent://message/?uin=<%=ds("qq")%>&Site=<%=Request.ServerVariables("SERVER_NAME")%>&Menu=yes" title="发送即时消息给用户"" target="_blank">发送即时消息给用户&gt;&gt;</a>　　　　　　　　　　　　　　　　<a href="deluser.asp?username=<%=ds("username")%>"><font color="#000000">马上删除此用户&gt;&gt;&gt;</font></a>　 </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right">代理名：</td>
    <td align="left" bgcolor="#FAFAFA">　
        <%if ds("agent1")<>"n" then%>
        <a href="searchagent.asp?username=<%=ds("agent1")%>" target="_blank"><font color="blue"><%=ds("agent1")%></font></a>
        <%end if%></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"><div align="right">中文名：</div></td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("truename")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 联系地址：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("contact")%> 　联系人：<%=ds("contact")%> 邮编：<%=ds("postid")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 电话：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("tel")%> 　手机：<%=ds("mobi")%> <a href="smsone.asp?SendNum=<%=ds("mobi")%>&Content=<%=ds("username")%>用户您好" target="_blank">发短信给这个手机&gt;&gt;&gt;</a> 传真：<%=ds("fax")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 备注：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("coreinfo")%>　<a href="javascript:document.formTop.action='/user/changeuser.asp?gourl=/user/modify.asp';document.formTop.username.value='<%=ds("username")%>';document.formTop.submit();"><font color="#000000">修改用户资料>>>(用户区点注销会自动退回管理区)</font></a></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 身份证号码：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("perid")%></td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 注册ip：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("regip")%> </td>
  </tr>
  <tr height="24">
    <td bgcolor="#ECF2FF" align="right"> 注册时间：</td>
    <td align="left" bgcolor="#FAFAFA">　<%=ds("regtime")%> </td>
  </tr>
</table>
<br>

	
	
<form action="admhost3.asp" method="post" name="autoopen"><DIV class="tableborder">
<table width="100%"  border="0" align="center" cellpadding="2" cellspacing="1">
  <tr align="center" bordercolor="#000000" bgcolor="#999999">
    <td height="24" colspan="4" background="img/tablebg.gif"><font color="#990000"><font color="#FFFFFF">开通虚拟主机</font></font></td>
  </tr>
  <tr bordercolor="#000000" bgcolor="#E4EAF2">
    <td width="16%" height="30"><font color="#000000"> 　　　 </font></td>
    <td width="84%" colspan="3" align="left">　用户名：
      <input name="username" type="text" id="username" size="10" value="<%=ds("username")%>">
分配的空间大小：
<input name="spacelimit" type="text" id="spacelimit" size="4" value="<%=dshost("spacelimt")%>">
M IIS连接数：
<input name="MaxConnections" type="text" id="MaxConnections" size="8" value="<%=dshost("MaxConnections")%>">
<br>
　多少用户共用一个应用程序池(IIS6):
<input name="AppPoolnum" type="text" id="AppPoolnum" size="3" value="<%=dshost("AppPoolnum")%>">
<br>
　带宽上限(IIS 6)：
<input name="MaxBandwidth" type="text" id="MaxBandwidth" size="10" maxlength="10" value="<%=dshost("MaxBandwidth")%>">
字节/秒(默认是4294967295表示无限制)<br>
<br>
<br>
<%if Application("openmustre")=true  and Application("beianusecode")=1 then%>
        　绑定域名前，您可以检查是否备案<br>
　输入要检查的新域名：
          <input name="icpdomainnowcheck" type="text" size="20" onBlur="doicpcheck(this.value);">
        <br>
        <br>
　再输入验证码(稍等一会右边的图片才会出现)：
<input name="icpcode" type="text" id="icpcode" size="6" maxlength="10" onmouseover="this.focus()" onFocus="this.select()">
<img id=imgcode height=50 src="" width=200 name=imgcode style="display:none" onClick="doicpcheck(document.autoopen.icpdomainnowcheck.value);document.autoopen.icpcode.value='';">
<br>
<br>
　<a href="javascript:doicpcheckend(document.autoopen.icpcode.value);">再点这儿检查备案状态&gt;&gt;&gt;</a>　　检查结果(请耐心等候两分钟)：
<div id="divicpinfo"><br>
</div>
<%end if%>

<br>
<br>
　域名一：
<input name="hostname1" type="text" id="hostname1" size="30" value="<%if Request("hostname")<>"" then%><%=Request("Ftpname")%><%end if%>">
<font color="#000000"><a href="admicpdb.asp" target="_blank">将域名备案信息添加到本地数据库&gt;&gt;</a> </font><br>
　域名二：
<input name="hostname2" type="text" id="hostname2" size="30" value="<%if Request("hostname")<>"" then%><%=Request("hostname")%><%end if%>">
<font color="#000000"><a href="http://www.miitbeian.gov.cn/icp/publish/query/icpMemoInfo_showPage.action" target="_blank">访问工信部&gt;&gt;&gt;</a> </font><br>
　域名三：
<input name="hostname3" type="text" id="hostname3" size="30">
<br>
　域名四：
<input name="hostname4" type="text" id="hostname4" size="30">
<br>
　域名五：
<input name="hostname5" type="text" id="hostname5" size="30">
<br>
　(如果不指定将自动生成临时域名)<br>
　FTP用户名：
<input name="Ftpname" type="text" id="Ftpname" value="<%if Request("Ftpname")="" then%><%=ds("username")%><%else%><%=Request("Ftpname")%><%end if%>" size="10" maxlength="14">
<br>
<%
id=Left(Md5(time),14)

Ftpname=LCase(Trim(ds("username")))'2009624
Randomize
ftpRkey=CLng((100000000 - 20 + 7850) * Rnd + 100)
Ftppassword=Ucase(Left(md5(now&ftpRkey),10))&right(md5(now&ftpRkey),4)'2010-8-5
id=Ftppassword
%>
　FTP密　码：
<input name="Ftppassword" type="text" id="Ftppassword" value="<%if Request("Ftppassword")="" then%><%=id%><%else%><%=Request("Ftppassword")%><%end if%>" size="10" maxlength="14">
<br>
　期限：
<%usermoney=dshost("usermoney")%>
<input type="radio" name="year" value="999"  onClick="document.autoopen.usermoney.value =0;" <%if Clng(Request("year"))=999 or (session("canadmhostadd")="" And session("canadmhostaddtest")="y") then%>checked<%end if%>>
试用<%=Application("testtime")%>天<%if session("canadmhostadd")="" And session("canadmhostaddtest")="y" then%>
<font color="#FF0000">(您只有试用的权限)</font>
<%end if%>
<input type="radio" name="year" value="<%=PAY_Month%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_Month*usermoney%>);" <%if Clng(Request("year"))=PAY_Month then%>checked<%end if%>>
一个月
<input type="radio" name="year" value="<%=PAY_Season%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_Season*usermoney%>);" <%if Clng(Request("year"))=PAY_Season then%>checked<%end if%>>
一季
<input type="radio" name="year" value="<%=PAY_halfyear%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_halfyear*usermoney%>);" <%if Clng(Request("year"))=PAY_halfyear then%>checked<%end if%>>
半年
<input type="radio" name="year" value="1" onClick="document.autoopen.usermoney.value =1*<%=usermoney%>;" <%if Clng(Request("year"))=1 or session("canadmhostadd")="y" then%>checked<%end if%>>
一年
<input type="radio" name="year" value="<%=PAY_2year%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_2year%>*<%=usermoney%>);" <%if Clng(Request("year"))=PAY_2year then%>checked<%end if%>>
两年
<input type="radio" name="year" value="<%=PAY_3year%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_3year%>*<%=usermoney%>);" <%if Clng(Request("year"))=PAY_3year then%>checked<%end if%>>
三年
<input type="radio" name="year" value="<%=PAY_4year%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_4year%>*<%=usermoney%>);" <%if Clng(Request("year"))=PAY_4year then%>checked<%end if%>>
四年
<input type="radio" name="year" value="<%=PAY_5year%>" onClick="document.autoopen.usermoney.value =Math.round(<%=PAY_5year%>*<%=usermoney%>);" <%if Clng(Request("year"))=PAY_5year then%>checked<%end if%>>
五年 <br>
　手工指定到期时间:
<input type="text" name="endtime" size="10" maxlength="10">
2005-7-24
<input name="admhost" type=hidden id="admhost" value="<%=session("admhost")%>">
<br>
　
<input name="chmoney" type="checkbox" id="chmoney" value="y">
<font color="#FF0000">从用户金额中扣除</font> 价格：
<input name="usermoney" type="text" id="usermoney" size="8" value="<%=dshost("usermoney")*Clng(Request("year"))%>">
元<br>
　产品:
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_HostProductlist order by id asc"
if session("canadmhostadd")="" then Sql="Select * from FreeHost.FreeHost_HostProductlist where (canbyenduser='y' or onlyusebyagn='y' or canbyagn='y') order by orderbyid desc"				
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
产品列表为空.
<%else%>
<select name="Hosttype" id="Hosttype">
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if dsX("id")=Clng(Request("id")) then%>selected<%
  ServerlistID=dsX("ServerlistID")
  end if%>><%=dsX("Hosttype")%></option>
  <br>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
所在的服务器：
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Serverlist order by orderbyid desc,id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
服务器列表为空.
<%else%>
<select name="ServerlistID" id="ServerlistID">
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if dsX("id")=ServerlistID then
  homedir=dsX("homedir") 
  tempdomain=dsX("tempdomain")
AccessFlags=1
if dshost("asp")="y" then
AccessFlags=513
ScriptMaps=dsX("asp") 
end if
if dshost("aspx")="y" then
AccessFlags=513
ScriptMaps=ScriptMaps&"|"&dsX("aspx") 
end if
if dshost("cgi")="y" then
AccessFlags=517
ScriptMaps=ScriptMaps&"|"&dsX("cgi") 
end if
if dshost("php")="y" then
AccessFlags=513
ScriptMaps=ScriptMaps&"|"&dsX("php") 
end if
if dsX("infosafe")<>"" And AccessFlags>1 then
ScriptMaps=ScriptMaps&"|"&dsX("infosafe") 
end if
ScriptMaps=trim(replace(ScriptMaps,"||","|"))

  %>selected<%end if%>><%=dsX("id")%>.<%=dsX("servername")%>
  <%if dsX("agent1")<>"n" then%>
  代理名：<%=dsX("agent1")%>
  <%end if%>
  [<%=dsX("netby")%>]</option>
  <br>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
<%
If canselectdb then
	Set dsSqlpdlist = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_SqlProductlist where Hosttype='"&dshost("Hosttype")&"' and isbyhost='y'"
	dsSqlpdlist.Open Sql,conn,1,1
if not dsSqlpdlist.Eof Then
havesql=true%>
　　附送：
<select name="dsSqlpdlistID">
  <%end if%>
  <%while not dsSqlpdlist.Eof
	Set dsSqlserver = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Serversqllist where id='"&dsSqlpdlist ("ServerlistID")&"'"
		dsSqlserver.Open Sql,conn,1,1
while not dsSqlserver.Eof
if dsSqlserver("softtype")="SQL2000" and dsSqlserver("MSSQLver")="2000" then softtype="SQL2000"
if dsSqlserver("softtype")="SQL2000" and dsSqlserver("MSSQLver")="2005" then softtype="SQL2005"
if dsSqlserver("softtype")="SQL2000" and dsSqlserver("MSSQLver")="2008" then softtype="SQL2008"
if dsSqlserver("softtype")="SQL2000" and dsSqlserver("MSSQLver")="2012" then softtype="SQL2012"
if dsSqlserver("softtype")="SQL2000" and dsSqlserver("MSSQLver")="2014" then softtype="SQL2014"
if dsSqlserver("softtype")="MySQL" and dsSqlserver("MySQLver")="5.0" then softtype="MySQL5.0"
if dsSqlserver("softtype")="MySQL" and dsSqlserver("MySQLver")="5.1" then softtype="MySQL5.1"
if dsSqlserver("softtype")="MySQL" and dsSqlserver("MySQLver")="5.5" then softtype="MySQL5.5"
%>
  <option value="<%=dsSqlpdlist("id")%>"><%=softtype%> [大小<%=dsSqlpdlist("userspacelimt")%>M]</option>
  <%dsSqlserver.movenext
wend
dsSqlserver.close
dsSqlpdlist.movenext
wend%>
  <%If havesql=True then%>
</select>
注意选择后不能更改
<%End if%>
<%dsSqlpdlist.close%>
<%End if%>
<br>　 
用户上一层目录：
<input name="homedir" type="text" id="spacelimit" size="15" value="" maxlength="30">(不填写将用默认目录)
<br>
　默认首页:
<input name="DefaultDoc" type="text" id="host1" size="30" value="">
<br>
　日志目录:
<input name="LogFileDirectory" type="text" id="host1" size="30" value="">
<br>
　如果存在没有备案成功的域名(本地备案数据库)：
<input type="radio" name="openmustre" value="1" <%if Application("openmustre")=true then%>checked<%end if%>>
不允许开通 　　
<input type="radio" name="openmustre" value="0" <%if Application("openmustre")=false then%>checked<%end if%>>
允许开通 <a href="admicpdb.asp" target="_blank">(注意备案检查的是本地数据库，您需要先录入域名备案成功信息才行。)</a> <br>
　备案编号：
<INPUT size=20 name=ICP_SN>
<br>
　AccessFlags:
<input name="AccessFlags" type="text" id="host1" size="5" value="">
1为静态网页，513为asp/aspx/php,517为cgi,不填写使用产品默认值<br>
　修改应用程序影射:
<textarea name="ScriptMaps" cols="50" id="host1"></textarea>不填写使用产品默认值
<br>
　修改自定义错误:
<textarea name="HttpErrors" cols="50" id="host1"><%=HttpErrors%></textarea>不填写使用产品默认值
<br>
　内部记录：
<input name="corewhat" type="text" id="corewhat" size="70" maxlength="200">
<br>
　
<input name="openX" type="submit" value="下一步" onClick="document.autoopen.openX.value ='请等待不要重复刷新！....';document.autoopen.openX.disabled=true;document.autoopen.submit()"></td>
  </tr>
  <tr bordercolor="#000000" bgcolor="#E4EAF2">
    <td height="37" colspan="4" align="right" bgcolor="#E4EAF2"><font color="#000000"> 　　　</font><a href="#top"><font color="#6B9EDE" face="Arial, Helvetica, sans-serif">Top↑</font></a>	</td>
    </tr>
</table>
	</div></form>
<script language="JavaScript" type="text/JavaScript">
if (autoopen.hostname1.value!='')
{
autoopen.hostname1.value=autoopen.hostname1.value+'.<%=tempdomain%>';
}
</script>

	


</TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>
<script src="/inc-freehost-function/icpcheck.js"></script>
<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
