<%@ page contentType="text/html;charset=GBK" %>
<%
/**
 *	$RCSfile: database.jsp,v $
 *	$Revision: 1.1.1.1 $
 *	$Date: 2002/09/09 13:50:10 $
 */
%>

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

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

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

<p>

<%  // Title of this page and breadcrumbs
    String title = "数据库设置";
    String[][] breadcrumbs = {
        {"主页面", "main.jsp"},
        {title, "database.jsp"}
    };
%>
<%@ include file="title.jsp" %>

<font size="-1">
以下是数据库设置的概览。如果你需要修改他们，你需要编辑你的jive_config.xml文件。
</font>

<p>

<%
	boolean error = false;
	DatabaseMetaData metaData = null;
	Connection con = null;
	if (!error) {
		try {
			con = ConnectionManager.getConnection();
			metaData = con.getMetaData();
		}
		catch( Exception e ) {
			e.printStackTrace();
		}
	}
%>

<%
	if (!error) {
		try {
%>

<font size="-1"><b>数据库属性</b></font>

<ul>

<table bgcolor="<%= tblBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="300">
<tr><td>
<table bgcolor="<%= tblBorderColor %>" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr bgcolor="#ffffff">
    <td><font size="-1">名称:</font></td>
    <td><font size="-1"><%= metaData.getDatabaseProductName() %></font></td>
</tr>
<tr bgcolor="#ffffff">
    <td><font size="-1">版本:</font></td>
    <td><font size="-1"><%= metaData.getDatabaseProductVersion() %></font></td>
</tr>
</table>
</td></tr>
</table>

</ul>

<font size="-1"><b>JDBC驱动属性</b></font>

<ul>

<table bgcolor="<%= tblBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="300">
<tr><td>
<table bgcolor="<%= tblBorderColor %>" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr bgcolor="#ffffff">
    <td><font size="-1">驱动程序:</font></td>
    <td><font size="-1"><%= metaData.getDriverName() %>, 版本 <%= metaData.getDriverVersion() %></font></td>
</tr>
<tr bgcolor="#ffffff">
    <td><font size="-1">连接URL:</font></td>
    <td><font size="-1"><%= metaData.getURL() %></font></td>
</tr>
<tr bgcolor="#ffffff">
    <td><font size="-1">用户名:</font></td>
    <td><font size="-1"><%= metaData.getUserName() %></font></td>
</tr>
</table>
</td></tr>
</table>

</ul>

<font size="-1"><b>数据库功能</b></font>

<ul>

<table bgcolor="<%= tblBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="300">
<tr><td>
<table bgcolor="<%= tblBorderColor %>" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr bgcolor="#ffffff">
    <td><font size="-1">支持事务?</font></td>
    <td><font size="-1"><%= (metaData.supportsTransactions())?"是":"否" %></font></td>
</tr>
<tr bgcolor="#ffffff">
    <td><font size="-1">支持多连接<br>同时打开?</font></td>
    <td><font size="-1"><%= (metaData.supportsMultipleTransactions())?"是":"否" %></font></td>
</tr>
<tr bgcolor="#ffffff">
    <td><font size="-1">只读模式?</font></td>
    <td><font size="-1"><%= (metaData.isReadOnly())?"是":"否" %></font></td>
</tr>
</table>
</td></tr>
</table>

</ul>

<%			con.close();
		}
		catch( Exception e ) {}
	}
%>

</body>
</html>


