<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%@ page import="com.zhuozhengsoft.pageoffice.*,com.zhuozhengsoft.pageoffice.excelwriter.*,java.awt.*,javax.servlet.*,javax.servlet.http.*,java.sql.*,java.text.SimpleDateFormat,java.util.Date"%>
<%@ taglib uri="http://java.pageoffice.cn" prefix="po"%>
<%
	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");//载入驱动程序类别
	String strUrl = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=" + this.getServletContext().getRealPath("demodata/") + "\\demo.mdb";
	Connection conn = DriverManager.getConnection(strUrl);
	Statement stmt = conn.createStatement();
	String id = request.getParameter("ID");
	ResultSet rs = stmt.executeQuery("select * from leaveRecord where ID = " + id);
	String docSubject = "", docName = "", docDept = "", docCause = "", docNum = "", docDate = "";
	if (rs.next()) {
		docSubject = rs.getString("Subject");
		docName = rs.getString("Name");
		docDept = rs.getString("Dept");
		docCause = rs.getString("Cause");
		docNum = rs.getString("Num");
		docDate = rs.getString("SubmitTime");
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<TITLE>PageOffice 平台 演示程序</TITLE>
		<META http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema"
			content="http://schemas.microsoft.com/intellisense/ie5">
		<link rel="stylesheet" href="images/csstg.css" type="text/css"></link>
		<link rel="stylesheet" href="css/style.css" type="text/css"></link>
	</HEAD>
	<body>
		<form id="Form1" method="post">
		</form>

		<table width='98%' class="zz-talbe"
			style="margin-top: 20px; width: 460px;">
			<thead>
				<tr>
					<th width='20%' height='26' valign="middle">
						数据库字段
					</th>
					<th width='80%' height='23' valign="middle">
						字段值
					</th>
				</tr>
			</thead>
			<tr>
				<td width='20%' height='26' valign="middle"
					style="background-color: #D7FFEE">
					主题
				</td>
				<td width='80%' height='23' valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<%=docSubject%></td>
			</tr>
			<tr>
				<td width='20%' height='26' valign="middle"
					style="background-color: #D7FFEE">
					姓名
				</td>
				<td width='80%' height='23' valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<%=docName%></td>
			</tr>
			<tr>
				<td width='20%' height='26' valign="middle"
					style="background-color: #D7FFEE">
					部门
				</td>
				<td width='80%' height='23' valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<%=docDept%></td>
			</tr>
			<tr>
				<td width='20%' height='26' valign="middle"
					style="background-color: #D7FFEE">
					请假原因
				</td>
				<td width='80%' height='23' valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<%=docCause%></td>
			</tr>
			<tr>
				<td width='20%' height='26' valign="middle"
					style="background-color: #D7FFEE">
					请假天数
				</td>
				<td width='80%' height='23' valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<%=docNum%></td>
			</tr>
			<tr>
				<td width='20%' height='26' valign="middle"
					style="background-color: #D7FFEE">
					申请日期
				</td>
				<td width='80%' height='23' valign="middle">
					&nbsp;&nbsp;&nbsp;&nbsp;<%=new SimpleDateFormat("yyyy-MM-dd")
									.format(new SimpleDateFormat("yyyy-MM-dd").parse(docDate))%></td>
			</tr>


		</table>

	</body>
</HTML>
