edittemplate.jsp

来自「免费的java企业级论坛可执行程序」· JSP 代码 · 共 473 行 · 第 1/2 页

JSP
473
字号
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/edittemplate.jsp,v 1.56 2007/11/14 04:07:33 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.56 $
 - $Date: 2007/11/14 04:07:33 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2007 by MyVietnam.net
 -
 - All copyright notices regarding mvnForum MUST remain 
 - intact in the scripts and in the outputted HTML.
 - The "powered by" text/logo with a link back to
 - http://www.mvnForum.com and http://www.MyVietnam.net in 
 - the footer of the pages MUST remain visible when the pages
 - are viewed on the internet or intranet.
 -
 - This program is free software; you can redistribute it and/or modify
 - it under the terms of the GNU General Public License as published by
 - the Free Software Foundation; either version 2 of the License, or
 - any later version.
 -
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - GNU General Public License for more details.
 -
 - You should have received a copy of the GNU General Public License
 - along with this program; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -
 - Support can be obtained from support forums at:
 - http://www.mvnForum.com/mvnforum/index
 -
 - Correspondence and Marketing Questions can be sent to:
 - info at MyVietnam net
 -
 - @author: Phong, Ta Quoc  
 --%>
<%-- not localized yet --%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>

<%@ page import="com.mvnforum.MVNForumGlobal" %>

<%@ include file="inc_common.jsp"%>
<%@ include file="inc_doctype.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<mvn:html locale="${currentLocale}">
<mvn:head>
  <mvn:title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mvnforum.admin.edittemplate.title"/></mvn:title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css" />
</mvn:head>
<mvn:body onunload="document.submitform.submitbutton.disabled=false;">
<%@ include file="inc_js_checkvalid_myvietnamlib.jsp"%>
<script type="text/javascript">
function SubmitForm() {
  if (ValidateForm() == true) {
    <mvn:servlet>
      document.submitform.submitbutton.disabled=true;
    </mvn:servlet>  
    document.submitform.submit();
  }
}

function ValidateForm() {
<%if (isJavaScriptSupported) {%>
  if (isBlank(document.submitform.subject, "<fmt:message key="mvnforum.admin.edittemplate.subject"/>")) return false;
  if (isBlank(document.submitform.body, "<fmt:message key="mvnforum.admin.edittemplate.body"/>")) return false;
<%}%>
  return true;
}
</script>

<%@ include file="header.jsp"%>
<%
  String subject = ParamUtil.getAttribute(request, "TemplateSubject");
  String body = ParamUtil.getAttribute(request, "TemplateBody");
  String template = ParamUtil.getParameterFilter(request, "template");
  boolean success = (! ParamUtil.getAttribute(request, "Successful").equals(""));
  request.removeAttribute("Successful");
  if (template.equals("")) {
    template = MVNForumGlobal.TEMPLATE_SENDACTIVATECODE_PREFIX;
  }
  // note that we already check the template input in the Java Handler
%>
<br/>
<table width="95%" align="center">
  <tr class="nav">
    <td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif" alt="" /></td>
    <td width="100%" nowrap="nowrap">
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index", URLResolverService.RENDER_URL, "view")%>"><fmt:message key="mvnforum.common.nav.index"/></a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.admin.index.title"/></a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "misctasks")%>"><fmt:message key="mvnforum.admin.misctasks.title"/></a>&nbsp;&raquo;&nbsp;
    <fmt:message key="mvnforum.admin.edittemplate.title"/>
    </td>
  </tr>
</table>
<br/>

<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="pagedesc">
    <td>
    <fmt:message key="mvnforum.admin.edittemplate.info"/>
    </td>
  </tr>
</table>
<br/>
<mvn:cssrows>  
<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="portlet-section-header">
    <td><fmt:message key="mvnforum.admin.edittemplate.variables"/></td>
    <td><fmt:message key="mvnforum.admin.edittemplate.desc_and_usage"/></td>
  </tr>
<% if (template.equals(MVNForumGlobal.TEMPLATE_SENDACTIVATECODE_PREFIX)) {%>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{memberName}</td>
    <td><fmt:message key="mvnforum.common.member.login_name"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{serverName}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.server_name"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{MVNForumInfo}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.forum_information"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{activationUrl}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.activation_url"/> </td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{activateCode}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.activation_code"/></td>
  </tr>
<%} else if (template.equals(MVNForumGlobal.TEMPLATE_FORGOTPASSWORD_PREFIX)) {%>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{memberName}</td>
    <td><fmt:message key="mvnforum.common.member.login_name"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{serverName}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.server_name"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{MVNForumInfo}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.forum_information"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{passwordResetUrl}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.reset_url"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{currentTempPassword}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.reset_code"/></td>
  </tr>
<%} else if (template.equals(MVNForumGlobal.TEMPLATE_SENDMAIL_BECAUSE_CENSORED_POST_PREFIX)) {%>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{postID}</td>
    <td>ID of censored post</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{forumID}</td>
    <td>ID of forum that contains censored post</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadID}</td>
    <td>ID of thread that contains censored post</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{memberID}</td>
    <td>ID of author of censored post</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{postURL}</td>
    <td>URL of censored post</td>
  </tr>
<%} else if (template.equals(MVNForumGlobal.TEMPLATE_WATCHMAIL_SINGLE_PREFIX)) {%>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{lastSent}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.last_watch_mail"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{now}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.now_present"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{forumBase}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.forum_link"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadWatch.categoryName}</td>
    <td>Category that contains thread</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadWatch.forumName}</td>
    <td>Forum that contains thread</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadWatch.threadTopic}</td>
    <td>Topic of thread</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadWatch.lastPostMemberName}</td>
    <td>The last member that post in this thread</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadWatch.threadLastPostDate}</td>
    <td>Date of last post in this thread</td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{threadWatch.threadUrl}</td>
    <td>URL to this thread</td>
  </tr>
<%} else if (template.equals(MVNForumGlobal.TEMPLATE_WATCHMAIL_DIGEST_PREFIX)) {%>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{lastSent}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.last_watch_mail"/></td>
  </tr>
  <tr class="<mvn:cssrow/>">
    <td>&#36;{now}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.now_present"/></td>
  </tr>
  <tr class="<mvn:cssrow/>" valign="top">
    <td>&#36;{forumBase}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.forum_link"/></td>
  </tr>
  <tr class="<mvn:cssrow/>" valign="top">
    <td>&#36;{threadWatchList}</td>
    <td><fmt:message key="mvnforum.admin.edittemplate.thread_watch_list"/>
<pre>
&lt;#list threadWatchList as mailbeans >
&lt;#if mailbeans.leader >
[Category: &#36;{mailbeans.categoryName}]
  [Forum: &#36;{mailbeans.forumName}]
&lt;/#if>

⌨️ 快捷键说明

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