3 # List all the files in some package
5 require './software-lib.pl';
7 &ui_print_header(undef, $text{'list_title'}, "", "list_pack");
9 print &ui_subheading(&text('list_files', "<tt>$in{'package'}</tt>"));
10 print &ui_columns_start([
16 $text{'list_status'} ], 100);
17 $n = &check_files($in{'package'}, $in{'version'});
18 @tds = ( "valign=top", "valign=top", "valign=top",
19 "valign=top", "valign=top", "valign=top" );
20 for($i=0; $i<$n; $i++) {
21 $sz = $files{$i,'size'};
22 $ty = $files{$i,'type'};
24 $ls = "<a href=\"file_info.cgi?file=".&urlize($files{$i,'path'})."\">";
26 if ($ty == 3 || $ty == 4) {
28 push(@cols, $ls.&html_escape($files{$i,'path'}).
29 " -> ".&html_escape($files{$i,'link'}).$le);
33 $table = "<table width=100% cellpadding=0 ".
34 "cellspacing=0><tr><td>$ls".
35 &html_escape($files{$i,'path'}).
36 "$le</td> <td align=right>\n";
37 if ($ty == 0 || $ty == 5) {
38 $table .= "<a href='view.cgi".
39 &html_escape($files{$i,'path'}).
40 "'>$text{'list_view'}</a>";
42 $table .= "</td></tr></table>";
44 push(@cols, &html_escape($files{$i,'user'}));
45 push(@cols, &html_escape($files{$i,'group'}));
47 push(@cols, $type_map[$ty]);
48 push(@cols, $ty != 0 ? "" : &nice_size($sz));
49 $err = $files{$i,'error'};
54 push(@cols, "<font color=#ff0000>$err</font>");
57 push(@cols, $text{'list_ok'});
59 print &ui_columns_row(\@cols, \@tds);
61 print &ui_columns_end();
63 &ui_print_footer("edit_pack.cgi?package=".&urlize($in{'package'}).
64 "&version=".&urlize($in{'version'}), $text{'edit_return'},
65 "tree.cgi", $text{'index_treturn'});