4 % "Internal users have access to the back-office interface. Typically, this is your employees and contractors, but in a VISP setup, you can also add accounts for your reseller's employees. It is <B>highly recommended</B> to add a <B>separate account for each person</B> rather than using role accounts.<BR><BR>".
5 % qq!<A HREF="${p}edit/access_user.html"><I>Add an internal user</I></A><BR><BR>!;
7 %#false laziness w/part_pkg.cgi
10 %unless ( $cgi->param('showdisabled') ) {
11 % %search = ( 'disabled' => '' );
12 % $search = "( disabled = '' OR disabled IS NULL )";
15 %#false laziness w/access_group.html & agent_type.cgi
16 %my $groups_sub = sub {
17 % my $access_user = shift;
20 % my $access_usergroup = $_;
21 % my $access_group = $access_usergroup->access_group;
24 % 'data' => $access_group->groupname,
27 % $p. 'edit/access_group.html?'. $access_usergroup->groupnum,
31 % grep { $_->access_group # and ! $_->access_group->disabled
33 % $access_user->access_usergroup,
40 %if ( $cgi->param('showdisabled') ) {
41 % $cgi->param('showdisabled', 0);
42 % $posttotal = '( <a href="'. $cgi->self_url. '">hide disabled users</a> )';
43 % $cgi->param('showdisabled', 1);
45 % $cgi->param('showdisabled', 1);
46 % $posttotal = '( <a href="'. $cgi->self_url. '">show disabled users</a> )';
47 % $cgi->param('showdisabled', 0);
50 %my $count_query = 'SELECT COUNT(*) FROM access_user';
51 %$count_query .= " WHERE $search"
54 %my $link = [ $p.'edit/access_user.html?', 'usernum' ];
56 %my @header = ( '#', 'Username' );
57 %my @fields = ( 'usernum', 'username' );
59 %my @links = ( $link, $link );
60 %my @style = ( '', '' );
62 %#false laziness w/part_pkg.cgi
63 %#unless ( $cgi->param('showdisabled') ) { #its been reversed already
64 %if ( $cgi->param('showdisabled') ) { #its been reversed already
65 % push @header, 'Status';
66 % push @fields, sub { shift->disabled
67 % ? '<FONT COLOR="#FF0000">DISABLED</FONT>'
68 % : '<FONT COLOR="#00CC00">Active</FONT>'
75 %push @header, 'Full name', 'Groups';
76 %push @fields, 'name', $groups_sub;
77 %push @links, $link, '';
81 <% include( 'elements/browse.html',
82 'title' => 'Internal Users',
83 'menubar' => [ #'Main menu' => $p,
84 'Internal access groups' => $p.'browse/access_group.html',
86 'html_init' => $html_init,
87 'html_posttotal' => $posttotal,
88 'name' => 'internal users',
89 'query' => { 'table' => 'access_user',
90 'hashref' => \%search,
91 'extra_sql' => 'ORDER BY last, first',
93 'count_query' => $count_query,