%@ page language="java" %>
<%@ page import="com.xoomers.util.*" %>
<%@ page import="com.xoomers.db.*" %>
<%
Boolean auth=(Boolean)request.getSession(true).getAttribute("authenticated");
if (auth==null ||!(auth.booleanValue())) { %>
<% } %>
<%! int pid = 0; %>
<%! String[] groups = new String[2]; %>
<%! DB db = null; %>
<%! int gid1 = 0; %>
<%! int gid2 = 0; %>
<%
int uid = ((Integer)request.getSession(true).getAttribute("uid")).intValue();
gid1 =((Integer)request.getSession(true).getAttribute("gid")).intValue();
String game = request.getParameter("game");
if( request.getParameter("pid") != null )
pid = Integer.parseInt(request.getParameter("pid"));
try {
db = DB.openConnection();
Table s = db.query("select distinct gid from votes "+
"where id = "+pid+" and gid != "+gid1);
s.absolute(0);
gid2 = Integer.parseInt(s.getString(0));
s = db.query("select gname from groups "+
"where gid = "+gid1+" or "+
"gid = "+gid2);
int i = 0;
while(s.next()) {
groups[i++] = s.getString(0);
}
} catch( Exception e ) {
System.out.println(e);
e.printStackTrace();
}
%>
Post Score
Post your score...
In the matter of <%= groups[0] %> vs. <%= groups[1] %>
in the game of <%= game %>, how do you score?