亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? post.jsp

?? Jive論壇2.5版本的源程序
?? JSP
?? 第 1 頁 / 共 2 頁
字號:

<%
/**
 *	$RCSfile: post.jsp,v $
 *	$Revision: 1.1.1.1 $
 *	$Date: 2002/09/09 13:50:23 $
 */
%>

<%@ page import="java.util.*,
                 com.jivesoftware.forum.*,
                 com.jivesoftware.forum.util.*"
    errorPage="error.jsp"
%>

<%@ include file="include/branding/style.jsp" %>

<%@ include file="include/forumSetup.jsp" %>

<%! // Method to apply filters to a message object (used to preview a message)
    private ForumMessage applyFilters(ForumFactory forumFactory, Forum forum,
            ForumMessage message)
    {
        try {
            FilterManager filterManager = forumFactory.getFilterManager();
            message = filterManager.applyFilters(message);
            filterManager = forum.getFilterManager();
            message = filterManager.applyFilters(message);
        } catch (Exception e) { e.printStackTrace(); }
        return message;
    }
%>

<%  // Get parameters
    long forumID = ParamUtils.getLongParameter(request,"forum",-1L);
	long threadID = ParamUtils.getLongParameter(request,"thread",-1L);
    long messageID = ParamUtils.getLongParameter(request,"message",-1L);
    boolean doPost = ParamUtils.getBooleanParameter(request,"doPost");
    boolean reply = ParamUtils.getBooleanParameter(request,"reply");
    boolean fromPreview = ParamUtils.getBooleanParameter(request,"fromPreview");
    String subject = ParamUtils.getParameter(request,"subject");
    String body = ParamUtils.getParameter(request,"body");
    String postButton = ParamUtils.getParameter(request,"postButton");
    boolean quote = ParamUtils.getBooleanParameter(request,"quote");
    
    boolean preview = doPost && ("Preview".equals(postButton)) && !("Go Back/Edit".equals(postButton));
    boolean edit = doPost && ("Go Back/Edit".equals(postButton));
    
    // Load the forum
    if (forumID == -1L) {
        try {
            long sessionForumID
                = ((Long)session.getAttribute("forumID")).longValue();
            if (sessionForumID != -1L) {
                forumID = sessionForumID;
            }
        }
        catch (Exception e) {}
    }
    else {
        session.setAttribute("forumID", new Long(forumID));
    }
    Forum forum = forumFactory.getForum(forumID);
    
    // Determine if moderation is turned on for this forum
    boolean isThreadModOn = (
        forum.getModerationDefaultThreadValue()
        < forum.getModerationMinThreadValue()
    );
    boolean isMsgModOn = (
        forum.getModerationDefaultMessageValue()
        < forum.getModerationMinMessageValue()
    );
    
    // Thread we're posting in
	ForumThread thread = null;
    // The parent message we're replying to (if this is a reply)
	ForumMessage parentMessage = null;
    // Load these objects only if we're replying
	if (reply) {
     	thread = forum.getThread(threadID);
        // a message ID might not be passed in. If this is the case, we're
        // replying to the root message so get the message ID from the root
        // message of the thread
        if (messageID == -1L) {
            parentMessage = thread.getRootMessage();
            messageID = parentMessage.getID();
        } else {
            parentMessage = thread.getMessage(messageID);
        }
	}
    
    // Security check. Determine if this user can post new messages or reply to
    // threads
    // Check to see if this user can create replies
    boolean login = false;
    if (reply) {
        if (!forum.hasPermission(ForumPermissions.CREATE_MESSAGE)
                && !forumFactory.hasPermission(ForumPermissions.CREATE_MESSAGE))
        {
            if (isGuest) {
                login = true;
            }
            else {
                throw new UnauthorizedException("No permission to post replies in this forum");
            }
        }
    }
    // check to see if this use can create new topics
    else {
        if (!forum.hasPermission(ForumPermissions.CREATE_THREAD)
                && !forumFactory.hasPermission(ForumPermissions.CREATE_THREAD))
        {
            if (isGuest) {
                login = true;
            }
            else {
                throw new UnauthorizedException("No permission to post new topics in this forum");
            }
        }
    }
    if (login) {
        // If we need to login, send the referrer along as a link to this page
        StringBuffer postLink = new StringBuffer("post.jsp?forum=").append(forumID);
        if (threadID != -1L) {
            postLink.append("&thread=").append(threadID);
        }
        if (messageID != -1L) {
            postLink.append("&message=").append(messageID);
        }
        if (reply) {
            postLink.append("&reply=").append(reply);
        }
        response.sendRedirect("login.jsp?referrer=" +
            java.net.URLEncoder.encode(postLink.toString()));
        return;
    }
    
    // A user manager lets us get and set user information
    UserManager userManager = forumFactory.getUserManager();
    
    // The new message we're creating
    ForumMessage newMessage = null;
    
    // Errors on the page
	boolean errors = false;
    
    // The error message to show to the user
	String errorMessage = "";
    
    // Grab the subject & body from the session if we're coming from
    // a message preview (these values can't be passed as parameters) and
    // I don't want to POST to every page
	if (doPost && fromPreview && subject==null && body==null) {
 	    subject = (String)session.getValue("jive.message.subject");
        body = (String)session.getValue("jive.message.body");
	}
    
	// Error checks
    
    // Check to see the subject & body are not blank
	if (doPost && (subject == null)) {
 	    errors = true;
		errorMessage = "Please enter a subject";
    }
	else if (doPost && (body == null)) {
 	    errors = true;
        errorMessage = "Sorry, you can't post a blank message. Type a message and try again.";
	}
    
     // Do a message preview. For this, we populate a blank ForumMessage 
    // object. We don't add it to the db
	if (doPost && preview) {
		if (!errors) {
            if (isGuest) {
			    newMessage = forumFactory.createMessage();
            }
            else {
			    newMessage = forumFactory.createMessage(pageUser);
            }
			newMessage.setSubject(subject);
			newMessage.setBody(body);
			session.putValue("jive.message.subject",subject);
			session.putValue("jive.message.body",body);
            newMessage = applyFilters(forumFactory, forum, newMessage);
		}
	}
    // Otherwise, do a real post
	else {
		// Create a new message/thread
		if (doPost && !edit && !errors) {
			// Create a new message object
            if (isGuest) {
			    newMessage = forumFactory.createMessage();
            } else {
			    newMessage = forumFactory.createMessage(pageUser);
            }
			newMessage.setSubject(subject);
			newMessage.setBody(body);
			// if this is a reply, add it to the thread
			if (reply) {
				thread.addMessage(parentMessage,newMessage);
			}
			else {
				// it is a new posting
				forum.addThread(forumFactory.createThread(newMessage));
                thread = newMessage.getForumThread();
			}
            // remove the forumID from the session
            session.removeAttribute("forumID");
   			// Figure out where we need to redirect to.
            String redirect = "thread.jsp?forum="+forumID+"&thread="+thread.getID();
            // Do a standard redirect back to the new thread page if we're
            // not replying to a message
            if (!reply) {
                // However, if thread moderation is turned on, we shoud just
                // redirect back to the forum's thread listing:
                if (isThreadModOn) {
                    response.sendRedirect("forum.jsp?forum="+forumID);
                    return;
                }
                else {
                    // Standard redirect back to the new thread page
                    response.sendRedirect(redirect);
                    return;
                }
            }
            // Otherwise, we need to redirect back to the new posted reply.
            // Compute the correct thread page to go to.
            else {
                // However, if message moderation is turned on, we should just
                // redirect back to the top of the thread listing
                if (isMsgModOn) {
                    response.sendRedirect("thread.jsp?forum=" + forumID
                        + "&thread=" + threadID);
                    return;
                }
                else {
                    // the ID of the newly created message
                    long newMessageID = newMessage.getID();
                    // the number of threads a user wants to display on a topic page
                    int threadRange = myEnv.du.getThreadRange(request, response, pageUser);
                    // the number of messages in this thread
                    int messageCount = thread.getMessageCount();
                    // number of pages in the topic listing (we'll want to be at
                    // the end of that since new messages end up at the end of the
                    // thread list)
                    int numPages = (int)Math.ceil((double)messageCount/(double)threadRange);
                    // starting point:
                    int start = (numPages-1) * threadRange;
                    // do the redirect:
        			response.sendRedirect(
                        "thread.jsp?forum=" + forumID + "&thread=" + thread.getID()
                        + "&start=" + start + "&msRange=" + threadRange + "#" + newMessageID
                    );
                    return;
                }
            }
		}
    }
	
    if (preview && errors) {
        preview = false;
    }
