if (!UserModel.isLoginned(paramHttpServletRequest))
{
ErrorProcess.Error("Please login first.", localPrintWriter);
return;
}
UserModel localUserModel = UserModel.getCurrentUser(paramHttpServletRequest);
Timestamp localTimestamp1 = ServerConfig.getSystemTime();
if (localUserModel.getLastSubmitTime() + 3000L > localTimestamp1.getTime())
{
ErrorProcess.Error("Sorry,please don't submit again within 3 seconds.", localPrintWriter);
return;
}
localUserModel.setLastSubmitTime(localTimestamp1.getTime());
localConnection = DBConfig.getConn();
try
{
PreparedStatement localPreparedStatement;
ResultSet localResultSet;
if (cid != 0 && l1 <= 26)
{
localPreparedStatement = localConnection.prepareStatement("select problem_id from contest_problem where contest_id=? and num=?");
localPreparedStatement.setLong(1, cid);
localPreparedStatement.setLong(2, l1);
localResultSet = localPreparedStatement.executeQuery();
if (!localResultSet.next())
{
ErrorProcess.Error((new StringBuilder()).append("Can not find contest problem (ID:").append(l1).append(")<br><br>").toString(), localPrintWriter);
localPreparedStatement.close();
localConnection.close();
return;
}
l1 = localResultSet.getInt("problem_id");
}
String str3 = localUserModel.getUser_id();
String str4 = localUserModel.getNick();
localPreparedStatement = localConnection.prepareStatement("select problem.* from problem where problem_id = ? AND UPPER(problem.defunct) = 'N'");
localPreparedStatement.setLong(1, l1);
localResultSet = localPreparedStatement.executeQuery();
if (!localResultSet.next())
{