<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="org.unicode.cldr.util.*,org.unicode.cldr.web.*" %> Users With Old Votes <%@ include file="/WEB-INF/tmpl/stnotices.jspf" %>
<% SurveyTool.includeJavaScript(request, out); %> <% if(!SurveyMain.vap.equals(request.getParameter("vap"))) { %> Goodbye. <% return; } %>

users with old votes

<% SurveyMain sm = CookieSession.sm; // List from multiple old tables, not only one previous table. // Group together votes from each old table, list groups in reverse chronological order. int ver = Integer.parseInt(SurveyMain.getNewVersion()); while (--ver >= SurveyAjax.oldestVersionForImportingVotes) { String oldVotesTable = DBUtils.Table.VOTE_VALUE.forVersion(Integer.toString(ver), false).toString(); if (DBUtils.hasTable(oldVotesTable)) { String sql = "select " + oldVotesTable +".submitter as submitter, cldr_users.id as id, cldr_users.email as email, cldr_users.password as password, count(*) as count from "+oldVotesTable +",cldr_users where "+oldVotesTable+".value is not null and "+oldVotesTable+".submitter=cldr_users.id group by "+oldVotesTable+".submitter order by "+oldVotesTable+".submitter"; java.util.Map rows[] = DBUtils.queryToArrayAssoc(sql); %>

<%= oldVotesTable %>

    <% for (java.util.Map m : rows) { UserRegistry.User u = sm.reg.getInfo((Integer) m.get("id")); %>
  1. <%= u.toHtml() %> user #<%= m.get("submitter") %>, get old votes Malti ST <%= m.get("count") %> items
  2. <% } // end for %>
<% } // end if } // end while %>