<!--#include file="conn.asp"-->
<!--#include file="ad_chk.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href=inc/css.css rel=STYLESHEET type=text/css>
<body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5">
<%
if Request.Cookies("WrzcNet")("admin_class")<>0  then
response.write "你没有这个权限!"
response.end
end if
%>
<%
if request("action")="add" then
title=request("title")
ids=request("type")
nr=request("nr")
if title="" then
response.write "<font color=ff0000>标题不能为空,<a href=# onClick=history.go(-1)>返回</a></font>"
response.end
elseif nr="" then
response.write "<font color=ff0000>内容不能为空,<a href=# onClick=history.go(-1)>返回</a></font>"
response.end
end if

set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNet_book"
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("typeid")=ids
rs("nr")=nr

if seo_h1=1 then rs("h_title")=request("h_title")
if seo_h3=1 then rs("h_keyword")=request("h_keyword")
if seo_h5=1 then rs("h_d")=request("h_d")




rs.update
rs.close
set rs=nothing
call addok(addt,"ad_bookzj.asp?typeid="&ids,"ad_booktype.asp?typeid="&ids)
end if%>
<table border="0" cellpadding="5" cellspacing="0" class="st">
<form name="form" method="post" action="ad_bookzj.asp?action=add">
<tr><td colspan="3" class="sa"><b>内容增加</b></td></tr>
<tr><td bgcolor="#FFFFFF" class="s0">标题：</td>
	<td colspan="2" bgcolor="#FFFFFF" class="s0"><input type="text" name="title" size="50"></td></tr>


<tr><td class="s1">优化：</td><td class="s1">
	 <%if seo_h1=1 then%>网页标题：<input type="text" name="h_title" size="50" class=input><br><%end if%>
	 <%if seo_h3=1 then%>关 键 字：<input type="text" name="h_keyword" size="50" class=input><br><%end if%>
	 <%if seo_h5=1 then%>网页描述：<input type="text" name="h_d" size="50" class=input><%end if%>
</td></tr>




<tr><td bgcolor="#FFFFFF" class="s0">栏目：</td>
	<td colspan="2" bgcolor="#FFFFFF" class="s0">
<select name="type">
<%set rs=server.createobject("adodb.recordset")
sql="select * from WrzcNet_type where id="&request("typeid")&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加分类！"
response.end
else
do while not rs.eof%>
<option selected value="<%=trim(rs("id"))%>"><%=trim(rs("typename"))%></option>
<%rs.movenext
loop
end if
rs.close
set rs=nothing%></select></td></tr>
<tr><td bgcolor="#FFFFFF" class="s1">内容：</td>
	<td colspan="2" bgcolor="#FFFFFF" class="s1"><!--#include file="ad_in.asp"--></td></tr>
<tr><td colspan="3" bgcolor="#FFFFFF" align="center" class="s0"><input type="submit" value="提交信息" name="B1" class=input onClick="document.form.nr.value = document.getElementById('message').contentWindow.document.body.innerHTML;" >
<input name="nr" type="hidden" id="nr" value=""></td>
</tr></form></table>

<!--#include file="ad_bottom.asp"-->