<%@page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*"%> <%@ include file="Connections/cn.jsp" %> <% // *** Validate request to log in to this site. String MM_LoginAction = request.getRequestURI(); if (request.getQueryString() != null && request.getQueryString().length() > 0) MM_LoginAction += "?" + request.getQueryString(); String MM_valUsername=request.getParameter("login"); if (MM_valUsername != null) { String MM_fldUserAuthorization=""; String MM_redirectLoginSuccess="http://www.easytrivia.com/members/index.jsp"; String MM_redirectLoginFailed="http://www.easytrivia.com/badpassword.html"; String MM_redirectLogin=MM_redirectLoginFailed; Driver MM_driverUser = (Driver)Class.forName(MM_cn_DRIVER).newInstance(); Connection MM_connUser = DriverManager.getConnection(MM_cn_STRING,MM_cn_USERNAME,MM_cn_PASSWORD); String MM_pSQL = "SELECT Login, Pwd"; if (!MM_fldUserAuthorization.equals("")) MM_pSQL += "," + MM_fldUserAuthorization; //**** This part is modified manually. ****// //This is NOT a part of Dream Weaver Searver Behaviors. /* Check if email exist in database */ MM_pSQL += " FROM account WHERE Login='" + MM_valUsername + "'"; PreparedStatement MM_statementUser = MM_connUser.prepareStatement(MM_pSQL); ResultSet MM_rsUser = MM_statementUser.executeQuery(); boolean MM_rsUser_isNotEmpty = MM_rsUser.next(); if (!MM_rsUser_isNotEmpty) { //user does not exit /* forward to login error page */ MM_redirectLogin="/loginerror.html"; } else { //**** end of modification ****// MM_pSQL = "SELECT Login, Pwd"; MM_pSQL += " FROM account WHERE Login='" + MM_valUsername + "' AND Pwd='" + request.getParameter("password") + "'"; MM_statementUser = MM_connUser.prepareStatement(MM_pSQL); MM_rsUser = MM_statementUser.executeQuery(); MM_rsUser_isNotEmpty = MM_rsUser.next(); if (MM_rsUser_isNotEmpty) { // username and password match - this is a valid user session.putValue("MM_Username", MM_valUsername); if (!MM_fldUserAuthorization.equals("")) { session.putValue("MM_UserAuthorization", MM_rsUser.getString(MM_fldUserAuthorization).trim()); } else { session.putValue("MM_UserAuthorization", ""); } if ((request.getParameter("accessdenied") != null) && false) { MM_redirectLoginSuccess = request.getParameter("accessdenied"); } MM_redirectLogin=MM_redirectLoginSuccess; } } //end of "if-else" for the manual change. MM_rsUser.close(); MM_connUser.close(); response.sendRedirect(response.encodeRedirectURL(MM_redirectLogin)); } else { %> Easy Trivia - Free trivia game with cash prizes!
EasyTrivia.com
 





 
Home

How to Play
Prizes
Easy Trivia Winners
Links

Thank you to all our members that played...

our St. Patrick's Day Game. It was a spirited contest this evening, apologies to those that could not get into the game, but you have to qualify to play the game! It was a dog fight to the end between Gladys Wong and Sean Faulkner, but Gladys was quick to the click and beat Sean in the end. EasyTrivia was there to deliver their checks and as you can see Gladys and Sean laughed their way to the bank!

Practice Games

We offer practice games that launch every hour on the hour from 9:00 am through 5:00 pm PST from Monday through Friday. Currently our practice game is based on the 2003 American Music Awards. In order to answer the questions in the game, we ask that you click the AMA logo below, read the information on their website, then come test your trivia skills.

American Music Awards

Enjoy the game and remember, "You are smart enough to win!"

      
 
<% } %>