<!--#include file="include.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>安装主题</title>
<link href="../../Images/style.css" rel="stylesheet" type="text/css">
<link href="Images/new.css" rel="stylesheet" type="text/css">
 </head>

<body> 
<%	Dim strXmlFile,fso
	ThemeID=fycms.s("ThemeID")
 	If fycms.s("act")="save" Then
		If  Trim(ThemeID)="" Then 
			Call fycms.ActErr("请选择一个主题","","1")
		End If 
		if fycms.s("setupset")="1" then 
			Set fso = CreateObject(fycms.FsoName)
			strXmlFile =Tpath & fycms.admindir() & "\Sys_fy\Theme\ThemeInstallTemp\" &ThemeID& "\Install.Asp"
			If fso.FileExists(strXmlFile)  Then
				fycms.actexe("Update Config_fy Set fycms_Theme='"&ThemeID&"'  ")
				Call fycms.DelCahe("NowTheme")
				response.Redirect "ThemeInstallTemp/"&ThemeID&"/Install.asp?ThemeID="&ThemeID&"&Install="&fycms.s("Install")
			Else 
				 fycms.actexe("Update Config_fy Set fycms_Theme='"&ThemeID&"'  ")
				 Call fycms.DelCahe("NowTheme")
				 Call fycms.ActErr(ThemeID&"主题安装失败,没有安装程序","","1")
			End If 
		else 
			 fycms.actexe("Update Config_fy Set fycms_Theme='"&ThemeID&"'  ")
			 Call fycms.DelCahe("NowTheme")
			 response.Redirect "Index.asp?title="&ThemeID&"设置默认主题成功"
		end if 
 		response.end
  End If 
%>	

<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  <tr>
    <td class="bg_tr">您现在的位置：在线主题样式 &gt;&gt; 安装主题</td>
  </tr>
  <tr>
    <td>
	
	
	 
 <div class="md-head" >
<div class="zsj"></div>
<a href="fy.Theme.ACTList.asp" class="a10 wrap"  >在线安装主题</a>
<a href="fy.Theme.Reg.asp" class="a10 wrap"  >我的帐号</a>
 <a href="Index.asp" class="a10 wrap"  >主题管理</a>
<a href="fy.Theme.Check.asp" class="a10 wrap"  >查看主题的可用更新</a>
 </div>
 
</td>
  </tr>
</table>
  
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
  <form method="post" action="?act=save&theme=<%=ThemeID%>">
 

 
    
    <tr>
      <td width="24%" height="25" align="right">主题名称&nbsp;&nbsp;</td>
      <td width="76%" height="25"><%=ThemeID%>
 </td>
    </tr>
 
      	<input type="hidden" name="ThemeID" value="<%=ThemeID%>">

     <tr>
      <td height="25" align="right">安装说明&nbsp;&nbsp;</td>
      <td height="25">
	  <%
 	 	Set fso = CreateObject(fycms.FsoName)
		strXmlFile =Tpath & ThemePath & request("ThemeID") & "/" & "theme.xml"
		If fso.FileExists(strXmlFile) Then
    		Set XML=fycms.NoAppGetXMLFromFile(strXmlFile)
			If IsObject(XML) And XML.readyState=4 And XML.parseError.errorCode = 0 Then
				echo XML.documentElement.selectSingleNode("description").text
 				Set XML=Nothing
			End If
 		End If
%>
     </td>
    </tr> 
 
    <tr>
      <td height="25" align="right">主题选择&nbsp;&nbsp;</td>
      <td height="25">
	  
	  
	   <label for="setupsets1"><input onClick=setupsetset(0) type="radio"    value="1" name="setupset"  id="setupsets1">安装主题</label>
      <label for="setupsets2"><input onClick=setupsetset(1) type="radio"  Checked  value="2" name="setupset" id="setupsets2">设置默认主题</label>
	   
     </td>
    </tr>
     
  <tr   id="setupset2" style="DISPLAY: none" >
      <td height="25" align="right">帮助&nbsp;&nbsp;</td>
      <td height="25"><font color="red">安装主题将会覆盖现有的标签,栏目,请慎重</font>
 </td>
    </tr>
	
	
  <tr   id="setupset3"  >
      <td height="25" align="right">主题&nbsp;&nbsp;</td>
      <td height="25">选择一个主题做默认主题
 </td>
    </tr>
  
 <tr>
      <td   colspan="2"  align="center">
      <input type="submit" class="btn btn_primary"  name=Submit1 value="  安装主题  " />
    </td>
    </tr>
 
 </form>
  </table>	
	<script language="JavaScript" type="text/javascript">
 function setupsetset(n){
	if (n == 0){
 		setupset2.style.display='';
		setupset3.style.display='none';
	}
	else{
 		setupset2.style.display='none';
		setupset3.style.display='';
	}
} 
</script>


 
</body>
</html>
