<%@page contentType="text/html; charset=iso-8859-1" session="true" language="java" %> <%@ page import="java.sql.*" %> <%@ page import="com.connection.*" %> <%@ page import="java.util.Date" %> <%@ page import="java.text.SimpleDateFormat" %> .:www.riveredace.com:.Home <% HttpSession sesion = request.getSession(true); Object playerId = session.getAttribute("playerId"); Object playerNick = session.getAttribute("playerNick"); Object avatarUrl = session.getAttribute("avatarUrl"); if(session == null || session.getAttribute("playerId") == null){%> <%} int pId = ((Integer)playerId).intValue(); boolean isCompleted = false; Connection c = null; AbstractConnector conn = new QogsDbConnector(); try{ c = conn.getConnection(); PreparedStatement ps = c.prepareStatement("SELECT isCompleted FROM Player WHERE playerId = ?"); ps.setInt(1, pId); ResultSet rs = ps.executeQuery(); if(rs.next()){ isCompleted = rs.getBoolean(1); } rs.close(); ps.close(); } catch(Exception e){ System.out.println(e.getMessage()); out.println("Database problems, contact tecnichal support."); } finally{ try { if(c != null){ c.close(); } } catch (SQLException e) { System.err.println(e.getMessage()); } } %>

My Account