<!--#include virtual="inc/General.inc.asp"-->
<%
CheckManageUser()
id = clng("0"&request("id"))
name1 = "添加内容"
name2 = "待生成..."
dim listtypearray(2)
listtypearray(0)="文本内容"
listtypearray(1)="文字列表"
listtypearray(2)="图片列表"
IsStop = 0
AddUserName = "中国签名网"
set rs1 = server.createobject("adodb.recordset")
if id&""<>"" and id&""<>"0" then
	set rs = server.createobject("adodb.recordset")
	rs.open "select * from [Content] where id=" & id,conn,1,1
	if not rs.eof then
		name1 = "修改内容"
		name2 = rs("id")
		TypeID = rs("TypeID")
		MenuCode = rs("MenuCode")
		Title = rs("Title")
		ViceTitle = rs("ViceTitle")
		SmallPicture = rs("SmallPicture")
		BigPicture = rs("BigPicture")
		AddUserName = rs("AddUserName")
		IsStop = rs("IsStop")
		Content = rs("Content")
	end if
	rs.close
	set rs=nothing
end if
%>
<html>

<head>
<title>后台管理系统</title>
<link rel="stylesheet" href="../../css/main.css">
<script language="javascript" src="../../js/yzqm.js.asp"></script>
<script language="javascript">
function CheckData(theform)
{
	if (theform.Title.value == "")
	{
		alert("请输入标题！");
		theform.Title.focus();
		return false;
	}
	theform.Info.value = HtmlEditor.document.body.innerHTML;
	if (theform.Info.value == "")
	{
		alert("请输入内容！");
		theform.Info.focus();
		return false;
	}
	return true;
}
</script>
</head>

