
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="../inc/conn.asp"-->
<!--#include file="Inc/Admin.Asp"-->
<!--#include file="Inc/Function.asp"-->
<%
mkid=request("mkid")
classid=request("classid")
id=request("id")
classname=request("classname")
if classname="" then classname="选择分类"
if request("action")="add" then
	titles=request("titles")
	keywords=request("keywords")
	descriptions=request("descriptions")
	set rs=server.createobject("adodb.recordset")
	sql="select * from Dream_Theme where id="&int(id)
	rs.open sql,Conn,1,3
	if not(rs.eof and rs.bof) then
		rs("Dream_Title")=titles
		rs("Dream_Keyword")=keywords
		rs("Dream_Description")=descriptions
		rs.update	
	end if
	rs.close
	set rs=nothing
	response.redirect "Dream_Seo.asp?classid="&classid
end if
%>
<%

 	set rs2=server.createobject("adodb.recordset")
	sql2="select * from Dream_Theme where Dream_Classid=0"
	rs2.open sql2,Conn,1,1
	if not(rs2.eof and rs2.bof) then
	do while not rs2.eof
		StrOption=StrOption&"<option value="""&rs2("id")&""""
		if int(classid)=rs2("id") then
		StrOption=StrOption&" selected=""selected"""
		titles=rs2("Dream_Title")
		keywords=rs2("Dream_Keyword")
		descriptions=rs2("Dream_Description")
		classname=rs2("Dream_Names")
		id=rs2("id")
		end if
		StrOption=StrOption&"> --"&rs2("Dream_Names")&" </option>"
		
		set rs3=server.createobject("adodb.recordset")
		sql3="select * from Dream_Theme where Dream_Classid="&rs2("id")
		rs3.open sql3,Conn,1,1
		if not(rs3.eof and rs3.bof) then
		do while not rs3.eof
			StrOption=StrOption&"<option value="""&rs3("id")&""""
			if int(classid)=rs3("id") then
			StrOption=StrOption&" selected=""selected"""
			titles=rs3("Dream_Title")
			keywords=rs3("Dream_Keyword")
			descriptions=rs3("Dream_Description")
			classname=rs3("Dream_Names")
			id=rs3("id")
			end if
			StrOption=StrOption&"> ----"&rs3("Dream_Names")&" </option>"
		rs3.movenext
		loop	
		end if
		rs3.close
		set rs3=nothing
		
	rs2.movenext
	loop	
	end if
	rs2.close
	set rs2=nothing

%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>关键词</title>
<link href="css/adminstyle.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/table.js"></script>
</head>

<body>

<div class="container">
	<div class="local"><h3>您现在的位置：<a href="admin_Index_Main.asp">管理首页</a> >> 关键词设置 >> <%=classname%></h3></div>
	<table width="100%" border="0" cellpadding="10" cellspacing="0" class="border" style="margin-top:10px;">
		<tr>
			<td>
			<div class="page_content">
				<div class="r_title"><h3><img src="images/xiao.jpg" /> <%=classname%></h3></div>
				<div class="contents">				
				<form method="POST" name="myform" action="Dream_Seo.asp?action=add" target="_self">
				<table width="100%" border="0" cellpadding="3" cellspacing="1" align="center" style="margin-top:10px;">
				<tr>
				  <td align="right" width="100" class="Title">选择分类</td>
				  <td><select onchange="strseo(this.value)">
				  <option value="0|0" selected="selected">选择分类</option>
				  <%=StrOption%>			    
				  </select></td>
				</tr>
				<tr id="tr_1">
				  <td height="47" align="right" width="100" class="Title">网页标题：</td>
				  <td><textarea name="titles" style="width:99%" rows="3"><%=titles%></textarea></td>
				</tr>
				<tr id="tr_2">
				  <td height="53" align="right" class="Title">关键词：</td>
				  <td><textarea name="keywords" style="width:99%" rows="3"><%=keywords%></textarea></td>
				</tr>
				<tr id="tr_3">
				  <td align="right" class="Title">网页描述：</td>
				  <td class="tdbg"><textarea name="descriptions" style="width:99%" rows="5"><%=descriptions%></textarea></td>
				</tr>    <tr>
				  <td height="50" colspan="2" align="center">
				  <input type="hidden" name="id" value="<%=id%>">
				  <input type="hidden" name="mkid" value="<%=mkid%>">
				  <input type="hidden" name="classid" value="<%=classid%>">
				  <input name="Add" type="submit"  id="Add2" value=" 修改 "></td>
				</tr>
			  </table>
			  </form>
			  </div>
			 </div>
			</td>
		</tr>
	</table>
</div>
</body>
</html>