%>

<%  String title = titlePrefix + ": " + forum.getName() + ": Post"; %>
<%@ include file="include/header.jsp" %>

<%@ include file="include/branding/header.jsp" %>

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
    <td width="98%" valign="top">
    
    <span class="header">
    <%  if (reply) { %>
    Post a reply
    <%  } else { %>
    Post a new topic
    <%  } %>
    <br>
    <font size="-1">
    <%  if (rootBreadcrumbText != null && rootBreadcrumbLink != null) { %>
    <a href="<%= rootBreadcrumbLink %>" class="header"
    ><%= rootBreadcrumbText %></a>
    &raquo;
    <%  } %>
    <a href="index.jsp" class="header" title="Go back to the forum listing"
    >Forums</a>
    &raquo;
    <a href="forum.jsp?forum=<%= forumID %>" class="header" title="Go back to the topic list"
    ><%= forum.getName() %></a>
    </font>
    </span>
    
    </td>
    <td width="1%"><img src="images/blank.gif" width="8" height="1" border="0"></td>
    <td width="1%" valign="top">
    &nbsp;
    </td>
</tr>
</table>

<p>

<font size="-1" color="<%= deckTextColor %>">
<%  if (reply) { %>
Post a response in <a href="forum.jsp?forum=<%= forumID %>"><%= forum.getName() %></a>
to the message <b><%= parentMessage.getSubject() %></b>.
<%  } else { %>
Post in
<a href="forum.jsp?forum=<%= forumID %>"><%= forum.getName() %></a>.
<%  } %>
</font>
<p>