<body topmargin="0" leftmargin="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
	<td height="25" bgcolor="#EFEFEF" class="dtd" style="color:#FF6600">&nbsp;当前位置：<%=name1%></td>
  </tr>
  <tr>
	<td>
	  <table border="0" cellpadding="1" cellspacing="0" width="99%" align="right">
		<tr>
		  <td height="10"></td>
		</tr>
		<tr>
		  <td>
			<table border="0" cellpadding="1" cellspacing="1" width="100%" bgcolor="#CCCCCC">
			  <form name="AddForm" method="post" enctype="multipart/form-data" action="SaveContent.asp" onsubmit="return CheckData(this)">
			  <tr height="23" bgcolor="#EFEFEF">
				<td width="15%" align="right">ID号：<input type="hidden" name="idh" value="<%=id%>"></td>
				<td width="35%" bgcolor="#FFFFFF" class="entxt">&nbsp;<%=name2%></td>
				<td width="15%" align="right">栏目类型：</td>
				<td width="35%" bgcolor="#FFFFFF">&nbsp;<select name="MenuCode" class="inbox">
				  <%rs1.open "select * from Menu order by MenuCode",conn,1,1
				  while not rs1.eof%>
				  <option value="<%=rs1("MenuCode")%>" <%if MenuCode&""=rs1("MenuCode")&"" then response.write " selected" end if%>><%=replace(space((len(rs1("MenuCode"))-2) \ 2) & rs1("MenuName")," ","　")%></option>
				  <%rs1.movenext
				  wend
				  rs1.cancel:rs1.close%>
				</select></td>
			  </tr>
			  <tr height="23" bgcolor="#EFEFEF">
				<td align="right">内容类型：</td>
				<td bgcolor="#FFFFFF" class="entxt">&nbsp;<select name="TypeID" class="inbox">
				  <%rs1.open "select a.MenuCode,a.MenuName,b.TypeID,b.TypeName from Menu a,ContentType b where b.MenuCode=a.MenuCode order by a.MenuCode",conn,1,1
				  while not rs1.eof%>
				  <option value="<%=rs1("TypeID")%>" <%if TypeID&""=rs1("TypeID")&"" then response.write " selected"%>><%=replace(space((len(rs1("MenuCode"))-4) \ 2) &  rs1("MenuName") & " — " & rs1("TypeName")," ","　")%></option>
				  <%rs1.movenext
				  wend
				  rs1.cancel:rs1.close%>
				</select></td>
				<td align="right"></td>
				<td bgcolor="#FFFFFF"></td>
			  </tr>
			  <tr height="23" bgcolor="#EFEFEF">
				<td align="right">缩 略 图：</td>
				<td bgcolor="#FFFFFF">&nbsp;<input type="file" name="SmallPicture" class="inbox" size="26"> <%if SmallPicture&""<>"" then%><a href="#" onclick="javascript:window.open('<%=SmallPicture%>','SmallPicture','')">查看</a><%end if%></td>
				<td align="right">全　　图：</td>
				<td bgcolor="#FFFFFF">&nbsp;<input type="file" name="BigPicture" class="inbox" size="26"> <%if BigPicture&""<>"" then%><a href="#" onclick="javascript:window.open('<%=BigPicture%>','BigPicture','')">查看</a><%end if%></td>
			  </tr>
			  <tr height="23" bgcolor="#EFEFEF">
				<td align="right">发 布 人：</td>
				<td bgcolor="#FFFFFF">&nbsp;<input type="text" name="AddUserName" onchange="this.value=this.value.replace(/(^\s*)|(\s*$)|[\']/gi,'')" class="inbox" value="<%=AddUserName%>"></td>
				<td align="right">是否显示：</td>
				<td bgcolor="#FFFFFF">&nbsp;<input type="radio" name="IsStop" value="0" <%if IsStop&""="0" then Response.Write "checked"%>>是&nbsp;&nbsp;<input type="radio" name="IsStop" value="1" <%if IsStop&""="1" then Response.Write "checked"%>>否</td>
			  </tr>
			  <tr height="23" bgcolor="#EFEFEF">
				<td align="right">内容标题：</td>
				<td colspan="3" bgcolor="#FFFFFF">&nbsp;<input type="text" name="Title" onchange="this.value=this.value.replace(/(^\s*)|(\s*$)|[\']/gi,'')" class="inbox" size="52" value="<%=Title%>"></td>
			  </tr>
			  <tr height="23" bgcolor="#EFEFEF">
				<td align="right">副 标 题：</td>
				<td colspan="3" bgcolor="#FFFFFF">&nbsp;<input type="text" name="ViceTitle" onchange="this.value=this.value.replace(/(^\s*)|(\s*$)|[\']/gi,'')" class="inbox" size="52" value="<%=ViceTitle%>"></td>
			  </tr>
			  <tr height="23" bgcolor="#EFEFEF">
				<td align="right">内容：</td>
				<td colspan="3" bgcolor="#FFFFFF"></td>
			  </tr>
			  <tr height="23" bgcolor="#FFFFFF">
				<td colspan="4" align="center">
				  <!--#include virtual="inc/HtmlTool.html"-->
				  <iframe id="HtmlEditor" class="HtmlEditor" width="99%" height="200"></iframe><input type="hidden" name="Info" value="<%=Replace(Content,"""","'")%>">
				  <script language="javascript" src="../../js/editfunc.js"></script>
				  <script language="javascript">
					if (document.all.Info.value != "")
					{
						HtmlEditor.document.designMode="On";
						HtmlEditor.document.write ("<body leftmargin=3 topmargin=3>");
						HtmlEditor.document.write (document.all.Info.value);
						HtmlEditor.document.designMode="Off";
					}
					HtmlEditor.document.designMode="On";
				  </script>
				</td>
			  </tr>
			  <tr height="33" bgcolor="#EFEFEF">
				<td colspan="4" align="center"><input type="hidden" name="aduser" value=""><input type="submit" value=" 确定 ">　　　　<input type="button" onclick="window.location.href='ManageContent.asp'" value=" 取消 "></td>
			  </tr>
			  </form>
			</table>
		  </td>
		</tr>
	  </table>
	</td>
  </tr>
</table>
</body>

<html>
<%set rs1=nothing
CloseConnection()%>