⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 importexport.jsp

📁 java servlet著名论坛源代码
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/importexport.jsp,v 1.22 2004/01/25 19:44:03 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.22 $
 - $Date: 2004/01/25 19:44:03 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2004 by MyVietnam.net
 -
 - 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.
 -
 - 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 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@MyVietnam.net
 -
 -
 - @author: Igor Manic   imanic@users.sourceforge.net
 -
 --%>
<%@ 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"%>
<html>
<head>
  <title>mvnForum - Import/Export data</title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=contextPath%>/mvnplugin/mvnforum/css/style.css" 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="95%" align="center">
  <tr class="nav">
    <td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
    <td width="100%" nowrap>
    <a class="nav" href="<%=indexUrl%>">mvnForum</a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="index">Admin CP</a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="misctasks">Miscellaneous Tasks</a>&nbsp;&raquo;&nbsp;
    Import/Export Data
    </td>
  </tr>
</table>
<br/>

<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="pagedesc">
    <td>
    This page allows you to:<br/>
    &nbsp;&nbsp;--&nbsp;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/>
    &nbsp;&nbsp;--&nbsp;restore data from previous backups<br/>
    &nbsp;&nbsp;--&nbsp;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="importprocess" enctype="multipart/form-data" name="restoreform">
<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="theader">
    <td>Restore Data</td>
  </tr>
  <tr class="trow1">
    <td align="left" valign="top">
      <table width="100%" cols="2" align="center" border="0" bordercolor="#000000">
        <tr class="trow1">
          <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="95%" 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) {%>trow1<%} else {%>trow2<%}%>"> --%>
            <tr class="trow2">
              <td align="left">
                <input type="radio" name="ServerImportFile" value="<%=serverFilename%>">
                <b><%=serverFilename%></b>
              </td>
              <td align="center" width="100">
                <a href="getexportprocess?filename=<%=serverFilename%>" class="command">Download</a>
              </td>
              <td align="center" width="100">
                <a href="deleteexportprocess?filename=<%=serverFilename%>" class="command">Delete</a>
              </td>
            </tr>
        <%} //for
        } /*if (backupFilesOnServer!=null)*/%>

⌨️ 快捷键说明

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