<!--#include file="../../conn/conn_other.asp"-->
<!--#include file="../check.asp"-->
<!--#include file="../../film/Incs/syscode.asp"-->
<!--#include file="../../inc/sql.asp"-->
<%
	end if
	useflag=1
%>
<!--#include file="../flag.asp"-->
<link href="css/Admin_Style.Css" rel="stylesheet">
<link href='../Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<script language="javascript" src="js/Admin_Js.js"></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="sortbutton">
<tr>    
<td height="23" align="center" valign="middle">网站模板管理导航</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
  <tr>
    <td colspan="4" class="title">网站模板管理导航</td>
  </tr>
  <tr>
    <td width="15%" class="tabletd tc"><a href="?Action=TempEdit&Mb=List">列表页模板</a></td>
    <td width="15%" class="tabletd tc"><a href="?Action=TempEdit&Mb=Show">内容页模板</a></td>
    <td width="15%" class="tabletd tc"><a href="?Action=TempEdit&Mb=Play">播放页模板</a> </td>
    <td class="tabletd tc">&nbsp;</td>
  </tr>
</table>
<%
Dim Action,Mb
Action=CheckStr(Request("Action"))
Mb=CheckStr(Request("Mb"))
Dim MbUrl,MbName,MbContent
Select Case Mb
	Case "List"
		MbUrl=TempDir&"List.html"
		MbName="列表页"
	Case "Show"
		MbUrl=TempDir&"Show.html"
		MbName="内容页"
	Case "Play"
		MbUrl=TempDir&"Play.html"
		MbName="列播放页"
	Case Else
		MbUrl=TempDir&"List.html"
		MbName="列表页"
End Select
Select Case Action
	Case "TempSave"
		Call TempSave()
	Case Else
		Call TempEdit()
End Select
%>
<%
Function TempEdit()
	Dim Fso
	Set Fso=New DmFso
		MbContent=Fso.ReadFile(MbUrl)
	Set Fso=Nothing	
	MbContent=Replace(MbContent,"<","&lt;")
	MbContent=Replace(MbContent,">","&gt;")
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
<form id="form1" name="form1" method="post" action="?Action=TempSave">
  <tr>
    <td class="title">编辑网站模板</td>
  </tr>
  <tr>
    <td class="tabletd tl">当前编辑的是<%=MbName%>模板
      <input name="Mb" type="hidden" id="Mb" value="<%=Mb%>" /></td>
  </tr>
  <tr>
    <td width="15%" class="tabletd tl">
      <textarea name="Content" rows="20" class="textrea" id="Content"><%=MbContent%></textarea>
    </td>
  </tr>
  <tr>
    <td class="tbove">
      <input name="button" type="submit" class="button" id="button" value="保存模板" />
      <input name="button2" type="reset" class="button" id="button2" value="取消保存" />
     </td>
  </tr>
</form>
</table>
<%
End Function
%>
<%
Function TempSave()
	Dim Fso,Content
	Content=Request("Content")
	Set Fso=New DmFso
		Call Fso.CreateFile(MbUrl,Content,True)
	Set Fso=Nothing
	Call ShowSuccMsg("模板保存成功！","")
End Function
%>