configmvncore.jsp
来自「免费的java企业级论坛可执行程序」· JSP 代码 · 共 483 行 · 第 1/2 页
JSP
483 行
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/configmvncore.jsp,v 1.47 2007/11/26 11:37:05 minhnn Exp $
- $Author: minhnn $
- $Revision: 1.47 $
- $Date: 2007/11/26 11:37:05 $
-
- ====================================================================
-
- 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: Minh Nguyen
- @author: Mai Nguyen
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="net.myvietnam.mvncore.util.DateUtil" %>
<%@ page import="net.myvietnam.mvncore.configuration.DOM4JConfiguration" %>
<%@ 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.configmvncore.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 (document.submitform.use_datasource.checked == false) {
if (isBlank(document.submitform.database_type, "database_type")) return false;
if (isBlank(document.submitform.driver_class_name, "driver_class_name")) return false;
if (isBlank(document.submitform.database_url, "database_url")) return false;
if (isBlank(document.submitform.database_user, "database_user")) return false;
if (!isUnsignedInteger(document.submitform.max_connection, "max_connection")) return false;
if (!isUnsignedInteger(document.submitform.max_time_to_wait, "max_time_to_wait")) return false;
if (!isUnsignedInteger(document.submitform.minutes_between_refresh, "minutes_between_refresh")) return false;
} else {
if (isBlank(document.submitform.datasource_name, "datasource_name")) return false;
}
if (isBlank(document.submitform.receive_mail_server, "recieve mail_server")) return false;
if (isBlank(document.submitform.send_mail_server, "send mail_server")) return false;
if (isBlank(document.submitform.default_mail_from, "default_mail_from")) return false;
if (!isEmail(document.submitform.default_mail_from, "default_mail_from")) return false;
if (!isUnsignedInteger(document.submitform.send_mail_port, "receive mail port")) return false;
if (!isUnsignedInteger(document.submitform.receive_mail_port, "send mail port")) return false;
if (isBlank(document.submitform.server_path, "server_path")) return false;
if (isBlank(document.submitform.server_hour_offset, "server_hour_offset")) return false;
//if (!isUnsignedInteger(document.submitform.server_hour_offset, "server_hour_offset")) return false;
return true;
}
function OnChangeUseDatasource() {
if (document.submitform.use_datasource.checked == false) {
document.getElementById("id_driver_class_name").style.display = '';
document.getElementById("id_database_url").style.display = '';
document.getElementById("id_database_user").style.display = '';
document.getElementById("id_database_password").style.display = '';
document.getElementById("id_max_connection").style.display = '';
document.getElementById("id_max_time_to_wait").style.display = '';
document.getElementById("id_minutes_between_refresh").style.display = '';
document.getElementById("id_datasource_name").style.display = 'none';
} else {
document.getElementById("id_driver_class_name").style.display = 'none';
document.getElementById("id_database_url").style.display = 'none';
document.getElementById("id_database_user").style.display = 'none';
document.getElementById("id_database_password").style.display = 'none';
document.getElementById("id_max_connection").style.display = 'none';
document.getElementById("id_max_time_to_wait").style.display = 'none';
document.getElementById("id_minutes_between_refresh").style.display = 'none';
document.getElementById("id_datasource_name").style.display = '';
}
}
function OnChangeUseMailsource() {
if (document.submitform.receive_mail_enable_mail_source.checked == false) {
document.getElementById("id_receive_mail_mail_server").style.display = '';
document.getElementById("id_recevie_mail_username").style.display = '';
document.getElementById("id_receive_mail_password").style.display = '';
document.getElementById("id_receive_mail_port").style.display = '';
document.getElementById("id_receive_mail_source_name").style.display = 'none';
} else {
document.getElementById("id_receive_mail_mail_server").style.display = 'none';
document.getElementById("id_recevie_mail_username").style.display = 'none';
document.getElementById("id_receive_mail_password").style.display = 'none';
document.getElementById("id_receive_mail_port").style.display = 'none';
document.getElementById("id_receive_mail_source_name").style.display = '';
}
if (document.submitform.send_mail_use_embeded_smtp_mail_server.checked == false) {
document.submitform.send_mail_server.disabled = false;
document.submitform.send_mail_username.disabled = false;
document.submitform.send_mail_password.disabled = false;
document.submitform.send_mail_port.disabled = false;
document.submitform.send_mail_source_name.disabled = false;
document.submitform.send_mail_enable_mail_source.disabled = false;
} else {
document.submitform.send_mail_server.disabled = true;
document.submitform.send_mail_username.disabled = true;
document.submitform.send_mail_password.disabled = true;
document.submitform.send_mail_port.disabled = true;
document.submitform.send_mail_source_name.disabled = true;
document.submitform.send_mail_enable_mail_source.disabled = true;
}
if (document.submitform.send_mail_enable_mail_source.checked == false) {
document.getElementById("id_send_mail_mail_server").style.display = '';
document.getElementById("id_send_mail_username").style.display = '';
document.getElementById("id_send_mail_password").style.display = '';
document.getElementById("id_send_mail_port").style.display = '';
document.getElementById("id_send_mail_source_name").style.display = 'none';
} else {
document.getElementById("id_send_mail_mail_server").style.display = 'none';
document.getElementById("id_send_mail_username").style.display = 'none';
document.getElementById("id_send_mail_password").style.display = 'none';
document.getElementById("id_send_mail_port").style.display = 'none';
document.getElementById("id_send_mail_source_name").style.display = '';
}
}
</script>
<%@ include file="header.jsp"%>
<br/>
<%
DOM4JConfiguration mvncoreConfig = (DOM4JConfiguration)request.getAttribute("mvncoreConfig");
%>
<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> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.admin.index.title"/></a> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "configindex")%>"><fmt:message key="mvnforum.admin.configindex.title"/></a> »
<fmt:message key="mvnforum.admin.configmvncore.title"/>
</td>
</tr>
</table>
<br/>
<form action="<%=urlResolver.encodeURL(request, response, "configmvncoreprocess", URLResolverService.ACTION_URL)%>" method="post" name="submitform">
<%=urlResolver.generateFormAction(request, response, "configmvncoreprocess")%>
<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
<mvn:cssrows>
<tr class="portlet-section-header">
<td colspan="2"><fmt:message key="mvnforum.admin.config.config_mvncore_database"/></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_database_type">
<td>database_type <span class="requiredfield">*</span></td>
<td>
<select name="database_type">
<% String database_type = mvncoreConfig.getString("dboptions.database_type", "");%>
<option value="0" <%= (database_type.equals("0")) ? "selected=\"selected\"" : "" %>><fmt:message key="mvnforum.admin.config.default"/> (<fmt:message key="mvnforum.admin.config.auto_detect"/>)</option>
<option value="2" <%= (database_type.equals("2")) ? "selected=\"selected\"" : "" %>><fmt:message key="mvnforum.admin.config.not_support_scrollable_resultset"/></option>
</select>
</td>
</tr>
<tr class="<mvn:cssrow/>">
<td>use_datasource <span class="requiredfield">*</span></td>
<td>
<% String use_datasource = mvncoreConfig.getString("dboptions.use_datasource", "");%>
<input type="checkbox" name="use_datasource" value="true" class="noborder" onchange="javascript:OnChangeUseDatasource();"
<% if ("true".equals(use_datasource)) { %>
checked="checked"
<% } %>
/>
</td>
</tr>
<tr class="<mvn:cssrow/>" id="id_datasource_name">
<td>datasource_name <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="datasource_name" value="<%=mvncoreConfig.getString("dboptions.datasource_name", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow autoIncrease="false"/>" id="id_driver_class_name">
<td>driver_class_name <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="driver_class_name" value="<%=mvncoreConfig.getString("dboptions.driver_class_name", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_database_url">
<td>database_url <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="database_url" value="<%=mvncoreConfig.getString("dboptions.database_url", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_database_user">
<td>database_user <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="database_user" value="<%=mvncoreConfig.getString("dboptions.database_user", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_database_password">
<td>database_password</td>
<td><input type="password" size="70" name="database_password" value="<%=mvncoreConfig.getString("dboptions.database_password", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_max_connection">
<td>max_connection <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="max_connection" value="<%=mvncoreConfig.getString("dboptions.max_connection", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_max_time_to_wait">
<td>max_time_to_wait <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="max_time_to_wait" value="<%=mvncoreConfig.getString("dboptions.max_time_to_wait", "")%>" /></td>
</tr>
<tr class="<mvn:cssrow/>" id="id_minutes_between_refresh">
<td>minutes_between_refresh <span class="requiredfield">*</span></td>
<td><input type="text" size="70" name="minutes_between_refresh" value="<%=mvncoreConfig.getString("dboptions.minutes_between_refresh", "")%>" /></td>
</tr>
</mvn:cssrows>
<tr class="portlet-section-header">
<td colspan="2"><fmt:message key="mvnforum.admin.config.config_mvncore_mail"/></td>
</tr>
<mvn:cssrows>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?