<p>

<font size="-1" color="<%= deckTextColor %>">
<%	if (preview) { %>
Below is a preview of how your message will look. You <b>must</b> click
on the "Post" button to submit your message. If you need to make changes, 
click the "Edit" button.
<%	} else { %>
    <%  if (reply) { %>
    Type a reply to the topic using the form below. When finished, you can   
    optionally preview your reply by clicking on the "Preview" button. Otherwise,  
    click the "Post" button to submit your message immediately.
    <%      if (isMsgModOn) { %>
        <p>
        <font color="#cc3300">
        Please note, your reply will need to be approved by a moderator before
        it will be posted in the forum.
        </font>
    <%      } %>
    
    <%  } else { %>
    Type your message using the form below. When finished, you can   
    optionally preview your post by clicking on the "Preview" button. Otherwise,  
    click the "Post" button to submit your message immediately. 
    <%      if (isThreadModOn) { %>
        <p>
        <font color="#cc3300">
        Please note, your topic will need to be approved by a moderator before
        it will be posted in the forum.
        </font>
    <%      } %>

    <%  } %>
<%  } %>
</font>    
<p>

<%  if (errors) { %>
    <font size="-1" color="#990000">
    <i><%= errorMessage %></i>
    </font>
    <p>
<%  } %>

<script language="JavaScript" type="text/javascript">
<!--
var checked = false;
function checkPost() {
    if (!checked) {
        checked = true;
        return true;
    }
    return false;
}
//-->
</script>

<form action="post.jsp" method="post" name="postForm" onsubmit="return checkPost();">
<input type="hidden" name="doPost" value="true">
<input type="hidden" name="reply" value="<%=reply%>">
<input type="hidden" name="forum" value="<%=forumID%>">
<input type="hidden" name="thread" value="<%=threadID%>">
<input type="hidden" name="message" value="<%=messageID%>">
<%	if (preview && !errors) { %>
<input type="hidden" name="fromPreview" value="true">
<%	} %>

