📄 newreply.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="Includes/site-dataconn.asp" -->
<!--#include file="Includes/func-common.asp" -->
<!--#include file="Includes/site-config.asp" -->
<!--#include file="Includes/inc-common.asp" -->
<!--#include file="Includes/func-htmlcode.asp" -->
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>
<html>
<head>
<title>// <%=Site_Name%> //</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK REL=stylesheet TYPE="text/css" HREF="Includes/site-style.css">
</head>
<body>
<!--#include file="Includes/inc-header.asp" -->
<%
if isnumeric(request.querystring("Q")) = true and isnumeric(request.querystring("T")) = true then
'Retrieve forum and category name from database, if it doesn't exist invalid forum was selected
set rsForums = server.createobject("adodb.recordset")
sqlForums = "SELECT FF.Forum_ID, FF.Forum_Name, FF.Forum_Group_ID, FF.Forum_Allow_Images, FC.Category_Title, FC.Category_ID, FT.Topic_ID, FT.Topic_Title, FT.Topic_Forum_ID, FT.Topic_Status FROM Forum_Topics FT, Forum_Forums FF, Forum_Categories FC WHERE FT.Topic_ID = "& clng(request.querystring("T")) &" AND FF.Forum_ID = FT.Topic_Forum_ID AND FC.Category_ID = FF.Forum_Category_ID AND FT.Topic_Type <> 0;"
rsForums.Open sqlForums, adoConn, CMDText
if rsForums.eof or rsForums.bof then
rsForums.close
set rsForums = nothing
strMessage = ""
strRedirectURL = ""
else
'Set categoy and forum name
strForum = rsForums("Forum_Name")
strForumID = rsForums("Forum_ID")
strGroupID = rsForums("Forum_Group_ID")
strImages = rsForums("Forum_Allow_Images")
strCategory = rsForums("Category_Title")
strCategoryID = rsForums("Category_ID")
strTopicID = rsForums("Topic_ID")
strTopic = rsForums("Topic_Title")
strTopicStatus = rsForums("Topic_Status")
rsForums.close
set rsForums = nothing
end if
else
strMessage = "The topic that you have selected could not be found. Click <a href=""default.asp"">here</a> if you are not redirected within 5 seconds."
strRedirectURL = "default.asp"
end if
if session("Username") = "" then
strMessage = "你必须先登陆本论坛. click <a href=""javascript:history.go(-1)"" onMouseOver=""self.status=document.referrer;return true"">here</a> to go back."
strRedirectURL = "displaytopic.asp?T="& strTopicID
end if
'Check that the topic is not closed
if strTopicStatus = 0 then
strMessage = "The topic that you have selected has been closed by the forum moderators. Click <a href=""displayforum.asp?F="& forumid &""">here</a> to return to the forums."
strRedirectURL = "displayforum.asp?F="& strForumID
end if
if strGroupID <> "" and session("admin") <> true then
'Group Checking Code
end if
'If the user is quoting someone grab the text from the database
if request.querystring("Q") <> "" then
set rsQuote = server.createobject("adodb.recordset")
sqlQuote = "SELECT FP.Post_Text, FU.User_Name FROM Forum_Posts FP, Forum_Users FU WHERE FP.Post_User_ID = FU.User_ID AND FP.Post_ID = "& clng(request.querystring("Q")) &";"
rsQuote.open sqlQuote, adoConn, CMDText
if not (rsQuote.eof or rsQuote.bof) then
QUser = rsQuote("User_Name")
QText = rsQuote("Post_Text")
end if
rsQuote.close
set rsQuote = nothing
if QText <> "" then
QText = remove_quote(QText)
QText = htmlcode(QText)
QFull = "[QUOTE]Quoting: [B]" & QUser & "[/B]" & vbcrlf & "[I]" & QText & "[/I][/QUOTE]"
end if
end if
'Display error or continue
If strMessage <> "" then
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" class="main">
<tr valign="middle" class="title">
<td align="center"><%=Site_Name%> // Error</td>
</tr>
<tr valign="top" class="body">
<td align="center"><%=strMessage%></td>
</tr>
</table>
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=<%=strRedirectURL%>">
<%
else
%>
<table border="0" cellspacing="0" cellpadding="2" align="center" class="plain">
<tr>
<td valign="top">
<a href="default.asp"><%=Site_Name%></a> >> <a href="displaycategory.asp?C=<%=strCategoryID%>"><%=strCategory%></a> >> <a href="displayforum.asp?F=<%=strForumID%>"><%=strForum%></a> >> <a href="displaytopic.asp?T=<%=strTopicID%>"><%=strTopic%></a><br>
<%=Site_Description%>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" class="main">
<tr align="center" valign="middle" class="title">
<td colspan="2"><%=Site_Name%> // 回复话题</td>
</tr>
<form action="posting.asp" method="post" name="reply" onSubmit="this.button.disabled = true;">
<tr valign="top" class="body">
<td width="250"><b>用户名:</b></td>
<td><%=session("UserName")%></td>
</tr><tr valign="top" class="body">
<td width="250"><b>帖子主题:</b></td>
<td><input name="Title" type="text" style="width: 400px; border: 1px solid black" maxlength="60" tabindex="1"></td>
</tr>
<tr valign="top" class="body">
<td width="250">
<b>你的回复:</b><br><br>
<table border="0" align="center" cellpadding="0" cellspacing="1" class="main" style="width: 210px;">
<tr valign="middle" class="title">
<td height="15" align="center" valign="middle">你的表情</td>
</tr>
<tr valign="top" class="body">
<td align="center">
<b>Click on a Smiley to insert it.</b>
<script language="Javascript" type="text/javascript">
function insertsmilie(smilieface)
{
document.reply.text.value+=smilieface;
document.reply.text.focus();
}
</script>
</td>
</tr>
<tr align="center" valign="middle" class="body">
<td height="25" align="left">
<%
'Smiley loop
set rsSmilies = server.createobject("adodb.recordset")
sqlSmilies = "SELECT TOP 15 * FROM Forum_Smilies;"
rsSmilies.open sqlSmilies, adoConn, CMDText
if not (rsSmilies.eof or rsSmilies.bof) then
SmileyCnt = rsSmilies.recordcount
SmileyData = rsSmilies.getrows()
else
SmileyCnt = 0
end if
tempCnt = 0
do until tempCnt = SmileyCnt
response.write("<a href=""javascript:insertsmilie('"& SmileyData(1, tempCnt) &" ')"" style='width: 65px; text-align: center; margin-bottom: 5px;'><img src='Images/Smilies/"& SmileyData(2, tempCnt) &"' border='0'></a>")
tempCnt = tempCnt + 1
if tempCnt mod 3 = 0 then response.write("<br>")
loop
%>
</td>
</tr>
<tr valign="top" class="body">
<td align="center"><a href="#" onclick="javascript:window.open('pop-smilies.asp', '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=240,height=200');">[More Smilies]</a></td>
</tr>
</table>
</td>
<td>
<textarea name="text" style="width: 400px; height: 250px; border: 1px solid black" tabindex="2"><%=QFull%></textarea>
</td>
</tr>
<tr valign="top" class="body">
<td width="250">
<b>贴子设置:</b>
</td>
<td>
<table align="left" border="0" cellspacing="1" cellpadding="2" style="width: 210px;">
<tr>
<td>Process BB Code</td>
<td width="30" align="center"><input name="bbcode" type="checkbox" value="1" checked tabindex="3"></td>
</tr>
<tr>
<td>Include Smilies</td>
<td width="30" align="center"><input type="checkbox" name="smilies" value="1" checked tabindex="4"></td>
</tr>
<tr>
<td>Include Signature</td>
<td width="30" align="center"><input type="checkbox" name="signature" value="1" <%if request.cookies(site_name)("Signature") = "1" then%>checked<%end if%> tabindex="5"></td>
</tr>
</table>
</td>
</tr>
<tr valign="top" class="body">
<td width="250"></td>
<td>
<input name="TopicID" type="hidden" value="<%=clng(request.querystring("T"))%>">
<input name="ForumID" type="hidden" value="<%=strForumID%>">
<input name="method" type="hidden" value="reply">
<input name="reset" type="reset" id="reset" value="重置" style="width: 80px;" tabindex="7"> <input name="button" type="submit" id="button" value="发表" style="width: 80px;" tabindex="6">
</td>
</tr>
</form>
</table>
<table border="0" cellspacing="1" cellpadding="2" align="center" class="main">
<tr valign="middle" class="title">
<td align="center" colspan="3"><%=Site_Name%> // 论坛说明</td>
</tr>
<tr valign="middle" class="body">
<td width="33%">
HTML:
<%
if Site_Allow_HTML = 1 then
response.write("<font color='#009900'><b>Enabled</b></font>")
else
response.write("<font color='#CC0000'><b>Disabled</b></font>")
end if
%>
</td>
<td width="33%">
BB Code:
<%
if Site_Allow_BB = 1 then
response.write("<font color='#009900'><b>Enabled</b></font>")
else
response.write("<font color='#CC0000'><b>Disabled</b></font>")
end if
%>
</td>
<td width="33%">
Image Code:
<%
if strImages = 1 then
response.write("<font color='#009900'><b>Enabled</b></font>")
else
response.write("<font color='#CC0000'><b>Disabled</b></font>")
end if
%>
</td>
</tr>
</table>
<%
if Site_Topic_Review = 1 then
'Grab the last 10/12 posts from the current topic
set rsReview = server.createobject("adodb.recordset")
sqlReview = "SELECT TOP 12 FP.Post_User_ID, FP.Post_ID, FP.Post_Time, FP.Post_text, FU.User_ID, FU.User_Name FROM Forum_Posts FP, Forum_Users FU, Forum_Topics FT WHERE (FP.Post_User_ID = FU.User_ID AND FP.Post_Topic_ID = FT.Topic_ID) AND (FP.Post_Topic_ID = "& clng(request.querystring("T")) &") ORDER BY FP.Post_Time DESC;"
rsReview.open sqlReview, adoConn, CMDText
if rsReview.eof or rsReview.bof then
ReviewCnt = 0
else
ReviewData = rsReview.getrows()
ReviewCnt = rsReview.recordcount
end if
rsReview.close
set rsReview = nothing
'Display the last posts if they exist
if reviewCnt > 0 then
%>
<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" class="main">
<tr class="title">
<td colspan="2" align="center">话题回复者</td>
</tr>
<%
tempCnt = 0
do while tempCnt < ReviewCnt
%>
<tr class="body" valign="top">
<td width="250"><%=ReviewData(5, tempCnt)%></td>
<td><%=ReviewData(3, tempCnt)%></td>
</tr>
<%
tempCnt = tempCnt + 1
loop
%>
</table>
<%
end if
end if
end if
%>
<!--#include file="Includes/inc-footer.asp" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -