📄 edit.asp
字号:
<!--#include file="function.asp"-->
<html>
<head>
<title>编辑贴子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<!--#include file="top.asp"-->
<!--#include file="char.asp"-->
<%
stat="编辑帖子"
if Request.Cookies("bookbaby")("username")<>"" then
set rs1=conn.execute("select username from online where username='"&Request.Cookies("bookbaby")("username")&"'")
if not rs1.eof then
conn.execute("update online set stat='"&stat&"',lasttime='"&now()&"' where username='"&Request.Cookies("bookbaby")("username")&"'")
else
conn.execute "insert into online(username,sex,stat,lasttime) values ('"&Request.Cookies("bookbaby")("username")&"',"&Request.Cookies("bookbaby")("usersex")&",'"&stat&"','"&now()&"')"
end if
set rs1=nothing
else
conn.execute("delete * from online where datediff('n',lasttime,now())>20")
end if
if request("boardid")="" and action="bbs" then
errmsg="<li>请选择论坛!"
call error()
response.end
else
boardid=request("boardid")
end if
if request("replyid")<>"" then
sql="select * from reply where replyid="&request("replyid")&" and username='"&Request.Cookies("bookbaby")("username")&"'"
formaction="&bbsid="&request("bbsid")&"&replyid="&request("replyid")&"&action=reply"
elseif request("bbsid")<>"" then
sql="select * from bbs where bbsid="&request("bbsid")&" and username='"&Request.Cookies("bookbaby")("username")&"'"
formaction="&bbsid="&request("bbsid")&"&action=bbs"
end if
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if not rs.eof then
%>
<img src="" width="1" height="3"><table width="680" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="<%=tablebackcolor%>">
<form name="form1" method="post" onkeydown="if(event.keyCode==13 && event.ctrlKey)form1.submit()" action="save.asp?type=<%=request("type")%>&act=edit&boardid=<%=boardid%><%=formaction%>">
<tr bgcolor="<%=tabletitlecolor%>" align="center">
<td colspan="2" height="21"> <font color="#FFFFFF">编辑贴子</font></td>
</tr>
<%if Request.Cookies("bookbaby")("username")="" or Request.Cookies("bookbaby")("userpwd")="" then%>
<tr bgcolor="<%=tablebodycolor%>">
<td height="21" width="20%" align="right"><b>用户名:</b></td>
<td height="21" width="80%">
<input type="text" name="username" maxlength="20" size="20">
<a href="userreg.asp">还没有注册? </a></td>
</tr>
<tr bgcolor="<%=tablebodycolor%>">
<td height="21" align="right"><b>密 码:</b></td>
<td height="21" bgcolor="<%=tablebodycolor%>">
<input type="password" name="password" maxlength="20" size="20">
<a href="getpassword.asp">忘记了密码?</a></td>
</tr>
<%
end if
if request("replyid")="" then
%>
<tr bgcolor="#FFECFF">
<td align="right" height="21" bgcolor="<%=tablebodycolor%>"><b>主 题:</b></td>
<td height="21" bgcolor="<%=tablebodycolor%>">
<input type="text" name="title" maxlength="100" size="50" value="<%=rs("title")%>">
主题字数不要超过100字</td>
</tr>
<%
end if
%>
<tr bgcolor="<%=tablebodycolor%>">
<td align="right" valign=top width="20%"><b>心 情:</b></td>
<td width="80%">
<%
for i=1 to 20
response.write "<input type=""radio"" name=""face"" value="&i
if i=rs("face") then response.write " checked"
response.write "><img src=face/face"&i&".gif> "
if i mod 10=0 and i>=10 then response.write "<br>"
next
%>
</td>
</tr>
<tr bgcolor="<%=tablebodycolor%>">
<td align="right" valign="top" bgcolor="<%=tablebodycolor%>"><b>内 容:<br>
<br>
</b>Ctrl+Enter发送</td>
<td><iframe name="upload" frameborder=0 width=100% height=30 scrolling=no src=upload.asp?boardid=<%=request("boardid")%>></iframe>
<textarea cols=95 name=content rows=20><%=HTMLDecode(rs("content"))%></textarea>
</td>
</tr>
<tr bgcolor="<%=tabletitlecolor%>">
<td colspan="2" align="center">
<input type="submit" value=" 发 言 " name=Submit"2>
<input type="reset" value=" 清 空 " name="reset">
</td>
</tr>
</form>
</table>
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<!--#include file="copyright.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -