<%@ Language=VBScript %>
<%server.ScriptTimeout =240%>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request("id")<>"" and not IsNumeric(Request("id")) Then
	ef=True
	ec="编号必须是数字"
elseIf session("canmodifyhtml")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
if Request.Form ("nowuse")<>"" then
Sql="update FreeHost.FreeHost_HtmlStyle set nowuse='0' where username='freehost'"
conn.Execute Sql
end if
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_HtmlStyle where username='freehost' and id='"&Request("id")&"'"
		ds.Open Sql,conn,1,3

if ds.eof or Request.Form ("newstyle")="y" then
ds.AddNew 
ds("username")="freehost"
Application("firstuse")=false
end if
ds("html1")=Request.Form ("html1")
ds("html2")=Request.Form ("html2")
ds("html3")=Request.Form ("html3")
ds("html4")=Request.Form ("html4")
ds("html5")=Request.Form ("html5")
ds("html6")=Request.Form ("html6")
ds("html7")=Request.Form ("html7")
ds("html8")=Request.Form ("html8")
ds("html9")=Request.Form ("html9")
ds("html10")=Request.Form ("html10")
ds("html11")=Request.Form ("html11")
ds("html12")=Request.Form ("html12")
ds("html13")=Request.Form ("html13")
ds("html14")=Request.Form ("html14")
ds("html15")=Request.Form ("html15")
ds("html16")=Request.Form ("html16")
ds("html17")=Request.Form ("html17")
ds("html18")=Request.Form ("html18")
ds("html19")=Request.Form ("html19")
ds("html20")=Request.Form ("html20")
ds("html21")=Request.Form ("html21")
ds("html22")=Request.Form ("html22")
ds("html23")=Request.Form ("html23")
ds("html24")=Request.Form ("html24")
ds("html25")=Request.Form ("html25")

ds("html26")=Request.Form ("html26")
ds("html27")=Request.Form ("html27")
ds("html28")=Request.Form ("html28")
ds("html29")=Request.Form ("html29")
ds("html30")=Request.Form ("html30")
ds("html31")=Request.Form ("html31")
ds("html32")=Request.Form ("html32")

ds("stylename")=Request.Form ("stylename")

if Request.Form ("nowuse")="" then
ds("nowuse")=0
else
ds("nowuse")=1
end if

if Request.Form ("pubuse")="" then
ds("pubuse")=0
else
ds("pubuse")=1
end if

if Request.Form ("agentdefault")="" then
ds("agentdefault")=0
else
ds("agentdefault")=1
Application("agentnodefault")=false
end if

ds("haveupdate")="y"
ds.Update
ds.Close

set ds=nothing



Set ds = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_HtmlStyle where username='freehost' and nowuse='1'"
ds.open sql,conn,1,1
if not ds.eof then
Application("html1")=ds("html1")
Application("html2")=ds("html2")
Application("html3")=ds("html3")
Application("html4")=ds("html4")
Application("html5")=ds("html5")
Application("html6")=ds("html6")
Application("html7")=ds("html7")
Application("html8")=ds("html8")
Application("html9")=ds("html9")
Application("html10")=ds("html10")
Application("html11")=ds("html11")
Application("html12")=ds("html12")
Application("html13")=ds("html13")
Application("html14")=ds("html14")
Application("html15")=ds("html15")
Application("html16")=ds("html16")
Application("html17")=ds("html17")
Application("html18")=ds("html18")
Application("html19")=ds("html19")
Application("html20")=ds("html20")
Application("html21")=ds("html21")
Application("html22")=ds("html22")
Application("html23")=ds("html23")
Application("html24")=ds("html24")
Application("html25")=ds("html25")

Application("html26")=ds("html26")
Application("html27")=ds("html27")
Application("html28")=ds("html28")
Application("html29")=ds("html29")
Application("html30")=ds("html30")
Application("html31")=ds("html31")
Application("html32")=ds("html32")

session("html1")=ds("html1")
session("html2")=ds("html2")
session("html3")=ds("html3")
session("html4")=ds("html4")
session("html5")=ds("html5")
session("html6")=ds("html6")
session("html7")=ds("html7")
session("html8")=Application("html8")
session("html9")=Application("html9")
session("html10")=Application("html10")
session("html11")=ds("html11")
session("html12")=ds("html12")
session("html13")=ds("html13")
session("html14")=ds("html14")
session("html15")=ds("html15")
session("html16")=ds("html16")
session("html17")=ds("html17")
session("html18")=ds("html18")
session("html19")=ds("html19")
session("html20")=ds("html20")
session("html21")=ds("html21")
session("html22")=ds("html22")
session("html23")=ds("html23")
session("html24")=ds("html24")
session("html25")=ds("html25")
session("html26")=ds("html26")
session("html27")=ds("html27")
session("html28")=ds("html28")
session("html29")=ds("html29")
session("html30")=ds("html30")
session("html31")=ds("html31")
session("html32")=ds("html32")

end if
ds.close
set ds=nothing

Set ds = Server.CreateObject("ADODB.Recordset")
Sql="Select * from FreeHost.FreeHost_HtmlStyle where username='freehost' and agentdefault='1' order by id desc"
ds.open sql,conn,1,1
if not ds.eof then
Application("agnhtml1")=ds("html1")
Application("agnhtml2")=ds("html2")
Application("agnhtml3")=ds("html3")
Application("agnhtml4")=ds("html4")
Application("agnhtml5")=ds("html5")
Application("agnhtml6")=ds("html6")
Application("agnhtml7")=ds("html7")
Application("agnhtml8")=ds("html8")
Application("agnhtml9")=ds("html9")
Application("agnhtml10")=ds("html10")
Application("agnhtml11")=ds("html11")
Application("agnhtml12")=ds("html12")
Application("agnhtml13")=ds("html13")
Application("agnhtml14")=ds("html14")
Application("agnhtml15")=ds("html15")
Application("agnhtml16")=ds("html16")
Application("agnhtml17")=ds("html17")
Application("agnhtml18")=ds("html18")
Application("agnhtml19")=ds("html19")
Application("agnhtml20")=ds("html20")
Application("agnhtml21")=ds("html21")
Application("agnhtml22")=ds("html22")
Application("agnhtml23")=ds("html23")
Application("agnhtml24")=ds("html24")
Application("agnhtml25")=ds("html25")
Application("agnhtml26")=ds("html26")
Application("agnhtml27")=ds("html27")
Application("agnhtml28")=ds("html28")
Application("agnhtml29")=ds("html29")
Application("agnhtml30")=ds("html30")
Application("agnhtml31")=ds("html31")
Application("agnhtml32")=ds("html32")

end if
ds.close
set ds=nothing

conn.Close 
set conn=nothing
%>
<!--#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 width="83"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="60" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="htmlstyle.asp"><font color="#FFFFFF">模板管理</font></a></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="83">&nbsp;</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"><br>
        修改成功！如果您是首次安装星外虚拟主机管理平台，请您到<br>
        <br>
        <br>
        <strong><a href="systeminfo.asp"><font color="#FF0000" >§ 系统参数&gt;&gt;</font></a></strong><br>
        <br>
中进一步设置您的基本信息。</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>
<%=htmlwrite("html10")%>
<%
end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
