3 # Displays a list of users from a text file
5 require './apache-lib.pl';
6 require './auth-lib.pl';
10 &allowed_auth_file($in{'file'}) ||
11 &error(&text('authu_ecannot', $in{'file'}));
12 $desc = &text('authu_header', "<tt>$in{'file'}</tt>");
13 &ui_print_header($desc, $text{'authu_title'}, "");
14 $f = &server_root($in{'file'}, $conf);
16 @users = sort { $a cmp $b } &list_authusers($f);
18 print "<table border width=100%>\n";
19 print "<tr $tb> <td><b>",&text('authu_header2', "<tt>$f</tt>"),
21 print "<tr $cb> <td><table width=100%>\n";
22 for($i=0; $i<@users; $i++) {
24 if ($i%4 == 0) { print "<tr>\n"; }
25 printf "<td width=25%%><a href=\"edit_authuser.cgi?user=$u&".
26 "file=%s&url=%s\">$u</a></td>\n",
27 &urlize($f), &urlize(&this_url());
28 if ($i%4 == 3) { print "</tr>\n"; }
30 while($i++%4) { print "<td width=25%></td>\n"; }
31 print "</table></td></tr></table>\n";
34 print "<b>",&text('authu_none', "<tt>$f</tt>"),"</b><p>\n";
36 printf "<a href=\"edit_authuser.cgi?file=%s&url=%s\">%s</a><p>\n",
37 &urlize($f), &urlize(&this_url()), $text{'authu_add'};
40 $s = $config{"sync_$f"};
41 print "<form action=save_sync.cgi>\n";
42 print "$text{'authu_sync'} <p>\n";
43 print "<input type=hidden name=file value='$f'>\n";
44 print "<input type=hidden name=url value='$in{'url'}'>\n";
45 printf "<input type=checkbox name=sync value=create %s> %s<br>\n",
46 $s =~ /create/ ? 'checked' : '', $text{'authu_screate'};
47 printf "<input type=checkbox name=sync value=modify %s> %s<br>\n",
48 $s =~ /modify/ ? 'checked' : '', $text{'authu_smodify'};
49 printf "<input type=checkbox name=sync value=delete %s> %s<br>\n",
50 $s =~ /delete/ ? 'checked' : '', $text{'authu_sdelete'};
51 print "<input type=submit value='$text{'save'}'></form>\n";
53 &ui_print_footer($in{'url'}, $text{'auth_return'});