📄 edit.asp
字号:
<!--#include file="const.asp"-->
<!--#include file="articleconn.asp"-->
<html>
<%username=request.querystring("username")
page=request.querystring("page")
Set rs = Server.CreateObject("ADODB.Recordset")
username=session("UserName")
passwd=session("Passwd")
sql="select * from admin where username='"&UserName&"'and passwd='"&Passwd&"'"
rs.open sql,conn,3,3
if rs.eof then
key=rs("oskey")
response.redirect "login.asp"
response.end
end if
%>
<head>
<title>修改文章</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
a:link { text-decoration: underline; color: #000000; font-family: 宋体 }
a:visited { text-decoration: underline; color: #000000; font-family: 宋体 }
a:hover { text-decoration: underline; color: #cc0000 }
body {font-family: "宋体"; font-size: 9pt;line-height: 12pt;}
table {font-family: "宋体"; font-size: 9pt;line-height: 12pt;}
-->
</style>
</head>
<body bgcolor="#C0C0C0" text="#000000">
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=0 width="90%" align=center border=1 bordercolor="#454545">
<form method="POST" action="saveedit.asp?id=<%=request("id")%>">
<tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from shenhe where newsid="&request("id")
rs.open sql,conn,1,1
%>
<td colspan="2" height="25"><font color="#FF0000"><b>修改文章:</b></font></td>
</tr>
<tr>
<td width="20%" align="right">用户:</td>
<td> <%=username%></td>
</tr>
<tr>
<td align="right"> 类别:</td>
<td>
<select class="unnamed2" name="typeid" size="1" >
<%
dim rs1,sql1,sel
set rs1=server.createobject("adodb.recordset")
sql1="select * from type"
rs1.open sql1,conn,1,1
do while not rs1.eof
if rs1("type")=rs("type") then
sel="selected"
else
sel=""
end if
response.write "<option " & sel & " value='"+CStr(rs1("typeID"))+"' name=typeid>"+rs1("type")+"</option>"+chr(13)+chr(10)
rs1.movenext
loop
rs1.close
%>
</select>
--<font color="#FF0033">(请选择相应的分类)</font></td>
</tr>
<tr>
<td align="right"> 标题:</td>
<td>
<INPUT name="txttitle" size=40
value="<%=rs("title")%>"> <FONT color=#ff0000>(不超过25字)</FONT>
</td>
</tr>
<tr>
<td align="right" height="184"> 内容:</td>
<td height="184">
<TEXTAREA id=content name=txtcontent rows=15 cols=60><%content=replace(rs("content"),"<br>",chr(13))
content=replace(content," "," ")
content=replace(content,"<img src=","[sayyes]")
content=replace(content,"></img>","[/sayyes]")
response.write content%></TEXTAREA>
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="修 改" name="cmdok" size="12" class=button4 onmousedown="document.forms[0].target='_self'" >
<input type="reset" value="清 除" style="cmdcancel" class=button4 >
</td>
</tr>
</form>
</table>
</body>
</html>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -