?? importexport.jsp
字號:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/importexport.jsp,v 1.31 2006/04/14 18:02:17 minhnn Exp $
- $Author: minhnn $
- $Revision: 1.31 $
- $Date: 2006/04/14 18:02:17 $
-
- ====================================================================
-
- 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: Igor Manic
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp" %>
<%@ page import="java.util.Vector" %>
<%@ page import="com.mvnforum.MVNForumConfig" %>
<!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"/> - Import/Export Data</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 Submit_RestoreForm() {
if (Validate_RestoreForm() == true ) {
document.restoreform.submitbutton.disabled=true;
document.restoreform.submit();
}
}
function Submit_MigrateForm() {
if (Validate_MigrateForm() == true ) {
document.migrateform.submitbutton.disabled=true;
document.migrateform.submit();
}
}
function Submit_BackupForm() {
if (Validate_BackupForm() == true ) {
document.backupform.submitbutton.disabled=true;
document.backupform.submit();
}
}
function Validate_RestoreForm() {
//@todo: if value of restoreform.ServerImportFile is empty, then
// value of field restoreform.ClientImportFile should be non-empty
//return true;
if (isBlank(document.restoreform.ClientImportFile, "Import input file"))
return false;
else
return true;
}
function Validate_MigrateForm() {
if (isBlank(document.migrateform.ClientImportFile, "Import input file")) return false;
if (isBlank(document.migrateform.JiveAdmin, "Admin username")) return false;
if (isBlank(document.migrateform.JiveGuest, "Guest username")) return false;
if (isBlank(document.migrateform.RootCategory, "Root category name")) return false;
return true;
}
function Validate_BackupForm() {
return true;
}
</script>
<%@ include file="header.jsp"%>
<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")%>">Miscellaneous Tasks</a> »
Import/Export Data
</td>
</tr>
</table>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="pagedesc">
<td>
This page allows you to:<br/>
-- backup/export data from <b><%=MVNForumInfo.getProductDesc()%></b>
and eventually download it to your computer (whether you choose to download it or not,
the file will be left in the backup repository on the server)<br/>
-- restore data from previous backups<br/>
-- import data from some other source (for example, from another forum system).<br/>
<span class="warning">WARNING: DURING THE IMPORT ALL EXISTING DATA WILL
BE DESTROYED!</span>
You may consider <a href="#exportbackup" class="command">backing up current data</a>
before replacing them with new ones.<br/>
After completion of import, you will be automatically logged out and left with status
and error messages that eventually rised during the process. If you want to continue
your work, you will have to login again (you must login as one of
<span class="warning">newly-imported users</span>, and not with your
current account, since it will be destroyed during the process).<br/>
<%if ( permission.canAdminSystem() ) {%>
<a href="#importrestore" class="command">Import/Restore Data</a><br/>
<a href="#importmigrate" class="command">Import/Migrate from Jive</a><br/>
<a href="#exportbackup" class="command">Export/Backup Data</a><br/>
<%}%>
</td>
</tr>
</table>
<br/>
<%-- IMPORTANT: these three forms have a couple of same fields. Those fields MUST
have same names in all forms, so a WebHandler can handle all of them at once. --%>
<%-- ==================================================================
====== RESTORE (import from mvnForum XML, or mvnForum ZIP) =======
================================================================== --%>
<%
Vector backupFilesOnServer = (Vector)request.getAttribute("BackupFilesOnServer");
%>
<a name="importrestore"/>
<form method="post" action="<%=urlResolver.encodeURL(request, response, "importprocess" , URLResolver.ACTION_URL)%>" enctype="multipart/form-data" name="restoreform">
<%=urlResolver.generateFormAction(request, response, "importprocess")%>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="portlet-section-header">
<td>Restore Data</td>
</tr>
<tr class="portlet-section-body">
<td align="left" valign="top">
<table width="100%" cols="2" align="center" border="0" bordercolor="#000000">
<tr class="portlet-section-body">
<td width="50%" align="left">Choose backup file to restore from:</td>
<td width="50%" align="right"><a href="javascript:location.reload();" class="command">Refresh file list</a></td>
</tr>
</table>
<table width="98%" cols="3" align="center" border="0" bordercolor="#000000">
<%
int i=0;
if (backupFilesOnServer!=null) {
for (i=0; i<backupFilesOnServer.size(); i++) {
String serverFilename=(String)backupFilesOnServer.elementAt(i);%>
<%-- <tr class="<%if (i%2==0) {%>portlet-section-body<%} else {%>portlet-section-alternate<%}%>"> --%>
<tr class="portlet-section-alternate">
<td align="left">
<input type="radio" name="ServerImportFile" value="<%=serverFilename%>">
<b><%=serverFilename%></b>
</td>
<td align="center" width="100">
<a href="<%=urlResolver.encodeURL(request, response, "getexportprocess?filename=" + serverFilename)%>" class="command">Download</a>
</td>
<td align="center" width="100">
<a href="<%=urlResolver.encodeURL(request, response, "deleteexportprocess?filename=" + serverFilename)%>" class="command">Delete</a>
</td>
</tr>
<%} //for
} /*if (backupFilesOnServer!=null)*/%>
<%-- <tr class="<%if (i%2==0) {%>portlet-section-body<%} else {%>portlet-section-alternate<%}%>"> --%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -