lal.cgi #1

  • //
  • guest/
  • diane_holt/
  • p4db/
  • cgi-bin/
  • lal.cgi
  • View
  • Commits
  • Open Download .zip Download (1 KB)
#!/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 Labels
##
#####################################################################

# Set back references
my $homepage="index.cgi";
my $backtohome="Back to Home" ;

# Get labels
my @labels ;
&P4CGI::p4call(\@labels, "labels" );
foreach (@labels) {
    /^Label (\S+)\s+(\S+)\s+'(.*)'/ ;
    my $lab = &P4CGI::ahref(-url => &P4CGI::LV_URL(),
			    "LABEL=$1",
			    $1) ;
    $_ = &P4CGI::table_row(-valign => "top",
			   {-type=>"th",
			    -align=>"left",
			    -text=>$lab},
			   $2,
			   $3) ;
}

# Print title and legend
print
    "",
    &P4CGI::start_page("P4 Labels",
	&P4CGI::ul_list("<b>Label:</b> to view label info"),
	$homepage,$backtohome) ;

# Print page
print
    "",
    "<b>",
    scalar @labels," labels:</b><br>",
    &P4CGI::start_table(""),
    &P4CGI::table_row(-type=>"th",
		      "Label","Date","Description") ;
# Print $_, from above
foreach (@labels) {    
    print ;
}

# End the table, end the page
print 
    &P4CGI::end_table(),
    &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.