www.gusucode.com > 凡人网络购物系统 2008源码程序 > Admin/ad_edita.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")="edit" then
set rs=server.createobject("adodb.recordset")
sql="select * from venshop_article where id="&request("a_id")
rs.open sql,conn,1,3
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 editok(editt,"ad_edita.asp?a_id="&request("a_id"),"ad_article.asp")
else
set rs=server.createobject("adodb.recordset")
sql="select * from venshop_article where id="&request("a_id") 
rs.open sql,conn,1,1%>
<table border="0" cellpadding="5" cellspacing="0" class="st">
<form name="form" method="post" action="ad_edita.asp?action=edit&a_id=<%=rs("id")%>">
<tr><td height="15" class="s1">新闻标题:<input type="text" name="a_name" size="35" class=input value="<%=rs("a_name")%>"> 
选择分类:<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"<%if rs("a_sort")=rsc("sort_id") then%> selected<%end if%>><%=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")%>"<%if rs("a_nsort")=rsn("nsort_id") then%> selected<%end if%>> <%=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 value="<%=rs("a_keyword")%>"></td></tr>
<tr><td height="15" class="s1">新闻作者:<input type="text" name="a_author" size="20" class=input value="<%=rs("a_author")%>"> 转载地址:<input type="text" name="a_from" size="20" class=input value="<%=rs("a_from")%>"></td></tr>
<tr><td height="30" valign="top" class="s0">新闻内容:<br><!--#include file="ad_in.asp"--></td></tr>
<tr><td height="30" valign="top" class="s1"><input type="submit" value="更改新闻信息" name="B1" 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>
<%rs.close
set rs=nothing
end if
%><!--#include file="ad_bottom.asp"-->