#!/usr/local/bin/perl5 # -*- perl -*- use P4CGI ; use strict ; # ##################################################################### ## ## CONFIGURATION INFORMATION: ## All config info should be in $configFile (see init() in P4CGI.pm) ## ##################################################################### ## ## Changes By User ## ##################################################################### # Set back references my $homepage="index.cgi"; my $backtohome="Back to Home" ; # Vars for columnizing my $totalUsers ; my $usersPerColumn ; my $usersRemainder ; my $usersColumn1 ; my $usersColumn2 ; my $usersColumn3 ; my $users1 ; my $users2 ; my $users3 ; # Get users my @tmp; &P4CGI::p4call(\@tmp, "users" ); my $user ; my @users ; foreach $user (sort { uc($a) cmp uc($b) } @tmp) { my ( $uid, $name, $listuser ) ; $user =~ /^(\w+)\s+<.*>\s+(\(.*\))\s+accessed.*/ and do { $uid = $1 ; $name= $2 ; $listuser = &P4CGI::ahref(-url => &P4CGI::CHB_URL(), "FSPC=//...", "USER=$uid", $uid), $listuser .= " " . $name . "<br>"; ++$totalUsers ; push ( @users, $listuser ) ; } } $usersPerColumn = $totalUsers / 3 ; $usersRemainder = $totalUsers % 3 ; if ( $usersRemainder ) { $usersColumn1 = $usersPerColumn + 1 ; $usersColumn2 = $usersPerColumn + 1 ; $usersColumn3 = $usersPerColumn ; } else { $usersColumn1 = $usersPerColumn ; $usersColumn2 = $usersPerColumn ; $usersColumn3 = $usersPerColumn ; } # Split users into 3 columns my @tmpusers1 ; my @tmpusers2 ; my @tmpusers3 ; if(@users) { @tmpusers1 = splice(@users,0,$usersColumn1) ; @tmpusers2 = splice(@users,0,$usersColumn2) ; @tmpusers3 = splice(@users,0,$usersColumn3) ; } if( @tmpusers1 ) { $users1 = join("\n", @tmpusers1) ; } else { $users1 = "No users!\n" ; } if( @tmpusers2 ) { $users2 = join("\n", @tmpusers2) ; } if( @tmpusers3 ) { $users3 = join("\n", @tmpusers3) ; } # Print title and legend print "", &P4CGI::start_page("Changes by User", &P4CGI::ul_list( "<b>User:</b> to see list of changes for that user"), $homepage,$backtohome) ; # Print user in 3 columns print "", "<table width=750 cellspacing=0 cellpadding=0>", "<tr valign=top>", "<td width=32%>", "$users1", "<td width=2%>", "<td width=32%>", "$users2", "<td width=2%>", "<td width=32%>", "$users3", "</table>" , # End the page &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. |