<!--#include file ="Conn.asp"-->
<!--#include file ="Check_Manager.asp"-->
<html>
<head>
<title>管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><LINK href="admin/admin.css" type=text/css rel=stylesheet><script language="JavaScript" src="admin/js.js"></SCRIPT></head>
<SCRIPT language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;	 
}
</Script>
<body text="#000000">
<br>
<table width="87%" border="0" align="center" cellpadding="4" cellspacing="0" class=tableBorder>
  <tr> 
    <td height="25" background="admin/admin_bg_1.gif"><div align="center"><strong><font color="#FFFFFF">模版管理</font></strong></div></td>
  </tr>
<tr> 
    <td height="25"><div align="center"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <%
          Dim Rs
          Dim Rs1
          Dim Moid
          Set Rs1 = Conn.ExeCute("Select [Moban] From [Index] Where id =1")
          If Not Rs1.Eof Then 
          Moid = Cint(Rs1("Moban"))
          End if  
	  Set Rs = Conn.ExeCute("Select ID,Ja_Name From [JaHtml]")
	  Do While Not Rs.Eof
          Response.Write "<tr><td><b>ID:</b>" & Rs("ID") & "</td>"
          Response.Write "<td><a href=MoBan_Edit.Asp?id="&Rs("ID")&"&name=" & Rs("Ja_Name") &  ">{" & Rs("Ja_Name") &  "}</a>" 
          if Cint(Rs("id")) = Moid Then
                   Response.Write "<font color=#990000><b>(当前使用模版)</b></font>"
                   Else 
                   Response.Write "(点击修改该模版)</td>"
                   End if
          Response.Write "<td><a href=MoBan_Edit.Asp?id="&Rs("ID")&"&name=" & Rs("Ja_Name") &  "><b>修改</b></a>&nbsp;<a href=MoBan_Save.Asp?action=del&id="&Rs("ID")&" onclick='return ConfirmDel();'><b>删除</b></a>&nbsp;<a href=MoBan_Name.Asp?id="&Rs("ID")&"><b>修改模版名称</b></a></td></tr>"
                   Rs.MoveNext
		   Loop  
		   Rs.Close
		   Set Rs=Nothing
		   %>      
  
</table></div></td>
  </tr>

</table>
<form method="POST" name="myform" action="Moban_Save.Asp?action=Moban">
<table width="87%" border="0" align="center" cellpadding="4" cellspacing="0">
<tr>
<td><div align="center">
<b>修改当前使用模版：</><select name=Moban>
<%
Dim Rs2
Set Rs2 = Conn.ExeCute("Select ID,Ja_Name From JaHtml")
Do while not Rs2.Eof
%> 
<option value="<%=Rs2("ID")%>"><%=Rs2("Ja_Name")%></option>
<%
Rs2.MoveNext
Loop
%>
</select> <input name=Edit type=submit value=' 修 改 '> </div>
</td>
</tr>
</table>
</Form>
<%
Rs1.Close
Set Rs1=Nothing
Rs2.Close
Set Rs2=Nothing
%>