www.gusucode.com > 盐城分类信息网asp源码程序 > admin/editnews.asp
<!--#include file=conn.asp--> <!--#include file=cookies.asp--><link href="inc_style.css" rel="stylesheet" type="text/css"> <% dim sql,rs,id,ok,nbiaoti,nfrom,nurl id=request("id") function HTMLEncode(fString) if not isnull(fString) then fString = replace(fString, ">", ">") fString = replace(fString, "<", "<") fString = Replace(fString, CHR(32), " ") fString = Replace(fString, CHR(9), " ") fString = Replace(fString, CHR(34), """) fString = Replace(fString, CHR(39), "'") fString = Replace(fString, CHR(13), "") fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ") fString = Replace(fString, CHR(10), "<BR> ") 'fString=ChkBadWords(fString) HTMLEncode = fString end if end function set rs=server.createobject("adodb.recordset") sql="select * from [news] where id="&cstr(id) rs.open sql,conn,1,3 if request("ok")=1 then rs("nbiaoti")=request("nbiaoti") rs("nfrom")=request("nfrom") rs("nurl")=request("nurl") rs("ndata")=now() rs.update response.write "<font size=2>修改成功!</font><br>" response.write "<meta http-equiv=refresh content=""1;URL=listnews.asp"">" response.end else %> <title>后台管理---修改新闻</title> <p align="center"> <div align="center"> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#CCCCCC" height="179"> <FORM name=theForm method=POST action=editnews.asp?ok=1&id=<%=request("id")%>> <tr> <td bgColor="#FEEEBC" height="25" style="border-style: solid; border-width: 1" width="100%" colspan="2" align="center"><b>新闻修改</b></td> </tr> <tr> <td bgColor="#f7f7f7" height="35" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium; border-top-style: solid; border-top-width: 1" align="center"> <span style="FONT-SIZE: 12px"> 新闻标题:</span></td> <td bgColor="#f7f7f7" height="35" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1; border-top-style: solid; border-top-width: 1"> <p align="center"> <span style="FONT-SIZE: 12px"> <input name="nbiaoti" size="75" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-WEIGHT: bold" tabIndex="1" value="<%=rs("nbiaoti")%>"></span></td> </tr> <tr> <td bgColor="#f7f7f7" height="35" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium" align="center"> 新闻来源:</td> <td bgColor="#f7f7f7" height="35" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1"> <span style="FONT-SIZE: 12px"> <input name="nfrom" size="75" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-WEIGHT: bold" tabIndex="1" value="<%=rs("nfrom")%>"></span></td> </tr> <tr> <td bgColor="#f7f7f7" height="35" style="border-left-style: solid; border-left-width: 1; border-right-style: none; border-right-width: medium" align="center"> 链接<span style="FONT-SIZE: 12px">地址:</span></td> <td bgColor="#f7f7f7" height="35" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1"> <span style="FONT-SIZE: 12px"> <input name="nurl" size="75" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-WEIGHT: bold" tabIndex="1" value="<%=rs("nurl")%>"></span></td> </tr> <tr> <td bgColor="#f7f7f7" height="53" vAlign="middle" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="2"> <p align="center"> <button name="B1" type="submit"> <font color="#384249"><b>新闻修改</b></font></button></td> </tr> </form> </table> </div> <% end if rs.close conn.close set rs=nothing set conn=nothing %>