📄 reply.asp
字号:
<%@ CODEPAGE = "936" %>
<!--#include file="Connections.asp" -->
<!--#include file="ubb.asp" -->
<!--#include file="ubb.js" -->
<!--#include file="top.asp" -->
<%
if request.querystring("action")="add" then
reply=request("f3_content")
username=Request.Form("username")
t_id=request("t_id")
ip=Request.Form("ip")
action="ture"
if username="" then
error1="用户不能为空<BR>"
action="false"
end if
if reply="" then
error1=error1&"内容不能为空<BR>"
action="false"
end if
if len("content")>total then
error1=error1&"内容超过了"&total&"的限制"
action="false"
end if
if action="false" then
response.redirect("?action=error&error1="&error1&"")
response.end
end if
strSql = "insert into reply (r_content,t_id,r_ip,r_username) Values ('"
strSql = StrSQl & reply & "',"
strSql = StrSQl & t_id & ",'"
strSql = StrSQl & ip & "','"
strSql = StrSQl & username & "')"
conn.Execute (strsql)
response.redirect"index.asp"
response.end
elseif request.querystring("action")="" then
sql="select * from guestbook where id="&request.querystring("l_id")&""
set rs=conn.execute(sql)
%>
<div align="center">
<center>
<table width="700" border="1" style="border-collapse: collapse" bordercolor="<%=bgcolor%>" cellpadding="4" cellspacing="1">
<form name="form1" method="POST" action="reply.asp?action=add&t_id=<%=request.querystring("l_id")%>" onkeydown="up()" >
<tr align="center">
<td colspan="2" <%=hColor%> class=tdc1 height="22">回复<%=rs("username")%>的留言</td>
</tr>
<tr>
<td width="20%" bgcolor=<%=tColor2%> class=tdc>留言标题:</td>
<td bgcolor=<%=tColor2%> class=tdc><% if rs("laccess")="1" and Session("25175guestbook") = "" then%>
此留言为悄悄话
<%else%>
<%=ubbcode(rs("title"))%>
<%end if%> </td>
</tr>
<tr>
<td width="20%" bgcolor=<%=tColor2%> class=tdc>留言内容:</td>
<td bgcolor=<%=tColor2%> class=tdc><% if rs("laccess")="1" and Session("25175guestbook") = "" then%>
此留言为悄悄话
<%else%>
<%=ubbcode(rs("content"))%>
<%end if%></td>
</tr>
<tr> <input type="hidden" name=ip value="<% = o_ip %>">
<td width="20%" align="right" bgcolor=<%=tColor2%> class=tdc>
<p align="left">你的名字:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input name="username" type="text" class=tdc size="25" maxlength="15">
</td>
</tr>
<tr>
<td width="20%" bgcolor=<%=tColor2%> class=tdc>回复内容:</td>
<td bgcolor=<%=tColor2%> class=tdc>
<textarea name="f3_content" cols="50" rows="3" class=tdc></textarea>
</td>
</tr>
<tr>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="hidden" name="replytime" value="<%= now() %>">
</td>
<td bgcolor=<%=tColor2%> class=tdc>
<input type="submit" name="Submit" value="提交" class=bdtj>
<input type="reset" name="Submit2" value="重设" class=bdtj>[按CTRL+ENTER 直接发表]
</td>
</tr>
</form>
</table>
</center>
</div>
<% set rs=nothing%>
<% else%>
<center>
<table width="700" border="1" cellspacing="1" cellpadding="4" style="border-collapse: collapse"
bordercolor="<%=bgcolor%>">
<tr>
<td width="20%" align="center" <%=tColor%> class=tdc>错误提示</td>
</tr>
<tr>
<td width="20%" align="center" bgcolor=<%=tColor2%> class=tdc>
<%=request.querystring("error1")%>
<BR> <a href="javascript:history.go(-1)">返回</a>
</td>
</tr>
</table>
</center>
</div>
<% end if%>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -