<%@ 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
if dsph("canrar")="n" then
	ef=True
	ec="很抱歉，您的虚拟主机不允许使用本功能！"
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="webrar2.asp" method="post" name="autoopen1">
<TABLE 
            width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
  <TBODY>
    <TR>
      <TD width="20%" vAlign=middle bgColor=#494949>&nbsp; <font color="#FFFFFF">网站打包：</font></TD>
      <TD height="40" bgColor=#ffffff>　将您的网站
        <input name="dirname" type="text" id="dirname" value="\web" size="18" maxlength="50">
        目录打包成RAR文件，自动放置在DB目录。</TD>
      </TR>
    <TR>
      <TD width="20%" vAlign=middle bgColor=#EEEEEE>&nbsp;</TD>
      <TD height="40" bgColor=#ffffff><input name="op" type="hidden" id="op" value="a">　
        <input name="openX" type="submit" id="Submit" value="马上打包，可能需要几分钟的时间" onClick="document.autoopen1.openX.value ='请等待不要重复刷新！....';document.autoopen1.openX.disabled=true;document.autoopen1.submit()">
        <input name="rarv" type="checkbox" id="rarv" value="y">
        分卷打包(每个包50M)</TD>
      </TR>
  </TBODY>
</TABLE>
</form>
<br>
<form action="webrar3.asp" method="post" name="autoopen2">
<TABLE 
            width="100%" border=1 align=center cellPadding=0 cellSpacing=0 borderColorLight=#cccccc borderColorDark=#fbfbfb>
  <TBODY>
    <TR>
      <TD width="20%" vAlign=middle bgColor=#494949>&nbsp; <font color="#FFFFFF">网站还原：</font></TD>
      <TD height="40" bgColor=#ffffff>　本功能可以将DB目录的RAR文件，还原到
        <input name="dirname" type="text" id="dirname" value="\web" size="18" maxlength="50">
        目录中。</TD>
      </TR>
    <TR>
      <TD width="20%" vAlign=middle bgColor=#EEEEEE>&nbsp;</TD>
      <TD height="40" bgColor=#ffffff><input name="op" type="hidden" id="op" value="a">　
      RAR文件名：
        <input name="rarname" type="text" id="rarname" value="" size="20">
        .rar 　
        <input name="openX" type="submit" id="Submit" value="马上还原" onClick="document.autoopen2.openX.value ='请等待不要重复刷新！....';document.autoopen2.openX.disabled=true;document.autoopen2.submit()"></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%>