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

📄 newtopic.asp

📁 简介:一个程序小巧而功能强大
💻 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" -->
<%
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("F")) = 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 FROM Forum_Forums FF, Forum_Categories FC WHERE FF.Forum_ID = "& clng(request.querystring("F")) &" AND FC.Category_ID = FF.Forum_Category_ID;"
	rsForums.Open sqlForums, adoConn, CMDText
	if rsForums.eof or rsForums.bof then
		rsForums.close
		set rsForums = nothing
		strMessage = "The forum that you have selected could not be found. Please click <a href=""default.asp"">here</a> if you are not redirected within 5 seconds."
		strRedirectURL = "default.asp"
	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")
		strCcategoryID = rsForums("Category_ID")
		rsForums.close
		set rsForums = nothing
	end if
else
	strMessage = "The forum that you have selected could not be found. Please click <a href=""default.asp"">here</a> if you are not redirected within 5 seconds."
	strRedirectURL = "default.asp"
end if

'Check that the user is logged in.
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 = "javascript:history.go(-1)"
end if

if strGroupID <> "" and session("admin") <> true then

	'Group Checking Code
	
end if

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><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>
		<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"></textarea>
		</td>
		</tr>
		<%
		if session("Admin") <> true then
			'Check whether the user is in the Moderators table
			set rsModCheck = server.createobject("adodb.recordset")
			sqlModCheck = "SELECT Mod_ID FROM Forum_Moderator WHERE Mod_User_ID = "& session("userid") &" AND Mod_Forum_ID = "& strForumID &";"
			rsModCheck.open sqlModcheck, adoConn
			if not (rsModcheck.eof or rsModcheck.bof) then
				strModerator = true
			end if
			rsModCheck.close
			set rsModecheck = nothing
		end if	
		if session("admin") = true or strModerator = true then
		%>
			<tr class="body">
			<td>
			<b>管理设置:</b>
			</td>
			<td>
			<input name="Post_Type" type="radio" value="1" checked tabindex="3">Standard <input name="Post_Type" type="radio" value="2" tabindex="4">Sticky <%if session("admin") = true then%><input name="Post_Type" type="radio" value="3" tabindex="5">Announcement<%end if%>
			</td>
			</tr>
		<%
		end if
		%>
		<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="ForumID" type="hidden" value="<%=clng(request.querystring("F"))%>">
		<input name="method" type="hidden" value="topic">
		<input name="reset" type="reset" id="reset" value="重置" style="width: 80px;"> <input name="button" type="submit" id="button" value="发表" style="width: 80px;">
		</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>
<%
end if
%>
<!--#include file="Includes/inc-footer.asp" -->
</body>
</html>

⌨️ 快捷键说明

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