#!/usr/local/bin/perl -w # quick_status_update.pl # Update the status (level 2) entry in the inventory via a web interface # Robert C. Groman # June 22, 1999. V1.30 Replace listgb with list. rcg # December 24, 1997 # Assumptions: # Only updates to existing projects in the inventory are allowed. $version = "V1.30-June 22, 1998"; $debug = "no"; #set to no if you want this to update the #real thing. $comment_break = 50; $project_size = 5; $instrument_size = 5; $siname_size = 5; $status_size = 5; $rows = 3; $cols = $comment_break; print STDOUT <Quick Status Update

Quick Status Update

HEADING if ( $debug eq "no" ) { $datadir = "/data/rgroman/Inventory/"; $dataobj = "/globec/gb/inventory"; $bindir = "/data/rgroman/Inventory/bin"; $scriptsdir = "/data/rgroman/Inventory/scripts"; $webdir = "/inv"; } elsif ( $debug eq "yes" ) { $datadir = "/data/rgroman/Inventory/debug"; $dataobj = "/globec/gb/inventory_test"; $bindir = "/data/rgroman/Inventory/bin/debug"; $scriptsdir = "/data/rgroman/Inventory/scripts/debug"; $webdir = "/invtest"; print STDOUT ("

DEBUG VERSION ONLY

\n"); } else { print STDOUT <Quick Update of Inventory Status

I am sorry but the degub flag ($debug) is not set correctly. I cannot continue. Contact the DMO for help.

TROUBLE exit 1; } $listvar = $bindir . "/listvar"; $list = $bindir . "/list -c -n -b "; $sinamesfile= $datadir . "/sinames"; $statuslevel2 = $datadir . "/status-level2"; print STDOUT < Select a project (cruiseid) to modify and click the "Get existing data" button.

INTRO $action = $webdir . "/get_quick_status_update_data.pl"; print STDOUT ("

\n"); # Get projects/cruiseid's $object = $dataobj . "\"(project)\""; #print STDOUT ("
**debug, object=$object
\n"); open GETPROJECTS, "$list $object|" or die "$0 could not get projects via $list for object=$object"; @projects = ; #print STDOUT ("
**debug, projects=@projects
\n"); if ( $#projects < 0 ) { PRINT STDOUT < Could not get the list of projects via $program. I cannot continue. ERRORS1 } print STDOUT ('

Project: \n"); print STDOUT ("

\n"); print STDOUT ("


Last modified: $version\n"); print STDOUT ("\n \n \n");