gusucode.com > 爱美尔女性商城源码 1.0源码程序 > admintouch/newsedit.asp
<!--#include file="conn.asp"--> <%if session("bjxadmin")="" then response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>" response.End else if session("flag")>1 then response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>" response.End end if end if dim newsid typeid=request("typeid") newsid=request.QueryString("id") if not isnumeric(newsid) then response.write"<script>alert(""非法访问!"");location.href=""../index.asp"";</script>" response.end end if if request.QueryString("action")="save" then Content=Request.Form("content") '将里面的链接换成本地链接 aa="http://"&Request.ServerVariables("server_name")&Request.ServerVariables("path_info") aa= mid(aa,1,len(aa)-18) '18=admin/newsedit.asp set rs=server.CreateObject("adodb.recordset") rs.open "select * from BJX_news where newsid="&newsid,conn,1,3 rs("newsname")=trim(request("newsname")) rs("addname")=trim(request("addname")) rs("newscontent")=content rs("adddate")=now() rs.update rs.close set rs=nothing session("content")="" response.write "<script language=javascript>alert('更改成功!');window.location.href='"&request("linkaddress")&"';</script>" response.End end if %> <html><head><title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <script language="javascript"> <!-- function checkdata() { if (document.form1.newsname.value=="") { alert("对不起,请输入新闻主题!") document.form1.newsname.focus() return false } } //--> </script> <link href="images/css.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .style1 { color: #FFFFFF; font-weight: bold; } --> </style> </head> <body> <%set rs=server.CreateObject("adodb.recordset") rs.open "select * from BJX_news where newsid="&newsid,conn,1,1%> <table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" > <tr> <td colspan="4" align="center" background="images/admin_bg_1.gif"><span class="style1">更改<%if typeid="1" then%>新闻中心<%end if%><%if typeid="2" then%>红酒文化<%end if%><%if typeid="3" then%>行业资讯<%end if%><%if typeid="4" then%>红酒与美食<%end if%><%if typeid="5" then%>品酒<%end if%><%if typeid="6" then%>鉴酒<%end if%></span></td> </tr> <tr> <td valign="top"> <form name="form1" method="post" action="newsedit.asp?action=save&id=<%=newsid%>" OnSubmit="return checkdata()" onReset="return ResetForm();"> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1"> <tr > <td width="20%" align="right">新闻主题:</td> <td style="PADDING-LEFT: 10px"> <input name="newsname" type="text" id="newsname" value=<%=trim(rs("newsname"))%> size="50"></td> </tr> <tr > <td align="right">发 表 人:</td> <td style="PADDING-LEFT: 10px"> <input name="addname" type="text" id="addname" value=<%=trim(rs("addname"))%>> </td> </tr> <tr > <td align="right" valign="top">新闻内容:</td> <td style="PADDING-LEFT: 10px"> <IFRAME ID="ewebeditor1" SRC="../webedit/ewebeditor.asp?id=Content&style=s_coolblue1" FRAMEBORDER="0" SCROLLING="no" WIDTH="600" HEIGHT="380"></IFRAME> <textarea name="Content" id="Content" style="display:none"><%=rs("newscontent")%></textarea> </td> </tr> <tr> <td align="right" ></td> <td height="30" style="PADDING-LEFT: 10px"> <input type="submit" name="Submit" value="修改保存"> <input type="button" value=" 返 回 " onClick="javascript:history.go(-1)" class="unnamed5" name="button"> <input type="hidden" name="linkaddress" value="<%=request.servervariables("http_referer")%>"> </td> </tr> </table> </form> </td> </tr> </table> <% rs.close set rs=nothing %> <!--#include file="bjxfoot.asp"--> </body> </html>