%@ page contentType="text/html;charset=euc-kr" %>
<%@ include file="/include/in_Import.jsp" %>
<%@ include file="/include/in_Function.jsp" %>
<%!
static {
try {
new kr.co.slight.jinhae.pool.JDCConnectionDriver("org.postgresql.Driver","jdbc:postgresql:hanmaum","postgres","");
} catch(Exception e) {
System.out.println("
JDCConnectionDriver Error : " + e.toString());
}
}
%>
<%
String passkey = request.getParameter("passkey");
String no = request.getParameter("no");
int totalCnt = 0;
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
StringBuffer query = new StringBuffer();
query.append("select count(*)");
query.append(" from log_in ");
query.append(" where password = '").append(passkey).append("'");
query.append(" and no = '0' ");
conn = DriverManager.getConnection("jdbc:jdc:jdcpool");
stmt = conn.createStatement();
rs = stmt.executeQuery(query.toString());
while ( rs.next() ) {
totalCnt = rs.getInt(1);
}
rs.close();
if ( totalCnt > 0) {
%>
<%
} else {
%>
<%
}
} catch (Exception e) {
out.println("JSP >> Exception : " + e.toString());
%>
<%
} finally {
if (stmt != null) stmt.close();
if (conn != null) conn.close();
}
%>