Jive(J道版) Jive(J道版)是在Jive 2.1版本基础上改编而成

源代码在线查看: data.jsp

软件大小: 3280 K
上传用户: jjkk778
关键词: Jive 2.1 版本
下载地址: 免注册下载 普通下载 VIP

相关代码

				
								/**
				 *	$RCSfile: data.jsp,v $
				 *	$Revision: 1.1.1.1 $
				 *	$Date: 2002/09/09 13:50:25 $
				 */
				%>
				
								                 java.util.*,
								 java.text.*,
								 com.jivesoftware.util.*,
				                 com.jivesoftware.forum.*,
								 com.jivesoftware.forum.database.*,
								 com.jivesoftware.forum.util.*"
				    errorPage="error.jsp"
				%>
				 
				
				 
								    
				    // Date formatter for filenames
				    private static SimpleDateFormat fileDateFormatter =
				        new SimpleDateFormat("yyyy-MM-dd");
				%>
				 
								    boolean export = ParamUtils.getBooleanParameter(request,"export");
				    boolean doImport = ParamUtils.getBooleanParameter(request,"import");
				    String filename = ParamUtils.getParameter(request,"filename");
				    
				    // Do an export
				    if (export) {
				        DbForumFactory dbForumFactory = (DbForumFactory)(((DbForumFactoryProxy)forumFactory).getProxiedForumFactory());
				        DbDataExport exporter = new DbDataExport(dbForumFactory);
				        exporter.export(false);
				        response.sendRedirect("data.jsp");
				        return;
				    }
				    
				    // Do an import
				    if (doImport) {
				        DbForumFactory dbForumFactory = (DbForumFactory)(((DbForumFactoryProxy)forumFactory).getProxiedForumFactory());
				        DbDataImport importer = new DbDataImport(dbForumFactory);
				        Reader in = new FileReader(new File(JiveGlobals.getJiveHome() + System.getProperty("file.separator") + "data" + System.getProperty("file.separator") + filename));
				        importer.doImport(in);
				        response.sendRedirect("data.jsp");
				        return;
				    }
				%>
				
				
				
				
				
								    String title = "Date Import & Export";
				    String[][] breadcrumbs = {
				        {"Main", "main.jsp"},
				        {"Date Import & Export", "data.jsp"}
				    };
				%>
				
				
				
				The import and export functions allow you to read data into and write
				data from your Jive Forums installation. All data uses the Jive XML format.
				
				
				
				
				Import Jive Data
				
				
				
				
				    
				    Choose a file below to import:
				    
				    
				    
								    try {
				        File jiveHomeDir = new File(JiveGlobals.getJiveHome() + System.getProperty("file.separator") + "data");
				        String[] filenames = jiveHomeDir.list();
				        for (int i=0; i				            if (filenames[i].endsWith(".xml")) {
				                foundXMLFiles = true;
				%>
				         
				            
				            
				        
								            }
				        }
				    }
				    catch (Exception e) {}
				    
				    if (!foundXMLFiles) {
				%>
				        (No files to import.)
				        
								    }
				    else {
				%>
				        
				        
								    }
				%>
				    
				
				
				
				
				
				Export Jive Data
				
								%>
				
				
				
				
				    
				    Export current Jive data to:
				    
				    
				    
				    
				    
				
				
				
				
				
				
				
							

相关资源