% completion = Array.new showdown = Array.new progress = Array.new preinitiation = Array.new vldb = PStore.new('db/vil.db') vldb.transaction do break if (!vldb['recent_vid']) recent_vid = vldb['recent_vid'].to_i fid = 0 while (!File.exists?("db/vil#{fid}")) fid = fid + 1 end (recent_vid).downto(fid * 100 + 1) do |i| vild = vldb["root#{i}"] next if (!vild) if (vild['state'] > 2) if ((completion.size < 41 || @cgi['villist'] == 'all') && File.exists?("db/vil#{(i - 1) / 100}/#{i}.db")) completion.push(vil_list(vild)) elsif (completion.size == 41) completion.push(%Q(
|