www.gusucode.com > 运动用品商城网站系统源代码程序 > feyok/ad_gg.asp
<!--#include file="conn.asp"--> <!--#include file="ad_chk.asp"--> <!--#include file="../IncAsp/venshop_htmlencode2.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 %> <% id=request("id") if request("action")="add" then set rs=server.createobject("adodb.recordset") rs.Open "select * from venshop_pub",conn,1,3 rs.AddNew rs("title")=request("title") rs("msg")=htmlencode2(request("msg")) rs("date")=date() rs.Update rs.Close set rs=nothing call addok(addt,"ad_gg.asp","ad_gg.asp") end if if request("action")="edit" then set rs=server.createobject("adodb.recordset") rs.open "select * from venshop_pub where id="&id&"",conn,1,3 rs("title")=request("title") rs("msg")=htmlencode2(request("msg")) rs("date")=date() rs.update rs.close set rs=nothing call editok(editt,"ad_gg.asp","ad_gg.asp") end if if request("action")="del" then conn.execute "delete from venshop_pub where id="&id call deleok(delet,"ad_gg.asp") end if%> <table border="0" cellpadding="5" cellspacing="0" class="st"> <tr><td align="center" bgcolor="#F0F0F0" height="23" class="sa"><b>公告管理</b></td></tr> <%set rs=server.createobject("adodb.recordset") rs.open "select * from venshop_pub order by id desc",conn,1,1 i=0 do while not rs.eof i=i+1%> <form method="post" action="ad_gg.asp?action=edit&id=<%=rs("id")%>"> <tr><td class="s<%=i mod 2%>"> <table border="0" cellpadding="5" cellspacing="0" width="100%"> <tr><td>公告<%=i%>标题:</td> <td><input name="title" type="text" size="30" value="<%=rs("title")%>"></td></tr> <tr><td>公告<%=i%>内容:</td><td><textarea rows="3" name="msg" cols="50"><%if rs("msg")<>"" then htmlc=replace(rs("msg"),"<br>",chr(13)) htmlc=replace(htmlc," "," ") response.write htmlc end if%></textarea></td></tr> <tr><td></td><td><input type="submit" name="Submit" value="修改"> <a href=ad_gg.asp?action=del&id=<%=rs("id")%> onClick="return confirm('您确定进行删除操作吗?')">删除</a></td></tr> </table></td></tr></form> <%rs.movenext loop rs.close set rs=nothing %></table> <br> <table border="0" cellpadding="5" cellspacing="0" class="st"> <form method="post" action="ad_gg.asp?action=add"><tr> <td class="s0">标题:</td> <td class="s0"><input name="title" type="text" size="32"></td> </tr> <tr><td>内容:</td><td> <textarea rows="3" name="msg" cols="50"></textarea></td></tr> <tr><td> </td><td><input type="submit" name="Submit2" value="添 加"></td></tr> </form></table> <!--#include file="ad_bottom.asp"-->