📄 editnews.asp
字号:
<!--#include file=../conn.asp-->
<!--#include file=usercookies.asp-->
<!--#include file=onlinerz.asp-->
<%
dim sql
dim rs
dim id,ok,biaoti,neirong
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
id=request("id")
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("biaoti")=request("biaoti")
rs("neirong")=request("neirong")
rs("data")=now()
rs.update
response.write "<font size=2>修改成功!</font><br>"
response.end
else
%>
<title>IJOB后台管理---增加新闻</title>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="22%" valign="top"></td>
<td width="78%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" height="404">
<FORM name=theForm method=POST action=editnews.asp?ok=1&id=<%=request("id")%>>
<tr>
<td bgColor="#008000" height="20" vAlign="bottom" style="border-style: solid; border-width: 1" width="517" colspan="2">
<p style="MARGIN-LEFT: 6px" align="center">
<font color="#FFFFFF"><span style="font-size: 9pt"><b>新闻修改</b></span></font></td>
</tr>
<tr>
<td bgColor="#f7f7f7" height="43" width="90" 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="43" width="492" 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="biaoti" size="75" style="BACKGROUND-COLOR: #f9f9f9; COLOR: #384249; FONT-FAMILY: Verdana; FONT-SIZE: 11px; FONT-WEIGHT: bold" tabIndex="1" maxlength="50" value="<%=HTMLEncode(rs("biaoti"))%>"></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" height="299" width="90" 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="299" style="border-left-style: none; border-left-width: medium; border-right-style: solid; border-right-width: 1">
<p align="center">
<span style="FONT-SIZE: 12px">
<textarea rows="21" name="neirong" cols="64"><%=rs("neirong")%></textarea></span></td>
</tr>
<tr>
<td bgColor="#f7f7f7" height="43" vAlign="top" 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"><u>修改新闻</u></button></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<%
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -