www.gusucode.com > 凡人网络购物系统 2008源码程序 > Admin/ad_adda.asp

    <!--#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("venshop")("admin_class")<>0 then
response.write "你没有这个权限!"
response.end
end if
%>
<%
if request("action")="save" then
set rs=server.createobject("adodb.recordset")
sql="select * from venshop_article"
rs.open sql,conn,1,3
rs.addnew
rs("a_name")=request("a_name")
rs("a_keyword")=request("a_keyword")
rs("a_author")=request("a_author")
rs("a_from")=request("a_from")
rs("a_content")=request("a_content")
asort=split(request("a_sort"),"/")
rs("a_sort")=trim(asort(0))
rs("a_nsort")=trim(asort(1))
rs("a_date")=date()
rs.update
rs.close
set rs=nothing
call addok(addt,"ad_adda.asp","ad_article.asp")
else%>
<table border="0" cellpadding="5" cellspacing="0" class="st">
<form method="POST" name="form" action="ad_adda.asp?action=save">
<tr><td class="s1">新闻标题:<input type="text" name="a_name" size="35" class=input> 选择分类:<select size="1" name="a_sort" class=input>
<%set rsc=server.CreateObject("adodb.recordset")
rsc.open "select * from venshop_newssort order by sort_id desc",conn,1,1
do while not rsc.eof
sort_id=rsc("sort_id")%>
<option value="<%=rsc("sort_id")%>/0"><%=rsc("sort_name")%></option>
<%set rsn=server.CreateObject("adodb.recordset")
rsn.open "select * from venshop_newsnsort where sort_id="&sort_id&" order by nsort_id desc",conn,1,1
do while not rsn.eof%>
<option value="<%=rsc("sort_id")%>/<%=rsn("nsort_id")%>"> <%=rsc("sort_name")%> >> <%=rsn("nsort_name")%></option>
<%rsn.movenext
loop
rsn.close
set rsn=nothing
rsc.movenext
loop
rsc.close
set rsc=nothing%></select></td></tr>
  <tr><td class="s0">关 键 字:<input type="text" name="a_keyword" size="35" class=input></td></tr>
  <tr><td class="s1">新闻作者:<input type="text" name="a_author" size="35" class=input> 转载地址:<input type="text" name="a_from" size="35" class=input></td></tr>
  <tr><td valign="top" class="s0">新闻内容:<br><!--#include file="ad_in.asp"--></td></tr>
  <tr><td class="s1"><input type="submit" value="提交新闻信息" name="B1" class=input onClick="document.form.a_content.value = frames.message.document.body.innerHTML;" ><input name="a_content" type="hidden" id="a_content" value=""></td></tr></form>
</table>
<%end if%><!--#include file="ad_bottom.asp"-->