📄 post.asp
字号:
<%
'#############################################################
'# 中国在线--极酷论坛 ver.2001 3.0
'#
'# 版权所有: 中国在线 (ChinaXP.Net)
'#
'# 制作人 : 周周 (SeeYa!)
'#
'#
'# 主页地址: http://www.ChinaXP.net/ 中国在线
'# http://www.ChinaXP.Net/bbs/ 中国在线--极酷论坛
'#
'#############################################################
'#################################################################################
'## Variable declaration
'#################################################################################
dim strSelectSize
dim intCols, intRows, strMemberID
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_code.asp" -->
<%
'#################################################################################
'## Initialise variables
'#################################################################################
strSelectSize = Request.Form("SelectSize")
strRqMethod = Request.QueryString("method")
strRqForumID = Request.QueryString("FORUM_ID")
strRqCatID = Request.QueryString("CAT_ID")
strCkPassWord = Request.Cookies(strUniqueID & "User")("Pword")
'#################################################################################
'## Page-code start
'#################################################################################
if strSelectSize = "" or IsNull(strSelectSize) then
strSelectSize = Request.Cookies(strCookieURL & "strSelectSize")
end if
if not(IsNull(strSelectSize)) then
Response.Cookies(strCookieURL & "strSelectSize") = strSelectSize
Response.Cookies(strCookieURL & "strSelectSize").expires = Now() + 365
end if
%>
<!--#INCLUDE FILE="inc_top.asp" -->
<%
'######## 获得 Category Title & Forum Title & Topic Title ###########
if (strAuthType = "nt") then
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
call NTauthenticate()
if (ChkAccountReg() = "1") then
call NTUser()
end if
end if
if strRqMethod = "EditCategory" then
if Request.QueryString("CAT_ID") <> "" then
set rs_cat = Server.CreateObject("ADODB.RecordSet")
'## Forum_SQL - Get the Category Title
strSql = "SELECT " & strTablePrefix & "CATEGORY.CAT_NAME, "
strSql = strSql & strTablePrefix & "CATEGORY.CAT_ORDER "
strSql = strSql & " FROM " & strTablePrefix & "CATEGORY "
strSql = strSql & " WHERE " & strTablePrefix & "CATEGORY.CAT_ID = " & Request.QueryString("CAT_ID")
set rs_cat = my_Conn.Execute (StrSql)
strCategoryTitle = rs_cat("CAT_NAME")
rs_cat.close
set rs_cat = nothing
end if
end if
if strRqMethod = "Edit" or _
strRqMethod = "EditTopic" or _
strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or _
strRqMethod = "TopicQuote" then
if Request.QueryString("FORUM_ID") <> "" then
set rs_forum = Server.CreateObject("ADODB.RecordSet")
'## Forum_SQL - Get the Forum Title
strSql = "SELECT " & strTablePrefix & "FORUM.F_SUBJECT "
strSql = strSql & " FROM " & strTablePrefix & "FORUM "
strSql = strSql & " WHERE " & strTablePrefix & "FORUM.FORUM_ID = " & Request.QueryString("FORUM_ID")
set rs_forum = my_Conn.Execute (StrSql)
strSubForumTitle = rs_forum("F_SUBJECT")
rs_forum.close
set rs_forum = nothing
end if
if Request.QueryString("TOPIC_ID") <> "" then
set rs_topic = Server.CreateObject("ADODB.RecordSet")
'## Forum_SQL - Get the Topic Title
strSql = "SELECT " & strTablePrefix & "TOPICS.T_SUBJECT "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID")
set rs_topic = my_Conn.Execute (StrSql)
strTopicTitle = rs_topic("T_SUBJECT")
rs_topic.close
set rs_topic = nothing
end if
end if
'####################################################################
%>
<script src="Board.js"></script>
<%
strMemberID = getMemberID(STRdbntUserName)
if strRqForumId <> "" then
set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT F_PRIVATEFORUMS FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & strRqForumID
set rs = my_conn.execute(strSQL)
IsPrivateType = rs("F_PRIVATEFORUMS")
rs.close
set rs = nothing
end if
select case strSelectSize
case "1"
intCols = 45
intRows = 6
case "2"
intCols = 80
intRows = 12
case "3"
intCols = 90
intRows = 12
case "4"
intCols = 130
intRows = 15
case else
intCols = 80
intRows = 12
end select
if intAllowUploads = 1 and STRdbntUserName <> "" and _
(strRqMethod = "Topic" or strRqMethod = "Reply" or _
strRqMethod = "ReplyQuote" or strRqMethod = "TopicQuote") then
if ((mLev = 4) or (chkForumModerator(strRqForumId, strDBNTUserName) = "1") or (getAllowUploads(strDBNTUserName) = 1)) then
Dim objDict
Set objDict = Server.CreateObject("Scripting.Dictionary")
set objRec = my_Conn.execute("SELECT * FROM " & strTablePrefix & "MODS WHERE (M_NAME = 'Attachment') OR (M_CODE = 'Attachment')")
while not objRec.EOF
objDict.Add objRec.Fields.Item("m_code").Value, objRec.Fields.Item("m_value").Value
objRec.moveNext
wend
Dim intMaxFileSize, strFileType
strFileType = trim(objDict.Item("faExtensions"))
intMaxFileSize = cLng(objDict.Item("faMaxSize"))
end if
end if
%>
<script language="JavaScript">
<!--
//#################################################################################
//## Allowed User - Selection Code
//#################################################################################
function openscriphtml()
{
if (navigator.appName!="Microsoft Internet Explorer")
alert("此功能 Netscape 用户不能使用!")
else
{
newwin=window.open('htmledit/editor.html','','width=544,height=294');
newwin.focus();
}
}
function selectUsers()
{
if (document.PostTopic.AuthUsers.length == 1)
{
document.PostTopic.AuthUsers.options[0].value = "";
return;
}
if (document.PostTopic.AuthUsers.length == 2)
document.PostTopic.AuthUsers.options[0].selected = true
else
for (x = 0;x < document.PostTopic.AuthUsers.length - 1 ;x++)
document.PostTopic.AuthUsers.options[x].selected = true;
}
function MoveWholeList(strAction)
{
if (strAction == "Add")
{
if (document.PostTopic.AuthUsersCombo.length > 1)
{
for (x = 0;x < document.PostTopic.AuthUsersCombo.length - 1 ;x++)
document.PostTopic.AuthUsersCombo.options[x].selected = true;
InsertSelection("Add");
}
}
else
{
if (document.PostTopic.AuthUsers.length > 1)
{
for (x = 0;x < document.PostTopic.AuthUsers.length - 1 ;x++)
document.PostTopic.AuthUsers.options[x].selected = true;
InsertSelection("Del");
}
}
}
function InsertSelection(strAction)
{
var pos,user,mText;
var count,finished;
if (strAction == "Add")
{
pos = document.PostTopic.AuthUsers.length;
finished = false;
count = 0;
do //Add to destination
{
try{
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
finished = true;
continue;
}
}
catch(e)
{
finished = true;
return;
}
if (document.PostTopic.AuthUsersCombo.options[count].selected)
{
document.PostTopic.AuthUsers.length +=1;
document.PostTopic.AuthUsers.options[pos].value = document.PostTopic.AuthUsers.options[pos-1].value;
document.PostTopic.AuthUsers.options[pos].text = document.PostTopic.AuthUsers.options[pos-1].text;
document.PostTopic.AuthUsers.options[pos-1].value = document.PostTopic.AuthUsersCombo.options[count].value;
document.PostTopic.AuthUsers.options[pos-1].text = document.PostTopic.AuthUsersCombo.options[count].text;
document.PostTopic.AuthUsers.options[pos-1].selected = true;
}
pos = document.PostTopic.AuthUsers.length;
count += 1;
}while (!finished); //finished adding
finished = false;
count = document.PostTopic.AuthUsersCombo.length - 1;
do //remove from source
{
try {
if (document.PostTopic.AuthUsersCombo.options[count].text == "")
{
--count;
continue;
}
}
catch(e)
{
return;
}
if (document.PostTopic.AuthUsersCombo.options[count].selected )
{
for ( z = count ; z < document.PostTopic.AuthUsersCombo.length-1;z++)
{
if ((document.PostTopic.AuthUsers.length-count) == 2)
{
document.PostTopic.AuthUsers.options[z].value = "";
document.PostTopic.AuthUsers.options[z].text = "";
}
else
{
document.PostTopic.AuthUsersCombo.options[z].value = document.PostTopic.AuthUsersCombo.options[z+1].value;
document.PostTopic.AuthUsersCombo.options[z].text = document.PostTopic.AuthUsersCombo.options[z+1].text;
}
}
document.PostTopic.AuthUsersCombo.length -= 1;
}
--count;
if (count < 0)
finished = true;
}while(!finished) //finished removing
}
if (strAction == "Del")
{
pos = document.PostTopic.AuthUsersCombo.length;
finished = false;
count = 0;
do //Add to destination
{
try{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
finished = true;
continue;
}
}
catch(e)
{
finished = true;
return;
}
if (document.PostTopic.AuthUsers.options[count].selected)
{
document.PostTopic.AuthUsersCombo.length +=1;
document.PostTopic.AuthUsersCombo.options[pos].value = document.PostTopic.AuthUsersCombo.options[pos-1].value;
document.PostTopic.AuthUsersCombo.options[pos].text = document.PostTopic.AuthUsersCombo.options[pos-1].text;
document.PostTopic.AuthUsersCombo.options[pos-1].value = document.PostTopic.AuthUsers.options[count].value;
document.PostTopic.AuthUsersCombo.options[pos-1].text = document.PostTopic.AuthUsers.options[count].text;
document.PostTopic.AuthUsersCombo.options[pos-1].selected = true;
}
count += 1;
pos = document.PostTopic.AuthUsersCombo.length;
}while (!finished); //finished adding
finished = false;
count = document.PostTopic.AuthUsers.length - 1;
do //remove from source
{
try{
if (document.PostTopic.AuthUsers.options[count].text == "")
{
--count;
continue;
}
}
catch(e)
{
return;
}
if (document.PostTopic.AuthUsers.options[count].selected )
{
for ( z = count ; z < document.PostTopic.AuthUsers.length-1;z++)
{
if ((document.PostTopic.AuthUsers.length-count) == 2)
{
document.PostTopic.AuthUsers.options[z].value = "";
document.PostTopic.AuthUsers.options[z].text = "";
}
else
{
document.PostTopic.AuthUsers.options[z].value = document.PostTopic.AuthUsers.options[z+1].value;
document.PostTopic.AuthUsers.options[z].text = document.PostTopic.AuthUsers.options[z+1].text;
}
}
document.PostTopic.AuthUsers.length -= 1;
}
--count;
if (count < 0)
finished = true;
}while(!finished) //finished removing
}
}
function autoReload(objform)
{
var tmpCookieURL = '<%=strCookieURL%>';
if (objform.SelectSize.value == 1)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -