# HG changeset patch # User igor@book.xt.vpn # Date 1229379174 -7200 # Node ID 2c9ea8e4fa1487ba383c45832c9693330eb0f008 # Parent 1cbdfdde1274ae5420cb36b16bfaf8d2d5294885 mass upload diff -r 1cbdfdde1274 -r 2c9ea8e4fa14 l3-frontend --- a/l3-frontend Mon Dec 15 22:47:03 2008 +0200 +++ b/l3-frontend Tue Dec 16 00:12:54 2008 +0200 @@ -10,6 +10,7 @@ our %Commands_Description; our %Args_Description; our %Sessions; +our %Uploads; our $debug_output=""; # Используйте эту переменную, если нужно передать отладочную информацию @@ -42,6 +43,7 @@ sub make_new_entries_table; sub load_command_lines_from_xml; sub load_sessions_from_xml; +sub load_uploads; sub sort_command_lines; sub process_command_lines; sub init_variables; @@ -61,6 +63,7 @@ sub print_footer_html; sub tigra_hints_generate; + #### mywi # sub mywi_init; @@ -88,6 +91,7 @@ mywi_init(); load_command_lines_from_xml($Config{"backend_datafile"}); + load_uploads($Config{"upload_dir"}); load_sessions_from_xml($Config{"backend_datafile"}); sort_command_lines; process_command_lines; @@ -345,6 +349,21 @@ } } +sub load_uploads($) +{ + $dir=$_[0]; + for $i (glob("$dir/*.png")) { + $i =~ s@.*/(([0-9-]+)_([0-9]+).*)@$1@; + $Uploads{$2}{$3}=$i; + } +} + +#for $key (sort keys %session) { +# for $t (sort { $a <=> $b } keys %{ $session{$key} }) { +# print $session{$key}{$t}."\n"; +# } +#} +#} # sort_command_lines # In: @Command_Lines @@ -614,6 +633,7 @@ my $cl=$Command_Lines[$Command_Lines_Index[$current_command++]]; next unless $cl; + my $next_cl=$Command_Lines[$Command_Lines_Index[$current_command+1]]; next if $current_command < $Config{"start_from_command"}; last if $current_command > $Config{"start_from_command"} + $Config{"commands_to_show_at_a_go"}; @@ -813,6 +833,15 @@ $this_day_result .= "
".$cl->{"diff"}."" if ( $Config{"show_diffs"} =~ /^y/i && $cl->{"diff"}); # SHOT + #for $t (sort { $a <=> $b } keys %{ $Uploads{$cl->{"local_session_id"}} }) { + # if ($t > $cl->{"time"} && $t < $next_cl->{"time"}) { + $this_day_result .= "" + #} + $this_day_result .= "