<%@ 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
%>
<!--#include virtual="/inc-freehost-function/template-hostadm-top.asp"-->
　虚拟主机自助管理


<br>
<form action="copysite2.asp" method="post" name="form1">
<TABLE 
            width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
  <TBODY>
    <TR align="center">
      <TD height="35" colspan="2" vAlign=middle bgColor=#494949>&nbsp; <font color="#FFFFFF">预装网站：</font></TD>
      </TR>

<%
y=0
for i=1 to 8
if not isnull(dsHostpdlist("UAcopydir"&i)) then
y=y+1
%>
    <TR>
      <TD width="32%" height="35" vAlign=middle bgColor=#FFFFFF>　
        <input type="radio" name="copyid" value="<%=i%>">
        <%=i%>.<%=dsHostpdlist("UAcopyName"&i)%> </TD>
      <TD width="68%" height="35" align="center" vAlign=middle bgColor=#FFFFFF><%=dsHostpdlist("UAcopyabcout"&i)%></TD>
    </TR>
<%
end if
next
if y>0 then
%>	
    <TR>
      <TD height="30" colspan="2" align="center" vAlign=middle bgColor=#FFFFFF><input name="id" type="hidden" value="<%=Request("id")%>">
        <input type="submit" name="Submit" value="马上复制此网站程序的文件到您的空间中（注意会履盖您原有的文件）" onClick="return chkFormweb(this)">
    <script language=JavaScript>
<!--
	function chkFormweb(theform)
	{
			if(! confirm("请确认是否要复制?\n注意，如果履盖了原文件是没有办法恢复的。"))
				return false;
	}
//-->
</script>		
		</TD>
    </TR>
<%else%>
    <TR>
      <TD height="30" colspan="2" align="center" vAlign=middle bgColor=#FFFFFF><input name="id" type="hidden" value="<%=Request("id")%>">
        很抱歉，您的产品不支持此功能。
		</TD>
    </TR>
<%end if%>
</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%>
