<%
/**
 * $RCSfile: setup4.jsp,v $
 * $Revision: 1.1.1.1 $
 * $Date: 2002/09/09 13:50:32 $
 *
 * Copyright (C) 1999-2001 CoolServlets, Inc. All rights reserved.
 *
 * This software is the proprietary information of CoolServlets, Inc.
 * Use is subject to license terms.
 */
%>

<%@ page import="java.io.*,
                 java.util.*,
                 java.sql.*,
                 java.beans.*,
                 java.lang.reflect.*,
                 com.jivesoftware.forum.*,
                 com.jivesoftware.forum.util.*,
                 com.jivesoftware.forum.database.*"%>

<%  // Get the global Jive locale
	Locale locale = JiveGlobals.getLocale();
	// Set the JSP page to use the Jive locale
	response.setLocale(locale);
	// Load the appropriate resource bundle to display the page.
	ResourceBundle bundle = SkinUtils.getResourceBundle("skin_admin_setup", locale);
    
    Connection con = null;
    DatabaseMetaData metaData = null;
    try {
        con = ConnectionManager.getConnection();
        metaData = con.getMetaData();
        session.setAttribute("sidebar.2.light", GREEN);
        session.setAttribute("setup3.done", "true");
    }
    catch (Exception e) { 
        e.printStackTrace();
    }
%>

<%@ include file="include/global.jsp" %>

<%@ include file="include/header.jsp" %>

<table cellpadding="6" cellspacing="0" border="0" width="100%">
<tr>
<td width="1%" valign="top">
<%  // set sidebar properties
    if (!GREEN.equals(getSessionString(session,"sidebar.2.light"))) {
        session.setAttribute("sidebar.2.light", YELLOW);
    }
%>
<%@ include file="include/sidebar.jsp" %>
</td>
<td width="99%" valign="top">

    <b><%= bundle.getString("setup3.header") %></b>
    <hr size="0">

    <font size="-1">
    Jive successfully connected to your database, so you may proceed to the next
    step of setup.
	<p>
  
	<table cellpadding="2" cellspacing="2" border="0">
    <tr>
    	<td colspan="2"><font size="-1"><b>Database Properties</b></font></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Name:</font></td>
    	<td><font size="-1"><%= metaData.getDatabaseProductName() %></font></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Version:</font></td>
    	<td><font size="-1"><%= metaData.getDatabaseProductVersion() %></font></td>
    </tr>
    <tr>
    	<td colspan="2"><br><b><font size="-1">JDBC Driver Properties</font></b></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Driver:</font></td>
    	<td><font size="-1"><%= metaData.getDriverName() %>, version <%= metaData.getDriverVersion() %></font></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Connection URL:</font></td>
    	<td><font size="-1"><%= metaData.getURL() %></font></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Connection username:</font></td>
    	<td><font size="-1"><%= metaData.getUserName() %></font></td>
    </tr>
    <tr>
    	<td colspan="2"><br><b><font size="-1">Database Capabilities</font></b></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Supports transactions?</font></td>
    	<td><font size="-1"><%= (metaData.supportsTransactions())?bundle.getString("yes"):bundle.getString("no")  %></font></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Supports multiple connections?</font></td>
    	<td><font size="-1"><%= (metaData.supportsMultipleTransactions())?bundle.getString("yes"):bundle.getString("no")  %></font></td>
    </tr>
    <tr>
    	<td><font size="-1" color="#000099">Is in read-only mode?</font></td>
    	<td><font size="-1"><%= (metaData.isReadOnly())?bundle.getString("yes"):bundle.getString("no") %></font></td>
    </tr>
    </table>

    <p>
    
    <form action="setup5.jsp">
    <hr size="0">
    <div align="center">
    <input type="submit" value="Continue">
    </form>
    </div>

    </form>

<%@ include file="include/footer.jsp" %>

</td>
</tr>
</table>

