⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reply.asp

📁 windowsCE 串口
💻 ASP
字号:
<!--#include file="conn.asp"--><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%= UrlName %> - 回复留言</title>
</head>
<body>
<!--#include file="top.asp"-->
<%
id=request("id")
select case request("act")
case "reply"
call update()
case else
call main()
end select

sub main()
if not session(Variable&Names)=Variable then
errinfo="你没有登陆或者已经退出登录"
error(errinfo)
exit sub
end if

sql="Select id,usercontent,recontent from topic where id="&id
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3

if rs.eof and rs.bof then
errinfo="该留言不存在"
error(errinfo)
exit sub
end if
%>
<table width="80%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="4%"><img src="images/skin/t-tl.gif" width="31" height="29"></td>
    <td width="91%" background="images/skin/t-tc.gif">&nbsp;</td>
    <td width="5%"><img src="images/skin/t-tr.gif" width="35" height="29"></td>
  </tr>
  <tr>
    <td background="images/skin/t-lt.gif">&nbsp;</td>
    <td>
	<script src="ubb.js"></script>
<form action="?act=reply" method="post" name="topic">
                  <input type="hidden" name="id" value="<%=id%>">
                  <table width="580"border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse">
                    <tr>
                      <td align="center">留言内容</td>
                      <td width="480" onload="javascript:if(this.width>480)this.width=480" style="border-collapse: collapse table-layout:fixed;word-break:break-all"><%=Change(rs("usercontent"))%></td>
                    </tr>
					<tr>
                      <td align="center">UBB</td>
                      <td><% call ubb %></td>
                    </tr>
                    <tr>
                      <td rowspan="2" align="center">回复内容</td>
                      <td><%
dim ii
for i=1 to 48
if len(i)=1 then ii="0" & i else ii=i
response.write "<img src=""images/faces/"&ii&".gif"" border=0 onclick=""insertsmilie('[pic"&ii&"]')"" style=""CURSOR: hand"">&nbsp;"
if i=16 or i=32 then response.write "<br>"
next
%></td>
                    </tr>
                    <tr>
                      <td>&nbsp;<textarea name="content" cols="50" rows="10" wrap="virtual"><%=rs("recontent")%></textarea></td>
                    </tr>
                    <tr>
                      <td align="center">固顶回复</td>
                      <td>&nbsp;<input name="top" type="checkbox" value="1"></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td><input name="submit" type="submit" value="确 定">
                        &nbsp;&nbsp;
                        <input name="submit2" type="reset" value="重 置"></td>
                    </tr>
                  </table><p align='center'><input type='button' onClick='javascript:history.back(-1)' value='返回上一页'>
                </form>
	</td>
    <td background="images/skin/t-rt.gif">&nbsp;</td>
  </tr>
  <tr>
    <td><img src="images/skin/t-bl.gif" width="31" height="32"></td>
    <td background="images/skin/t-bc.gif"></td>
    <td><img src="images/skin/t-br.gif" width="35" height="32"></td>
  </tr>
</table>
<%
conn.close
set rs=nothing
end sub

sub update()
If Not ChkPost Then 
errinfo="对不起,请不要从外部提交数据"
error(errinfo)
exit sub
End If

dim recontent,top,id
recontent=Trim(Request.Form("content"))
if request.Form("top")="" then
top=0
else
top=request.Form("top")
end if
id=request.Form("id")

if recontent="" then
errinfo="请输入回复内容"
error(errinfo)
exit sub
end if

Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from topic where id="&id
rs.open sql,conn,3,2
rs.update
rs("retime")=now()
rs("reply")="1"
rs("recontent")=recontent
rs("top")=top
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
sucinfo="回复成功"
suc(sucinfo)
end sub
%>
<!--#include file="bottom.asp"--></body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -