3 # Display all refresh patterns
5 require './squid-lib.pl';
6 $access{'refresh'} || &error($text{'refresh_ecannot'});
7 &ui_print_header(undef, $text{'refresh_title'}, "", "list_refresh", 0, 0, 0, &restart_button());
10 @refresh = &find_config("refresh_pattern", $conf);
11 @links = ( &select_all_link("d"),
12 &select_invert_link("d"),
13 "<a href='edit_refresh.cgi?new=1'>$text{'refresh_add'}</a>" );
15 print &ui_form_start("delete_refreshes.cgi", "post");
16 @tds = ( "width=5", undef, undef, undef, undef, "width=32" );
17 print &ui_links_row(\@links);
18 print &ui_columns_start([ "",
23 $text{'eacl_move'} ], 100, 0, \@tds);
25 foreach $h (@refresh) {
26 @v = @{$h->{'values'}};
31 push(@cols, "<a href='edit_refresh.cgi?index=$h->{'index'}'>$v[0]</a>");
32 push(@cols, @v[1..3]);
34 if ($hc != @refresh-1) {
35 $mover .= "<a href=\"move_refresh.cgi?$hc+1\">".
36 "<img src=images/down.gif border=0></a>";
39 $mover .= "<img src=images/gap.gif>";
42 $mover .= "<a href=\"move_refresh.cgi?$hc+-1\">".
43 "<img src=images/up.gif border=0></a>";
46 $mover .= "<img src=images/gap.gif>";
49 print &ui_checked_columns_row(\@cols, \@tds, "d",$h->{'index'});
52 print &ui_columns_end();
53 print &ui_links_row(\@links);
54 print &ui_form_end([ [ "delete", $text{'refresh_delete'} ] ]);
57 print "<p>$text{'refresh_none'}<p>\n";
58 print &ui_links_row([ $links[2] ]);
61 &ui_print_footer("", $text{'index_return'});