<%	if (!preview) {
		// Add an "Re: " to the subject if this is a reply
		if (reply) {
			subject = parentMessage.getSubject();
			if (!subject.startsWith("Re: ")) {
				subject = "Re: " + subject;
			}
		}
%>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图.com| 日韩一区二区三区在线| 精品视频免费在线| 欧美一级日韩不卡播放免费| 久久久亚洲精品石原莉奈| 久久九九全国免费| 一区二区三区在线观看国产| 蜜臀91精品一区二区三区| 精品亚洲欧美一区| 99re在线精品| 91精品国产综合久久蜜臀 | 午夜国产精品一区| 国产综合久久久久久久久久久久| jlzzjlzz亚洲日本少妇| 在线播放亚洲一区| 中文字幕 久热精品 视频在线| 亚洲一区二区免费视频| 激情都市一区二区| 在线亚洲一区二区| 久久色在线视频| 亚洲一卡二卡三卡四卡五卡| 国产一区二区免费在线| 欧美吞精做爰啪啪高潮| 中文字幕欧美三区| 日精品一区二区三区| www.激情成人| 日韩精品一区二区三区蜜臀| 日韩毛片精品高清免费| 久久不见久久见免费视频7| 在线亚洲一区观看| 中文字幕不卡在线观看| 日韩不卡一区二区三区| 色伊人久久综合中文字幕| 亚洲精品在线电影| 午夜欧美视频在线观看| 99免费精品视频| 精品国产91久久久久久久妲己| 亚洲在线一区二区三区| 国产成人午夜视频| 欧美成人高清电影在线| 亚洲高清在线视频| 99久久99久久久精品齐齐| 久久久激情视频| 蜜桃一区二区三区四区| 欧美日韩精品三区| 一区二区三区在线观看网站| 成人av第一页| 久久久久久夜精品精品免费| 日本亚洲视频在线| 欧美性生活久久| 亚洲女人****多毛耸耸8| 国产福利电影一区二区三区| 日韩免费高清视频| 日韩黄色免费电影| 欧美日韩一区二区电影| 亚洲欧美视频一区| 99精品欧美一区二区蜜桃免费| 日本一区二区不卡视频| 国产高清精品网站| 2021中文字幕一区亚洲| 麻豆精品久久精品色综合| 欧美精品丝袜久久久中文字幕| 亚洲乱码国产乱码精品精的特点 | 国产精品免费视频观看| 国产一区二区三区电影在线观看| 3d动漫精品啪啪| 午夜影院久久久| 欧美老女人在线| 日韩高清在线一区| 91精品国产免费| 六月丁香婷婷色狠狠久久| 欧美一级黄色大片| 卡一卡二国产精品| 精品成人一区二区三区四区| 国内久久婷婷综合| 国产三级精品三级在线专区| 国产传媒久久文化传媒| 国产亚洲精品精华液| 丁香一区二区三区| 中文字幕一区二区三区精华液 | 亚洲欧美日韩国产手机在线| 91在线国产福利| 亚洲免费三区一区二区| 91丝袜美腿高跟国产极品老师 | 欧美三级韩国三级日本一级| 亚洲一级二级三级| 欧美日韩三级在线| 日韩精品亚洲专区| 日韩欧美一级精品久久| 国产精品伊人色| 国产精品久久久久久久蜜臀| 91在线免费看| 亚洲精品成人精品456| 欧美日韩一级大片网址| 秋霞影院一区二区| 国产性色一区二区| 99国产精品久| 亚洲福利视频三区| 欧美电影免费观看高清完整版 | 欧美国产激情一区二区三区蜜月 | 亚洲电影激情视频网站| 在线播放中文一区| 国产精品一区二区三区四区| 中文字幕亚洲电影| 欧美日韩精品欧美日韩精品一| 日韩不卡一区二区| 国产亚洲精品中文字幕| 91搞黄在线观看| 免费xxxx性欧美18vr| 久久免费精品国产久精品久久久久| 岛国av在线一区| 亚洲一区二区五区| 2022国产精品视频| 色综合久久久久| 日韩成人午夜精品| 国产精品久久久久影院| 欧美日韩不卡视频| 国产美女视频一区| 一区二区三区视频在线看| 日韩欧美在线综合网| 成人激情黄色小说| 日韩高清电影一区| 国产精品激情偷乱一区二区∴| 欧美精品日日鲁夜夜添| 丁香六月综合激情| 日本不卡的三区四区五区| 国产精品美女久久久久久久久久久| 欧美日韩午夜在线| 国产不卡免费视频| 三级欧美在线一区| 亚洲天堂免费看| 亚洲精品在线观看网站| 欧美丝袜自拍制服另类| 国产成人午夜精品影院观看视频| 亚洲成人资源网| 国产精品美女久久久久av爽李琼| 欧美另类z0zxhd电影| 成人精品视频.| 麻豆国产精品777777在线| 亚洲最大色网站| 国产色一区二区| 91麻豆精品国产91久久久久久| www.欧美精品一二区| 国产一区二区三区免费在线观看| 亚洲国产一区二区a毛片| 国产精品拍天天在线| 26uuu亚洲综合色| 欧美丰满一区二区免费视频| 91啪亚洲精品| 国产精品996| 免费不卡在线观看| 性做久久久久久免费观看| 日韩美女视频19| 中文字幕不卡在线观看| 欧美电影免费观看完整版| 欧美老女人在线| 在线观看国产一区二区| 91在线视频官网| 成人性生交大合| 国产美女主播视频一区| 日本 国产 欧美色综合| 五月天网站亚洲| 亚洲最新视频在线观看| 中文字幕日韩一区| 国产欧美一区二区三区在线看蜜臀 | 久久久久国色av免费看影院| 日韩你懂的在线观看| 欧美裸体一区二区三区| 在线国产亚洲欧美| 91首页免费视频| 99久久久无码国产精品| 成人av手机在线观看| 丁香五精品蜜臀久久久久99网站 | 久久久精品国产免费观看同学| 欧美videofree性高清杂交| 4438x亚洲最大成人网| 欧美日韩综合不卡| 欧美色网站导航| 欧美三日本三级三级在线播放| 91福利视频网站| 欧亚洲嫩模精品一区三区| 在线精品视频小说1| 欧美这里有精品| 欧美在线免费观看视频| 欧美综合一区二区| 欧美高清一级片在线| 欧美另类变人与禽xxxxx| 69堂精品视频| 欧美成人一区二区| 久久蜜桃av一区二区天堂 | 99精品一区二区三区| 色综合久久天天综合网| 日本精品裸体写真集在线观看| 色一区在线观看| 欧美特级限制片免费在线观看| 欧美麻豆精品久久久久久| 日韩欧美美女一区二区三区| 久久伊人中文字幕| 中文字幕国产一区| 一区二区三区四区高清精品免费观看|