#!/usr/local/bin/perl5 # -*- perl -*- use P4CGI ; use strict ; # ##################################################################### ## ## CONFIGURATION INFORMATION ## All config info should be in $configFile (see init() in P4CGI.pm) ## ##################################################################### ## ## List All Users ## ##################################################################### # Set back references my $homepage="index.cgi"; my $backtohome="Back to Home" ; # Get users my @users ; &P4CGI::p4call(\@users, "users" ); my $emailall ; my $usertable ; $usertable = &P4CGI::start_table("cellpadding=4") ; $usertable .= &P4CGI::table_row("-type","th", "-align","left", "User","Name","Email address","Last access"); my $userinfo ; foreach $userinfo (sort { uc($a) cmp uc($b) } @users) { $userinfo =~ /(\w+)\s+\<(.*)\>\s+\((.*)\) accessed (\S+)/ and do { my ($user,$email,$name,$lastaccess) = ($1,$2,$3,$4) ; $user = &P4CGI::ahref(-url => &P4CGI::LU_URL(), "USER=$user", $user) ; $email =~ /\w+\@\w+/ and do { if(defined $emailall) { $emailall .= ",$email" ; } else { $emailall .= "mailto:$email" ; } ; $email = &P4CGI::ahref(-url => "mailto:$email", $email) ; } ; $usertable .= &P4CGI::table_row($user, $name, $email, $lastaccess) ; } } $usertable .= &P4CGI::end_table() ; # Print out the page print "", &P4CGI::start_page("P4 Users", &P4CGI::ul_list( "<b>User:</b> to see P4 user info", "<b>Email address:</b> to send mail to user", "<hr>", &P4CGI::ahref(-url => $emailall, "<b>Mail all users</b>",)),$homepage,$backtohome), "<b>", scalar(@users), " users:<br></b>", $usertable, &P4CGI::end_page() ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 271 | Diane Holt |
The Perl files for P4DB. These (almost) match the files in rev 1 of the p4db.tar file -- a few files have some minor cosmetic changes in the code, and chv.cgi has a Legend item added that was missing in the one in the tar-file. These files, at rev 1 (and the files in p4db.tar at rev 1), are suitable for for running the app with release 98.2 of P4. |