?? edittemplate.jsp
字號:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/edittemplate.jsp,v 1.14.2.1 2006/07/10 12:59:20 phuongpdd Exp $
- $Author: phuongpdd $
- $Revision: 1.14.2.1 $
- $Date: 2006/07/10 12:59:20 $
-
- ====================================================================
-
- Copyright (C) 2002-2006 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
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.MVNForumGlobal" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html>
<head>
<title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mvnforum.admin.Miscellaneous.editEmailTemplate"/><!--Edit email template--></title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="inc_js_checkvalid_myvietnamlib.jsp"%>
<script type="text/javascript">
function SubmitForm() {
if (ValidateForm() == true ) {
document.submitform.submitbutton.disabled=true;
document.submitform.submit();
}
}
function ValidateForm() {
if (isBlank(document.submitform.subject, "Subject")) return false;
if (isBlank(document.submitform.body, "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="98%" align="center">
<tr class="nav">
<td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
<td width="100%" nowrap>
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "index", URLResolver.RENDER_URL, "view")%>"><fmt:message key="mvnforum.common.nav.index"/></a> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.admin.index.title_name"/><!--Admin CP--></a> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "misctasks")%>"><fmt:message key="mvnforum.admin.header.misctasks"/><!--Miscellaneous Tasks--></a> »
<fmt:message key="mvnforum.admin.Miscellaneous.editEmailTemplate"/><!--Edit email template-->
</td>
</tr>
</table>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="pagedesc">
<td>
<fmt:message key="mvnforum.admin.editTemplate.DSC.first"/>
<!--
You can customize the content of template files, which used to send email for a certain purpose
(recovery his password, activate his account, or inform the new watch.)
-->
<br/><fmt:message key="mvnforum.admin.editTemplate.DSC.second"/>
<!--Note: You can using the predefined items which starts with "${" and ends with "}"-->.
<br/><fmt:message key="mvnforum.admin.editTemplate.DSC.third"/><!--You could use the template items below-->:
</td>
</tr>
</table>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="portlet-section-header">
<td><fmt:message key="mvnforum.admin.editTemplate.list.Items"/><!--Items--></td>
<td><fmt:message key="mvnforum.admin.editTemplate.list.descriptionAndUsage"/><!--Description and Usage--></td>
</tr>
<% if (template.equals(MVNForumGlobal.TEMPLATE_SENDACTIVATECODE_PREFIX)) {%>
<tr class="portlet-section-body">
<td>${memberName}</td><td>Member Login Name</td>
</tr>
<tr class="portlet-section-alternate">
<td>${serverName}</td><td>Server Name</td>
</tr>
<tr class="portlet-section-body">
<td>${MVNForumInfo}</td><td>Forum Information</td>
</tr>
<tr class="portlet-section-alternate">
<td>${activationUrl}</td><td>Activation URL </td>
</tr>
<tr class="portlet-section-body">
<td>${activateCode}</td><td>Activation Code</td>
</tr>
<%} else if (template.equals(MVNForumGlobal.TEMPLATE_WATCHMAIL_PREFIX)) {%>
<tr class="portlet-section-body">
<td>${lastSent}</td>
<td>The last watch mail sent date</td>
</tr>
<tr class="portlet-section-alternate">
<td>${now}</td>
<td>Now/Present</td>
</tr>
<tr class="portlet-section-body" valign='top'>
<td>${forumBase}</td>
<td>The forum Link</td>
</tr>
<tr class="portlet-section-alternate" valign='top'>
<td>threadWatchList</td>
<td>The thread watch list. Iterator over a list of thread watch list.
<br/>Usage: <#list threadWatchList as mailbeans > ...</#list></td>
</tr>
<tr class="portlet-section-body" valign='top'>
<td>forumName</td>
<td>Above is the properties of the thread watch list :
<br/>Usage:
<pre>
<#list threadWatchList as mailbeans >
<#if mailbeans.leader >
[Category: ${mailbeans.categoryName}]
[Forum: ${mailbeans.forumName}]
</#if>
Thread [${mailbeans.threadTopic}] given to us by ${mailbeans.memberName}
last posted by ${mailbeans.lastPostMemberName} on ${mailbeans.threadLastPostDate}
${mailbeans.threadUrl}
</#list>
</pre>
</td>
</tr>
<tr class="portlet-section-alternate">
<td>threadTopic</td>
<td>Thread Topic. Usage: ${mailbeans.threadTopic}</td>
</tr>
<tr class="portlet-section-body">
<td>memberName</td>
<td>Thread Owner. Usage: ${mailbeans.memberName}</td>
</tr>
<tr class="portlet-section-alternate">
<td>lastPostMemberName</td>
<td>The last post member in the thread. Usage: ${mailbeans.lastPostMemberName}</td>
</tr>
<tr class="portlet-section-body">
<td>threadLastPostDate</td>
<td>The last post date in the thread. Usage: ${mailbeans.threadLastPostDate}</td>
</tr>
<tr class="portlet-section-alternate">
<td>threadUrl</td>
<td>Thread URL. Usage: ${mailbeans.threadUrl}</td>
</tr>
<%} else if (template.equals(MVNForumGlobal.TEMPLATE_FORGOTPASSWORD_PREFIX)) {%>
<tr class="portlet-section-body">
<td>${memberName}</td>
<td>Member Login Name</td>
</tr>
<tr class="portlet-section-alternate">
<td>${serverName}</td>
<td>Server Name</td>
</tr>
<tr class="portlet-section-body">
<td>${MVNForumInfo}</td>
<td>Forum Information</td>
</tr>
<tr class="portlet-section-alternate">
<td>${passwordResetUrl}</td>
<td>Resetting URL</td>
</tr>
<tr class="portlet-section-body">
<td>${currentTempPassword}</td>
<td>Current temporary Password</td>
</tr>
<%}%>
<tr class="portlet-section-footer">
<td colspan='2'>
<fmt:message key="mvnforum.admin.templateHelp"/><!--Please see template help at--> <a href="http://www.freemarker.org">FreeMarker</a>
</td>
</tr>
</table>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="portlet-section-header">
<td colspan="2"><fmt:message key="mvnforum.admin.Miscellaneous.editEmailTemplate"/><!--Edit Mail Template-->:</td>
</tr>
<% if (success) {%>
<tr class="portlet-section-subheader">
<td colspan="2" align="center" class="warning">The template has been saved successfully.</td>
</tr>
<% } %>
<tr class="portlet-section-body">
<td><span class="requiredfield">*</span> <fmt:message key="mvnforum.admin.editTemplate.templateFor"/><!--Template for--></td>
<td>
<form name="changetemplate" method="get" action="<%=urlResolver.encodeURL(request, response, "edittemplate")%>">
<%=urlResolver.generateFormAction(request, response, "edittemplate")%>
<select name="template" onchange='document.changetemplate.submit();'>
<option value="forgotpasswordtemplate" <%if (template.equals("forgotpasswordtemplate")) {%> selected <%}%>>Recovery Passwords</option>
<option value="watchmailtemplate" <%if (template.equals("watchmailtemplate")) {%> selected <%}%>>Watch Mail</option>
<option value="sendactivemailtemplate" <%if (template.equals("sendactivemailtemplate")) {%> selected <%}%> >Active Members</option>
</select>
</form>
</td>
</tr>
<form action="<%=urlResolver.encodeURL(request, response, "updatetemplate" , URLResolver.ACTION_URL)%>" method="post" name="submitform">
<%=urlResolver.generateFormAction(request, response, "updatetemplate")%>
<input name="template" type="hidden" value="<%=template%>"/>
<tr class="portlet-section-body">
<td><span class="requiredfield">*</span> <fmt:message key="mvnforum.admin.editTemplate.subject"/><!--Subject-->:</td>
<td nowrap><input type="text" name="subject" value="<%=subject%>" size="80"></td>
</tr>
<tr class="portlet-section-alternate">
<td><span class="requiredfield">*</span> <fmt:message key="mvnforum.admin.editTemplate.body"/><!--Body-->:</td>
<td nowrap><textarea cols="80" rows="18" name="body" tabindex="2"><%=body%></textarea></td>
</tr>
<tr class="portlet-section-footer">
<td colspan="2" align="center">
<input type="button" name="submitbutton" value="<fmt:message key="mvnforum.admin.editTemplate.saveTemplate"/>" onclick='SubmitForm();' class="portlet-form-button"/>
<input type="reset" value="Reset" class="liteoption">
</td>
</tr>
</form>
</table>
<br/>
</fmt:bundle>
<%@ include file="footer.jsp"%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -